From xabivtk at gmail.com Wed Jul 1 04:55:02 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Wed, 1 Jul 2015 10:55:02 +0200 Subject: [vtkusers] Missing pixel with vtkPolyDataMapper2D and vtkCoordinate In-Reply-To: References: Message-ID: Here is an example and a screenshot to illustrate the issue. I'm wondering if the coordinates returned in vtkOpenGLPolyDataMapper2D::RenderOverlay by the call to this->TransformCoordinate->GetComputedDoubleViewportValue(viewport); should be then shifted with the extra 0.5 to be in the center of the pixel and not in the border. #define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle, vtkRenderingOpenGL, vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL) #include #include #include #include #include #include #include #include #include int main(int, char* []) { vtkSmartPointer ren1= vtkSmartPointer::New(); vtkSmartPointer renWin= vtkSmartPointer::New(); renWin->SetSize( 1533, 792 ); renWin->AddRenderer(ren1); vtkSmartPointer iren= vtkSmartPointer::New(); iren->SetRenderWindow(renWin); vtkSmartPointer source = vtkSmartPointer::New(); source->SetOrigin(0.0, 0.0, 0.0); source->SetPoint1(1.0, 0.0, 0.0); source->SetPoint2(0.0, 1.0, 0.0); source->Update(); vtkSmartPointer scalars = vtkSmartPointer::New(); double bottom[3] = {255.0, 0, 0}; double top[3] = {0, 255.0, 0}; scalars->Initialize(); scalars->SetNumberOfComponents(3); scalars->SetNumberOfTuples(4); scalars->InsertTuple(0, bottom); scalars->InsertTuple(1, bottom); scalars->InsertTuple(2, top); scalars->InsertTuple(3, top); source->GetOutput()->GetPointData()->SetScalars(scalars); vtkSmartPointer coordinateSystem = vtkSmartPointer::New(); coordinateSystem->SetCoordinateSystemToNormalizedViewport(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(source->GetOutputPort()); mapper->SetTransformCoordinate(coordinateSystem); mapper->TransformCoordinateUseDoubleOn(); vtkSmartPointer actor2d = vtkSmartPointer::New(); actor2d->SetMapper(mapper); ren1->AddActor(actor2d); ren1->ResetCamera(); renWin->Render(); iren->Start(); } [image: Images int?gr?es 1] 2015-06-30 18:18 GMT+02:00 Xabi Riobe : > Hi, > > I want to display a plane as a background. > For that i have in a vtkActor2D a vtkPolyDataMapper2D filled with a > vtkPlaneSource going from 0,0,0 to 1,1,1 > I add to the mapper a vtkCoordinate with > SetCoordinateSystemToNormalizedViewport > > with that, everything seems fine and i don't have to take care of it when > my view is resized. > > but if i put some color on it and look at it carefully i can see an extra > line and column of black pixels > > I looked at the code of vtkCoordinate and vtkViewport and the combination > of the coordinates transformations leads to a final size of the polygon > rendered 1 pixel short in both x and y directions. > > Is this considered a normal behaviour due to the computation involved, or > is it definitively a bug? > > A quick workaround is to set my plane source a little bit larger, but for > future features of my app, i would need the exact size... > > Thanks for any comments/suggestions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 11349 bytes Desc: not available URL: From F.Thevissen at apodius.de Wed Jul 1 08:14:02 2015 From: F.Thevissen at apodius.de (=?UTF-8?Q?Florian_Thevi=c3=9fen?=) Date: Wed, 1 Jul 2015 14:14:02 +0200 Subject: [vtkusers] Problems with QVTKPlugin in QT Creator In-Reply-To: <1435715463050-5732639.post@n5.nabble.com> References: <5592C44A.1010304@apodius.de> <1435715463050-5732639.post@n5.nabble.com> Message-ID: <5593D98A.2000107@apodius.de> Yea, I can confirm that you can indeed ignore the fact that the plugin doesn't load correctly. Just using the QVTKWidget in Qt Creator works well enough. Am 01.07.2015 um 03:51 schrieb joaoroberto88: > Why don't you use Qt Designer instead of Qt Creator? In the past I didn't > have luck with QVTKPlugin and Qt Creator. So I decided to use it in Qt > Designer and it works flawlessly. > > Joao. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-QVTKPlugin-in-QT-Creator-tp5732604p5732639.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 F.Thevissen at apodius.de Wed Jul 1 08:25:49 2015 From: F.Thevissen at apodius.de (=?UTF-8?Q?Florian_Thevi=c3=9fen?=) Date: Wed, 1 Jul 2015 14:25:49 +0200 Subject: [vtkusers] Compiling VTK DLLs with -gd suffix? Message-ID: <5593DC4D.4030805@apodius.de> Hello everyone, I have the problem that the project I just setup requests two different "types" of DLLs depending on the configuration. For example, for the release configuration, the file > vtkCommonColor-6.2.dll is, among others, requested. I point the environment via an adjusted Path variable to the destination where the dll is located, and I can run the executable. However, when I try to debug, the file > vtkCommonColor-6.2-gd.dll is, among others, requested. The problem is, that I do not have these files with the -gd suffix, and I do not seem to be able to create them by compiling VTK via VS2013. Maybe I am missing something obvious, but having tried to fix this for quite a whil today, I'm starting to suspect that it's not... Best regards, Florian From bill.lorensen at gmail.com Wed Jul 1 08:33:09 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 1 Jul 2015 08:33:09 -0400 Subject: [vtkusers] vtkPLYWriter and obj_info In-Reply-To: <8CA6ECA8-6E64-4DAB-B40C-9A8138D1A349@bx.psu.edu> References: <5592FA9D.5000902@psu.edu> <8CA6ECA8-6E64-4DAB-B40C-9A8138D1A349@bx.psu.edu> Message-ID: I think the obj_info has been there a long time? Your fix look good. On Wed, Jul 1, 2015 at 8:05 AM, Greg Von Kuster wrote: > Hi Bill, > > Thanks for your response on this. We?re using the PLYLoader.js library discussed here... > > https://github.com/mrdoob/three.js/blob/master/examples/webgl_loader_ply.html > > ?to load PLY files into a VTK based viewer. > > If the obj_info lines are valid, do you know if have they been recently introduced into the PLY format? If so, perhaps the PLYLoader library needs to be enhanced to handle them. > > In my local version of the library, I find myself having to add the following: > > parseHeader: function ( data ) { > > var patternHeader = /ply([\s\S]*)end_header\s/; > var headerText = ""; > var headerLength = 0; > var result = patternHeader.exec( data ); > ? > // Hack to handle obj_info lines generated by vtk.vtkPLYWriter() > case "obj_info?: > header.comments.push(line); > break; > > Thanks again! > > Greg Von Kuster > > >> On Jun 30, 2015, at 5:05 PM, Bill Lorensen wrote: >> >> Sounds like a bug in the library you are using. I see lots of >> references to obj_info in a google search: >> https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=obj_info%20ply >> >> Bill >> >> >> On Tue, Jun 30, 2015 at 4:22 PM, Alex Pletzer wrote: >>> All, >>> >>> I noticed that vtkPLYWriter writes a "obj_info" field, an example can be >>> seen below. This is causing some applications, such as the THREE.PLYLoader >>> method to fail when reading PLY files produced by vtkPLYWriter. >>> >>> None of the documents describing the PLY format >>> (https://en.wikipedia.org/wiki/PLY_%28file_format%29 or >>> http://paulbourke.net/dataformats/ply/) mentions this field, although it is >>> present in the bunny file from http://graphics.stanford.edu/data/3Dscanrep/. >>> >>> Hence, it would seem that for maximum portability the obj_info line should >>> be removed. Is there any way one can prevent vtkPLYWriter from writing this >>> line? >>> >>> Thanks in advance. >>> >>> --Alex >>> >>> Typical header from a PLY file written by VTK: >>> >>> ply >>> format ascii 1.0 >>> comment VTK generated PLY File >>> obj_info vtkPolyData points and polygons: vtk4.0 >>> element vertex 198 >>> property float x >>> property float y >>> property float z >>> element face 192 >>> property list uchar int vertex_indices >>> end_header >>> .... >>> >>> ... >>> >>> _______________________________________________ >>> 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 lonni.besancon at gmail.com Wed Jul 1 08:47:29 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Wed, 1 Jul 2015 05:47:29 -0700 (MST) Subject: [vtkusers] Qt + VTK Message-ID: <1435754849435-5732645.post@n5.nabble.com> Hello everyone. I'm facing two different issues with VTK. Well to be more precise one is a question about VTK and Qt signals and slots as well as as blocking functions (available on Stack Overflow here . The second one is actually trying to compile a simple Qt + VTK code which gives me some linking errors even though I believe that I've done everything correctly (but obviously I've missed something). I've also created a Stack Overflow post because I think it's easier to read code on there but feel free to answer here if you prefer answering here. Here is the link I bet I won't be the only one facing these issues in the future so it might help other novice users like me soon enough ^^'. Thanks in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/Qt-VTK-tp5732645.html Sent from the VTK - Users mailing list archive at Nabble.com. From adufour at pasteur.fr Wed Jul 1 09:00:37 2015 From: adufour at pasteur.fr (Alexandre Dufour) Date: Wed, 1 Jul 2015 14:00:37 +0100 Subject: [vtkusers] [vtk-developers] [EXTERNAL] vtk 6.3 and vtk 7.0 In-Reply-To: References: Message-ID: Hi, I am not familiar with the nitty-gritty of the wrapping aspects, but as a Java-based user (icy.bioimageanalysis.org), I believe the issue has to do with the fact that transferring some Java array down to a vtk structure (via any setJavaArray() method) always(?) implies a copy of said structure down to the C++ layer, hence the issue of duplication. This typically happens when your data/image structure is first handled on the Java side, then passed over to VTK for rendering purposes. Does this make sense? Is there any way around this? I doubted that for a while, but then remembered the good old Unsafe class in Java that might help do ?dirty but efficient? communication? My 2 (unexperienced) cents. Very excited about this anyhow!! Alexandre ? Alexandre Dufour, PhD Senior Research Fellow @ Biological Image Analysis group Institut Pasteur, Dpt. of Cell Biology & Infection, Paris campus (France) CNRS UMR 3691 ?Pathological and Physiological Cell Dynamics? Meet Icy, the next-generation Bioimage Informatics platform On 30 Jun 2015, at 15:46, Utkarsh Ayachit wrote: > Gerrick, > > The *new* zero copy design literally started a week or two ago, so it is in its infancy, but I will write a design document soon. It doesn't however do anything new for access through wrapped languages. What exactly is your use-case. I am not sure what aspect is lacking in the current implementation in that regard. > > Utkarsh > > On Mon, Jun 29, 2015 at 6:04 PM Gerrick Bivins wrote: > ?* deprecate the existing zero copy array API in preparation for a significant refactoring that will come in 7.0. The refactor will make zero copy arrays both simpler to use and perform better.? > > > > Where can I find more information about this? > > Does the ?Zero copy array refactor? expose this framework to wrapped languages, Java in particular? > > Currently the duplication of data is one of the things holding up adoption of VTK in our application. > > > > Gerrick > > > > From: vtk-developers [mailto:vtk-developers-bounces at vtk.org] On Behalf Of David E DeMarle > Sent: Monday, June 29, 2015 9:42 AM > To: vtkdev; vtkusers at vtk.org > Subject: [EXTERNAL] [vtk-developers] vtk 6.3 and vtk 7.0 > > > > Hey vtkers, > > > > We are hoping to do a vtk 6.3 release in the next couple of weeks and then immediately follow that up with a 7.0 release. > > > > We'd are putting out a 6.3 out in order to: > > * deprecate the existing zero copy array API in preparation for a significant refactoring that will come in 7.0. The refactor will make zero copy arrays both simpler to use and perform better. > > * package up all of the progress that has been made in the master branch's OpenGL2 surface and volume rendering. The vtkpython binaries will switch over to using the OpenGL2 back end this release. > > > > Please let us know if you have any feedback, critical bugs especially, and developers let us know if there is any work you have in a partially finished state that we should be sure to get into 6.3. > > > > If all goes well we'll have a release candidate for 6.3 next week. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > _______________________________________________ > 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 JMelnyk at pile.com Wed Jul 1 09:16:10 2015 From: JMelnyk at pile.com (Joseph Melnyk) Date: Wed, 1 Jul 2015 13:16:10 +0000 Subject: [vtkusers] vtk 6.3 and vtk 7.0 In-Reply-To: References: Message-ID: <8841579C9694CA4196BE4138B6E2B4BF18392D1B@pdi-mail1.pdi.local> I?m not sure that this is a *critical* bug, but it?s certainly prohibiting me from upgrading my existing code base from 5.10 to 6.2. http://www.vtk.org/Bug/view.php?id=15384 In short: you can?t resize a vtkRenderWindow off-screen and save the output. Regards Joe From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of David E DeMarle Sent: Monday, June 29, 2015 10:42 AM To: vtkdev; vtkusers at vtk.org Subject: [vtkusers] vtk 6.3 and vtk 7.0 Hey vtkers, We are hoping to do a vtk 6.3 release in the next couple of weeks and then immediately follow that up with a 7.0 release. We'd are putting out a 6.3 out in order to: * deprecate the existing zero copy array API in preparation for a significant refactoring that will come in 7.0. The refactor will make zero copy arrays both simpler to use and perform better. * package up all of the progress that has been made in the master branch's OpenGL2 surface and volume rendering. The vtkpython binaries will switch over to using the OpenGL2 back end this release. Please let us know if you have any feedback, critical bugs especially, and developers let us know if there is any work you have in a partially finished state that we should be sure to get into 6.3. If all goes well we'll have a release candidate for 6.3 next week. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jul 1 09:29:12 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 1 Jul 2015 09:29:12 -0400 Subject: [vtkusers] Compiling VTK DLLs with -gd suffix? In-Reply-To: <5593DC4D.4030805@apodius.de> References: <5593DC4D.4030805@apodius.de> Message-ID: Florian, What kind of project did you set up? In other words, what software is requesting the -gd suffix? Thanks, Cory On Wed, Jul 1, 2015 at 8:25 AM, Florian Thevi?en wrote: > Hello everyone, > > I have the problem that the project I just setup requests two different > "types" of DLLs depending on the configuration. For example, for the > release configuration, the file > > > vtkCommonColor-6.2.dll > > is, among others, requested. I point the environment via an adjusted Path > variable to the destination where the dll is located, and I can run the > executable. However, when I try to debug, the file > > > vtkCommonColor-6.2-gd.dll > > is, among others, requested. The problem is, that I do not have these > files with the -gd suffix, and I do not seem to be able to create them by > compiling VTK via VS2013. Maybe I am missing something obvious, but having > tried to fix this for quite a whil today, I'm starting to suspect that it's > not... > > Best regards, > Florian > > > > > _______________________________________________ > 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 berk.geveci at kitware.com Wed Jul 1 10:02:38 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Wed, 1 Jul 2015 10:02:38 -0400 Subject: [vtkusers] [vtk-developers] [EXTERNAL] vtk 6.3 and vtk 7.0 In-Reply-To: References: Message-ID: I am fairly novice in Java so I apologize if this sounds naive. Doesn't Java do its own memory management and actually automatically move data from one memory location to another? How does one map a Java array to a C++ array and make sure that it is not moved and of course garbage collected? Interfacing to numpy arrays works fine because Python provides a buffer interface where it is guaranteed that a Python object holds a buffer (an array essentially) that does not move. The Python wrappers simply expose a functionality that allows the C++ layer to get a pointer from a buffer object. Then this array can simply be passed to any C++ method that takes an array. This is the only efficient way of sharing array between the two layers. Doing a "zero copy" array where each array access such as GetTuple() goes through a Java layer would be terribly inefficient and impractical. Best, -berk On Wed, Jul 1, 2015 at 9:00 AM, Alexandre Dufour wrote: > Hi, > > I am not familiar with the nitty-gritty of the wrapping aspects, but as a > Java-based user (icy.bioimageanalysis.org), I believe the issue has to do > with the fact that transferring some Java array down to a vtk structure > (via any setJavaArray() method) always(?) implies a copy of said structure > down to the C++ layer, hence the issue of duplication. This typically > happens when your data/image structure is first handled on the Java side, > then passed over to VTK for rendering purposes. > > Does this make sense? Is there any way around this? I doubted that for a > while, but then remembered the good old Unsafe class in Java that might > help do ?dirty but efficient? communication? > > My 2 (unexperienced) cents. Very excited about this anyhow!! > > Alexandre > > *?* > *Alexandre Dufour, PhD* > > *Senior Research Fellow @ **Biological Image Analysis* > * group* > *Institut Pasteur* *, **Dpt. of Cell Biology & > Infection, **Paris campus (France)* > *CNRS UMR 3691 ?Pathological and Physiological Cell Dynamics? * > > *Meet **Icy* *, the next-generation > Bioimage Informatics platform* > > On 30 Jun 2015, at 15:46, Utkarsh Ayachit > wrote: > > Gerrick, > > The *new* zero copy design literally started a week or two ago, so it is > in its infancy, but I will write a design document soon. It doesn't however > do anything new for access through wrapped languages. What exactly is your > use-case. I am not sure what aspect is lacking in the current > implementation in that regard. > > Utkarsh > > On Mon, Jun 29, 2015 at 6:04 PM Gerrick Bivins < > Gerrick.Bivins at halliburton.com> wrote: > >> ?* deprecate the existing zero copy array API in preparation for a >> significant refactoring that will come in 7.0. The refactor will make zero >> copy arrays both simpler to use and perform better.? >> >> >> >> Where can I find more information about this? >> >> Does the ?Zero copy array refactor? expose this framework to wrapped >> languages, Java in particular? >> >> Currently the duplication of data is one of the things holding up >> adoption of VTK in our application. >> >> >> >> Gerrick >> >> >> >> *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On >> Behalf Of *David E DeMarle >> *Sent:* Monday, June 29, 2015 9:42 AM >> *To:* vtkdev; vtkusers at vtk.org >> *Subject:* [EXTERNAL] [vtk-developers] vtk 6.3 and vtk 7.0 >> >> >> >> Hey vtkers, >> >> >> >> We are hoping to do a vtk 6.3 release in the next couple of weeks and >> then immediately follow that up with a 7.0 release. >> >> >> >> We'd are putting out a 6.3 out in order to: >> >> * deprecate the existing zero copy array API in preparation for a >> significant refactoring that will come in 7.0. The refactor will make zero >> copy arrays both simpler to use and perform better. >> >> * package up all of the progress that has been made in the master >> branch's OpenGL2 surface and volume rendering. The vtkpython binaries will >> switch over to using the OpenGL2 back end this release. >> >> >> >> Please let us know if you have any feedback, critical bugs especially, >> and developers let us know if there is any work you have in a partially >> finished state that we should be sure to get into 6.3. >> >> >> >> If all goes well we'll have a release candidate for 6.3 next week. >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> This e-mail, including any attached files, may contain confidential >> and privileged information for the sole use of the intended recipient. Any >> review, use, distribution, or disclosure by others is strictly prohibited. >> If you are not the intended recipient (or authorized to receive information >> for the intended recipient), please contact the sender by reply e-mail and >> delete all copies of this message. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> _______________________________________________ > 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 dhoppes at mbfbioscience.com Wed Jul 1 09:57:26 2015 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Wed, 1 Jul 2015 13:57:26 +0000 Subject: [vtkusers] Vtkglyph3dmapper and colors/transparency Message-ID: <46CB11F12B9DC24D860D4082451B318A14F694A7@exchange3.microbrightfield.com> Is there a way to set the colors for different points in a glyph? The examples show that it can be done for the vtkglyph3D but don't see any reference for the ability for the mapper. In reality, I want to adjust the transparency level of different points in the glyph and the only way that I know to do this is to change the alpha channel of the color of the glyph point. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor.lists at gmail.com Wed Jul 1 10:52:55 2015 From: goodwin.lawlor.lists at gmail.com (Goodwin Lawlor) Date: Wed, 1 Jul 2015 15:52:55 +0100 Subject: [vtkusers] vtk 6.1 TCL Wrapping problem In-Reply-To: References: Message-ID: Hi Stephan, I've got a repo on github that updates building VTK tclkits here: https://github.com/glawlor/vtkit At the moment it builds with VTK5.x for win/linux/mac I'll update it to build with VTK 6.x - the change in v6.x to a modular VTK build breaks from v5.x. Thanks, Goodwin On Wed, Jun 24, 2015 at 5:50 PM, Franke, Stephan wrote: > Hello, > > > > I try to buid a tclkit with vtk 6.1 and tcl/tk 8.5.18 under windows 8 for > the x64 architecture. > > I had done this with vtk 5.8 and tcl/tk 8.5.18 without problems. > > > > Now when I compile and link my tclkit against vtk 6.1 I get this > unresolved externals: > > > > 2>------ Build started: Project: tclkit, Configuration: Release x64 ------ > > 2>kitInit.obj : error LNK2001: unresolved external symbol Vtkcommontcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkfilteringtcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkgraphicstcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol Vtkiotcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkimagingtcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkwidgetstcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkvolumerenderingtcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkrenderingtcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol Vtkhybridtcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkparalleltcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol > Vtkinfovistcl_Init > > 2>kitInit.obj : error LNK2001: unresolved external symbol Vtkviewstcl_Init > > > > Did someone know what is missing here? > > Which vtk library contains these external symbols? > > Is there something that had changed since vtk 5.8, because with this > version I can build my vtk-tclkit. > > That you very much in advance for your help. > > > > Best regards, > > Stephan Franke > > _______________________________________________ > 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 Gerrick.Bivins at halliburton.com Wed Jul 1 11:44:51 2015 From: Gerrick.Bivins at halliburton.com (Gerrick Bivins) Date: Wed, 1 Jul 2015 15:44:51 +0000 Subject: [vtkusers] [vtk-developers] [EXTERNAL] vtk 6.3 and vtk 7.0 In-Reply-To: References: Message-ID: Is there some way that java.nio API?s can help here? Possibly the ByteBuffer or MappedByteBuffer: http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html http://docs.oracle.com/javase/8/docs/api/java/nio/MappedByteBuffer.html Gerrick From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Berk Geveci Sent: Wednesday, July 01, 2015 9:03 AM To: Alexandre Dufour Cc: vtkdev; vtkusers at vtk.org Subject: Re: [vtkusers] [vtk-developers] [EXTERNAL] vtk 6.3 and vtk 7.0 I am fairly novice in Java so I apologize if this sounds naive. Doesn't Java do its own memory management and actually automatically move data from one memory location to another? How does one map a Java array to a C++ array and make sure that it is not moved and of course garbage collected? Interfacing to numpy arrays works fine because Python provides a buffer interface where it is guaranteed that a Python object holds a buffer (an array essentially) that does not move. The Python wrappers simply expose a functionality that allows the C++ layer to get a pointer from a buffer object. Then this array can simply be passed to any C++ method that takes an array. This is the only efficient way of sharing array between the two layers. Doing a "zero copy" array where each array access such as GetTuple() goes through a Java layer would be terribly inefficient and impractical. Best, -berk On Wed, Jul 1, 2015 at 9:00 AM, Alexandre Dufour > wrote: Hi, I am not familiar with the nitty-gritty of the wrapping aspects, but as a Java-based user (icy.bioimageanalysis.org), I believe the issue has to do with the fact that transferring some Java array down to a vtk structure (via any setJavaArray() method) always(?) implies a copy of said structure down to the C++ layer, hence the issue of duplication. This typically happens when your data/image structure is first handled on the Java side, then passed over to VTK for rendering purposes. Does this make sense? Is there any way around this? I doubted that for a while, but then remembered the good old Unsafe class in Java that might help do ?dirty but efficient? communication? My 2 (unexperienced) cents. Very excited about this anyhow!! Alexandre ? Alexandre Dufour, PhD Senior Research Fellow @ Biological Image Analysis group Institut Pasteur, Dpt. of Cell Biology & Infection, Paris campus (France) CNRS UMR 3691 ?Pathological and Physiological Cell Dynamics? Meet Icy, the next-generation Bioimage Informatics platform On 30 Jun 2015, at 15:46, Utkarsh Ayachit > wrote: Gerrick, The *new* zero copy design literally started a week or two ago, so it is in its infancy, but I will write a design document soon. It doesn't however do anything new for access through wrapped languages. What exactly is your use-case. I am not sure what aspect is lacking in the current implementation in that regard. Utkarsh On Mon, Jun 29, 2015 at 6:04 PM Gerrick Bivins > wrote: ?* deprecate the existing zero copy array API in preparation for a significant refactoring that will come in 7.0. The refactor will make zero copy arrays both simpler to use and perform better.? Where can I find more information about this? Does the ?Zero copy array refactor? expose this framework to wrapped languages, Java in particular? Currently the duplication of data is one of the things holding up adoption of VTK in our application. Gerrick From: vtk-developers [mailto:vtk-developers-bounces at vtk.org] On Behalf Of David E DeMarle Sent: Monday, June 29, 2015 9:42 AM To: vtkdev; vtkusers at vtk.org Subject: [EXTERNAL] [vtk-developers] vtk 6.3 and vtk 7.0 Hey vtkers, We are hoping to do a vtk 6.3 release in the next couple of weeks and then immediately follow that up with a 7.0 release. We'd are putting out a 6.3 out in order to: * deprecate the existing zero copy array API in preparation for a significant refactoring that will come in 7.0. The refactor will make zero copy arrays both simpler to use and perform better. * package up all of the progress that has been made in the master branch's OpenGL2 surface and volume rendering. The vtkpython binaries will switch over to using the OpenGL2 back end this release. Please let us know if you have any feedback, critical bugs especially, and developers let us know if there is any work you have in a partially finished state that we should be sure to get into 6.3. If all goes well we'll have a release candidate for 6.3 next week. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Search the list archives at: http://markmail.org/search/?q=vtk-developers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtk-developers _______________________________________________ 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 Wed Jul 1 15:30:48 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Wed, 1 Jul 2015 12:30:48 -0700 (MST) Subject: [vtkusers] Move RenderWindow-> SetParentID(); Message-ID: <1435779048431-5732655.post@n5.nabble.com> I'm using panel in C ++ / CLI as a parent of a renderWindow; renderWindow-> SetParentId (Panel-> Handle.ToPointer ()); The problem is that I want to pass it to another panel, but it always remains in first. Once you set a father to renderWindow is possible to exchange it for other parent? -- View this message in context: http://vtk.1045678.n5.nabble.com/Move-RenderWindow-SetParentID-tp5732655.html Sent from the VTK - Users mailing list archive at Nabble.com. From sayanmaity.10 at gmail.com Wed Jul 1 18:06:32 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Wed, 1 Jul 2015 15:06:32 -0700 (MST) Subject: [vtkusers] Help needed...Rendering 3D volume/structure using series of 2D images with defined contour Message-ID: <1435788392255-5732656.post@n5.nabble.com> Hi, I am newbie to VTK. I need to Render 3D volume/structure using series of 2D binary-images, with defined contour on them and I also have the contour association information on the successive 2D image slides. Goal is to interpolate 'z' axis connectivity and then render 3D volume/structure of the connected contours throughout the entire 2D binary-image slides. Just wondering if any one of you could link me to some documentation or example scripts of Using VTK C++ libraries. Thank you for your time. -- View this message in context: http://vtk.1045678.n5.nabble.com/Help-needed-Rendering-3D-volume-structure-using-series-of-2D-images-with-defined-contour-tp5732656.html Sent from the VTK - Users mailing list archive at Nabble.com. From mgesho at uwyo.edu Wed Jul 1 20:08:12 2015 From: mgesho at uwyo.edu (Masakazu Gesho) Date: Thu, 2 Jul 2015 00:08:12 +0000 Subject: [vtkusers] Using ITK with VTK and BGL Message-ID: I used VTK and BGL for the project. Now I would like to add ITK package on top of VTK and BGL. When I added ITK package in the CMakeLists.txt with gluing VTK, I obtained the following error of which I did not see without ITK. fatal error: vtkBoostConnectedComponents.h: No such file or directory #include I use: Cmake2.8 VTK 6.1 with MPI ITK 4.7 BGL 1.55 Thank you for our help. Masakazu Gesho University of Wyoming PhD Petroleum & Chemical Engineering -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Wed Jul 1 23:49:35 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Wed, 1 Jul 2015 20:49:35 -0700 Subject: [vtkusers] [vtk-developers] VTK Roadmap In-Reply-To: References: Message-ID: As a user I think VTK during last 2 major releases acquired performance issues which makes it very difficult if not impossible to use for my needs as a developer of CAD type applications. Let me explain. Typical CAD application functionality can be demonstrated on the building model. Building consists of a few type of structural components: columns, beams, slabs and walls. Geometry of such component is defined by different attributes. For column for example it might be section shape, cross-section dimension, etc. User of the CAD system should be able to select/pick components on the screen, change such component attributes and should see geometry change on the screen fast enough. Lets say we want to create 60 story building with 100 rooms per floor. This gives us 6000 components or about 50k rectangular cells. With vtk developer basically has 2 choices of the implementation: 1) minimize number of actors. Lets say actor for whole building. In such case every component geometry is appended to the building polydata. So finally you have only 1 dataset, 1 mapper and 1 actor. 2) create actor per component. In this case you have 1 dataset, 1 mapper and 1 actor per component. Unfortunately neither approach works well for CAD application when model has to be editable by user. At least not with VTK 6.0.1. Comparison of usage cases: - when you need to re-generate whole model geometry (for example file withy model description loaded). Approach 1 demonstrates better performance even though it requires additional append filter execution. Approach 2 is slow - from 6 to 10 times slower. For a building described above it would be 7-8 sec for Approach 1 and 30-40 sec for approach 2 on my system. - when you need to modify a single component and update presentation. Approach 1 takes basically the same time as regenerate model from the scratch. It takes basically the same time as regenerate model from the scratch. But 7 sec are not acceptable anymore. Modification of the dataset itself takes no time. All time is taken by vtk pipeline. So basically there is no way for improvement. - picking/selection components. Approach 1 is slow. Keep in mind that user have to select components, not cells. So in this case you have to add to cell field which would allow to keep track which component picked cells belong to. Then selection is equivalent of adding data field to polydata and after picking setting value to such field for all cells which belong to that component. This is definitely slower than for Approach 2. When all you need to keep tracking and select appropriate actor . Approach 2 is very fast(less than second). User would might be able to survive slow initial model loading, if there were not any other differences. Unfortunately when you look at the application memory usage such model when approach 2 is used will take over 1.5 GB of memory when in case of approach 1 just about 140k. That is for single view. You would not be able to display such model in 2 views on 32 bit Windows. That is counting that you static mode and ImmediateModeRenderingOn were set for mapper, and no intermediate filters are stored ( vtkPolydata -> Mapper -> actor pipeline is used). With number of components increasing memory usage and time grow. So basically described above model is about as big editable model as VTK can handle without user breaking monitor after 30 min of work. For comparison I was using hoops3d (1998-2000) for developing of 3D FEM pre-, post-processing application with similar capabilities. 15 years ago on the appropriate systems I've seen better performance. Also I believe that 10 years ago VTK did not require such memory to display such size of data with exactly the same pipeline. I blame changes in vtk 5 and 6. As a conclusion I afraid vtk 6 is not useable if you have to deal with dynamic changeable systems of average size on a single computer. I wish that was targeted. If not in vtk 6, may be in vtk7. On Tue, Jun 30, 2015 at 1:24 PM, Berk Geveci wrote: > Yup. Python 3 is now on the roadmap. Probably the first release after 7, > in a few months. > > -berk > > On Tue, Jun 30, 2015 at 3:48 PM, David Gobbi > wrote: > >> On Tue, Jun 30, 2015 at 12:47 PM, Matthew Brett >> wrote: >> >>> Hi, >>> >>> On Tue, Jun 30, 2015 at 10:58 AM, 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. >>> >>> I would like to put in a humble plea to add Python 3 compatibility to >>> that list: >>> >>> http://astrofrog.github.io/blog/2015/05/09/2015-survey-results >> >> >> Python 3 is being worked on (right now by me, and others can join in a >> couple weeks once the core pieces are in place). No, it won't be part of >> 6.3, however. >> >> - David >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> > > _______________________________________________ > 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 madaramh at gmail.com Thu Jul 2 02:57:33 2015 From: madaramh at gmail.com (madz) Date: Wed, 1 Jul 2015 23:57:33 -0700 (MST) Subject: [vtkusers] Error in vtkTextActor when creating a vtkScalarBarActor with no title In-Reply-To: References: Message-ID: <1435820253076-5732659.post@n5.nabble.com> Hi, I'm getting the same error and was wondering if you can show the solution. The link you have posted is no longer working. -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-in-vtkTextActor-when-creating-a-vtkScalarBarActor-with-no-title-tp5730738p5732659.html Sent from the VTK - Users mailing list archive at Nabble.com. From F.Thevissen at apodius.de Thu Jul 2 03:07:07 2015 From: F.Thevissen at apodius.de (=?UTF-8?Q?Florian_Thevi=c3=9fen?=) Date: Thu, 2 Jul 2015 09:07:07 +0200 Subject: [vtkusers] Compiling VTK DLLs with -gd suffix? In-Reply-To: References: <5593DC4D.4030805@apodius.de> Message-ID: <5594E31B.7060103@apodius.de> Hi Cory, Thanks for your answer! The project I set-up is a simple point-cloud visualizer, following the tutorial here: http://pointclouds.org/documentation/tutorials/qt_visualizer.php . The source files including the CmakeLists.txt can be found here: https://github.com/PointCloudLibrary/pcl/tree/master/doc/tutorials/content/sources/qt_visualizer . I cmake-gui'd the CMakeLists and created both a Visual Studio 2013 64bit project, and a set of Makefiles to use with nmake. I can build the qt_visualizer both ways with the same results, so both from within Visual Studio and from a command-line. When I configure a debug-build, I get the request for the -gd dlls. Best regards, Florian Am 01.07.2015 um 15:29 schrieb Cory Quammen: > Florian, > > What kind of project did you set up? In other words, what software is > requesting the -gd suffix? > > Thanks, > Cory > > On Wed, Jul 1, 2015 at 8:25 AM, Florian Thevi?en > > wrote: > > Hello everyone, > > I have the problem that the project I just setup requests two > different "types" of DLLs depending on the configuration. For > example, for the release configuration, the file > > > vtkCommonColor-6.2.dll > > is, among others, requested. I point the environment via an > adjusted Path variable to the destination where the dll is > located, and I can run the executable. However, when I try to > debug, the file > > > vtkCommonColor-6.2-gd.dll > > is, among others, requested. The problem is, that I do not have > these files with the -gd suffix, and I do not seem to be able to > create them by compiling VTK via VS2013. Maybe I am missing > something obvious, but having tried to fix this for quite a whil > today, I'm starting to suspect that it's not... > > Best regards, > Florian > > > > > _______________________________________________ > 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 gustav.lundin at saabgroup.com Thu Jul 2 03:44:04 2015 From: gustav.lundin at saabgroup.com (quadprob) Date: Thu, 2 Jul 2015 00:44:04 -0700 (MST) Subject: [vtkusers] Swing Integration Message-ID: <1435823044808-5732661.post@n5.nabble.com> Hi, I'm trying to integrate vtk into my swing application. However, the method shown in the examples renders very slowly and also renders the faces as see through regardless of opacity settings. The effect is easier to observe when rendering a cube instead of a sphere. I have been able to workaround this by starting the renderWindowInteractor . Starting the interactor makes it render much quicker and removes the see-through effect, however, it also causes a second window to be created. It's hidden behind the main window and closes when it closes but becomes visible if you move the main window. I'd like the positive effects of the interactor without having to suffer the second window. How would I accomplish this? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Swing-Integration-tp5732661.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.lonie at kitware.com Thu Jul 2 08:18:08 2015 From: david.lonie at kitware.com (David Lonie) Date: Thu, 2 Jul 2015 08:18:08 -0400 Subject: [vtkusers] Error in vtkTextActor when creating a vtkScalarBarActor with no title In-Reply-To: <1435820253076-5732659.post@n5.nabble.com> References: <1435820253076-5732659.post@n5.nabble.com> Message-ID: The link was to a patch that fixed the problem, and the patch is now merged into the VTK master branch. The problem will go away in the next release. Hope this helps, Dave On Thu, Jul 2, 2015 at 2:57 AM, madz wrote: > Hi, > I'm getting the same error and was wondering if you can show the solution. > The link you have posted is no longer working. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Error-in-vtkTextActor-when-creating-a-vtkScalarBarActor-with-no-title-tp5730738p5732659.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.lonie at kitware.com Thu Jul 2 08:20:53 2015 From: david.lonie at kitware.com (David Lonie) Date: Thu, 2 Jul 2015 08:20:53 -0400 Subject: [vtkusers] Error in vtkTextActor when creating a vtkScalarBarActor with no title In-Reply-To: References: <1435820253076-5732659.post@n5.nabble.com> Message-ID: BTW, here is the patch that was needed: https://gitlab.kitware.com/vtk/vtk/commit/4d07c85e74a3458422faf900e56987983b943fb0 On Thu, Jul 2, 2015 at 8:18 AM, David Lonie wrote: > The link was to a patch that fixed the problem, and the patch is now > merged into the VTK master branch. The problem will go away in the next > release. > > Hope this helps, > Dave > > On Thu, Jul 2, 2015 at 2:57 AM, madz wrote: > >> Hi, >> I'm getting the same error and was wondering if you can show the solution. >> The link you have posted is no longer working. >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Error-in-vtkTextActor-when-creating-a-vtkScalarBarActor-with-no-title-tp5730738p5732659.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 Thu Jul 2 08:25:07 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Thu, 2 Jul 2015 17:55:07 +0530 Subject: [vtkusers] Color Look up table not working for vtkDataSetMapper using vtkNetCDFCFReader Message-ID: Hi, I am working on ocean data visualization. I have data in netCdf format. I have written a code to read netcdf file and assign color for the input. Although, I am able to get grid display, but I am unable to get the coloring on it. I have created lookup table for color mapping, but it is not working.. Please help me. Following is my code... ======================================================== from vtk import * reader = vtkNetCDFCFReader() reader.SetFileName("3d.nc") reader.SphericalCoordinatesOff() #reader.SetOutputTypeToRectilinear() reader.SetOutputType(6)#SetOutputTypeToRectilinear() reader.SetReplaceFillValueWithNan(1) reader.UpdateMetaData() reader.Update() reader.GetOutput().UpdateInformation() output = reader.GetOutput() # find the range of the point scalars a,b = reader.GetOutput().GetPointData().GetArray("SAL").GetRange() nm = reader.GetOutput().GetPointData().GetArray("SAL").GetName() # show how to print a string in python, it is similar to C-style sprintf print "Range of %s: %4.2f-%4.2f" %(nm,a,b) # transfer function (lookup table) for mapping point scalar data # to colors (parent class is vtkScalarsToColors) lut = vtk.vtkColorTransferFunction() lut.AddRGBPoint(a, 0.0, 0.0, 1.0) 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.SetAlpha(0.5) mapper = vtkDataSetMapper() mapper.SetInputConnection(reader.GetOutputPort()) mapper.SetScalarModeToUsePointData() mapper.SetLookupTable(lut) mapper.SetScalarRange(a,b) mapper.SelectColorArray("SAL"); # the actor myActor = vtkActor() myActor.SetMapper( mapper ) # renderer and render window ren = vtkRenderer() ren.SetBackground(1, 1, 1) renWin = vtk.vtkRenderWindow() renWin.SetSize(512, 512) renWin.AddRenderer( ren ) # render window interactor iren = vtkRenderWindowInteractor() iren.SetRenderWindow( renWin ) # add the actors to the renderer ren.AddActor( myActor ) # render renWin.Render() # initialize and start the interactor iren.Initialize() iren.Start() ====================================================== Thanks and Regards, Manjunath -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Thu Jul 2 09:01:27 2015 From: david.thompson at kitware.com (David Thompson) Date: Thu, 2 Jul 2015 09:01:27 -0400 Subject: [vtkusers] [vtk-developers] VTK Roadmap In-Reply-To: References: Message-ID: <2CE400AE-BADE-42F0-94B8-C693F222147C@kitware.com> Hi Alex, I think there is a third option that would be much more usable; generating a multiblock dataset that uses a single actor and mapper, but in which each block can be independently replaced with an edited version. As long as the source only regenerates a small number of leaf nodes, this would not have a large impact on memory, rendering, or picking performance. David On Jul 1, 2015, at 11:49 PM, Alex Malyushytskyy wrote: > As a user I think VTK during last 2 major releases acquired performance issues which makes it very difficult if not impossible to use for my needs as a developer of CAD type applications. > > Let me explain. Typical CAD application functionality can be demonstrated on the building model. > Building consists of a few type of structural components: columns, beams, slabs and walls. > Geometry of such component is defined by different attributes. For column for example it might be section shape, cross-section dimension, etc. > User of the CAD system should be able to select/pick components on the screen, change such component attributes and should see geometry change on the screen fast enough. > > Lets say we want to create 60 story building with 100 rooms per floor. > This gives us 6000 components or about 50k rectangular cells. > > With vtk developer basically has 2 choices of the implementation: > 1) minimize number of actors. Lets say actor for whole building. In such case every component geometry is appended to the building polydata. So finally you have only 1 dataset, 1 mapper and 1 actor. > 2) create actor per component. In this case you have 1 dataset, 1 mapper and 1 actor per component. > > Unfortunately neither approach works well for CAD application when model has to be editable by user. At least not with VTK 6.0.1. > > Comparison of usage cases: > > - when you need to re-generate whole model geometry (for example file withy model description loaded). > Approach 1 demonstrates better performance even though it requires additional append filter execution. > Approach 2 is slow - from 6 to 10 times slower. For a building described above it would be 7-8 sec for Approach 1 and 30-40 sec for approach 2 on my system. > > - when you need to modify a single component and update presentation. > > Approach 1 takes basically the same time as regenerate model from the scratch. > It takes basically the same time as regenerate model from the scratch. > But 7 sec are not acceptable anymore. > Modification of the dataset itself takes no time. All time is taken by vtk pipeline. > So basically there is no way for improvement. > > - picking/selection components. > Approach 1 is slow. Keep in mind that user have to select components, not cells. > So in this case you have to add to cell field which would allow to keep track which component picked cells belong to. Then selection is equivalent of adding data field to polydata and after picking setting value to such field for all cells which belong to that component. > This is definitely slower than for Approach 2. When all you need to keep tracking and select appropriate actor . > > > Approach 2 is very fast(less than second). > User would might be able to survive slow initial model loading, > if there were not any other differences. > > Unfortunately when you look at the application memory usage such model when approach 2 is used will take over 1.5 GB of memory when in case of approach 1 just about 140k. > That is for single view. You would not be able to display such model in 2 views on 32 bit Windows. > > > That is counting that you static mode and ImmediateModeRenderingOn were set for mapper, > and no intermediate filters are stored ( vtkPolydata -> Mapper -> actor pipeline is used). > > With number of components increasing memory usage and time grow. > So basically described above model is about as big editable model as VTK can handle without user breaking monitor after 30 min of work. > > For comparison I was using hoops3d (1998-2000) for developing of 3D FEM pre-, post-processing application with similar capabilities. 15 years ago on the appropriate systems I've seen better performance. Also I believe that 10 years ago VTK did not require such memory to display such size of data with exactly the same pipeline. > I blame changes in vtk 5 and 6. > > As a conclusion I afraid vtk 6 is not useable if you have to deal with dynamic changeable systems of average size on a single computer. > > I wish that was targeted. If not in vtk 6, may be in vtk7. > > > On Tue, Jun 30, 2015 at 1:24 PM, Berk Geveci wrote: > Yup. Python 3 is now on the roadmap. Probably the first release after 7, in a few months. > > -berk > > On Tue, Jun 30, 2015 at 3:48 PM, David Gobbi wrote: > On Tue, Jun 30, 2015 at 12:47 PM, Matthew Brett wrote: > Hi, > > On Tue, Jun 30, 2015 at 10:58 AM, 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. > > I would like to put in a humble plea to add Python 3 compatibility to that list: > > http://astrofrog.github.io/blog/2015/05/09/2015-survey-results > > Python 3 is being worked on (right now by me, and others can join in a couple weeks once the core pieces are in place). No, it won't be part of 6.3, however. > > - David > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > > > _______________________________________________ > 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 From berk.geveci at kitware.com Thu Jul 2 09:20:44 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 2 Jul 2015 09:20:44 -0400 Subject: [vtkusers] [vtk-developers] VTK Roadmap In-Reply-To: <2CE400AE-BADE-42F0-94B8-C693F222147C@kitware.com> References: <2CE400AE-BADE-42F0-94B8-C693F222147C@kitware.com> Message-ID: I agree with David. This is currently the best path for scene graph style use, especially combined with the OpenGL2 backend. This will be available in VTK 6.3 and VTK 7 but continues to evolve. So please let us know if you run into issues, performance or otherwise. We also discussed developing a full-featured scene graph actor but it was not a high priority. VTK's major use cases center around a few large geometry objects or a large number of small objects that have related properties coming from a point/cell array (molecules, tensors etc.) However, we will continue to add more scene graph style capabilities to multi-block rendering. Probably including transform support per block, inheritance of properties from an upper node etc. Best, -berk On Thu, Jul 2, 2015 at 9:01 AM, David Thompson wrote: > Hi Alex, > > I think there is a third option that would be much more usable; generating > a multiblock dataset that uses a single actor and mapper, but in which each > block can be independently replaced with an edited version. As long as the > source only regenerates a small number of leaf nodes, this would not have a > large impact on memory, rendering, or picking performance. > > David > > On Jul 1, 2015, at 11:49 PM, Alex Malyushytskyy > wrote: > > > As a user I think VTK during last 2 major releases acquired performance > issues which makes it very difficult if not impossible to use for my needs > as a developer of CAD type applications. > > > > Let me explain. Typical CAD application functionality can be > demonstrated on the building model. > > Building consists of a few type of structural components: columns, > beams, slabs and walls. > > Geometry of such component is defined by different attributes. For > column for example it might be section shape, cross-section dimension, etc. > > User of the CAD system should be able to select/pick components on the > screen, change such component attributes and should see geometry change on > the screen fast enough. > > > > Lets say we want to create 60 story building with 100 rooms per floor. > > This gives us 6000 components or about 50k rectangular cells. > > > > With vtk developer basically has 2 choices of the implementation: > > 1) minimize number of actors. Lets say actor for whole building. In > such case every component geometry is appended to the building polydata. So > finally you have only 1 dataset, 1 mapper and 1 actor. > > 2) create actor per component. In this case you have 1 dataset, 1 mapper > and 1 actor per component. > > > > Unfortunately neither approach works well for CAD application when model > has to be editable by user. At least not with VTK 6.0.1. > > > > Comparison of usage cases: > > > > - when you need to re-generate whole model geometry (for example file > withy model description loaded). > > Approach 1 demonstrates better performance even though it requires > additional append filter execution. > > Approach 2 is slow - from 6 to 10 times slower. For a building > described above it would be 7-8 sec for Approach 1 and 30-40 sec for > approach 2 on my system. > > > > - when you need to modify a single component and update presentation. > > > > Approach 1 takes basically the same time as regenerate model from the > scratch. > > It takes basically the same time as regenerate model from the scratch. > > But 7 sec are not acceptable anymore. > > Modification of the dataset itself takes no time. All time is taken by > vtk pipeline. > > So basically there is no way for improvement. > > > > - picking/selection components. > > Approach 1 is slow. Keep in mind that user have to select components, > not cells. > > So in this case you have to add to cell field which would allow to keep > track which component picked cells belong to. Then selection is equivalent > of adding data field to polydata and after picking setting value to such > field for all cells which belong to that component. > > This is definitely slower than for Approach 2. When all you need to keep > tracking and select appropriate actor . > > > > > > Approach 2 is very fast(less than second). > > User would might be able to survive slow initial model loading, > > if there were not any other differences. > > > > Unfortunately when you look at the application memory usage such model > when approach 2 is used will take over 1.5 GB of memory when in case of > approach 1 just about 140k. > > That is for single view. You would not be able to display such model in > 2 views on 32 bit Windows. > > > > > > That is counting that you static mode and ImmediateModeRenderingOn were > set for mapper, > > and no intermediate filters are stored ( vtkPolydata -> Mapper -> actor > pipeline is used). > > > > With number of components increasing memory usage and time grow. > > So basically described above model is about as big editable model as VTK > can handle without user breaking monitor after 30 min of work. > > > > For comparison I was using hoops3d (1998-2000) for developing of 3D FEM > pre-, post-processing application with similar capabilities. 15 years ago > on the appropriate systems I've seen better performance. Also I believe > that 10 years ago VTK did not require such memory to display such size of > data with exactly the same pipeline. > > I blame changes in vtk 5 and 6. > > > > As a conclusion I afraid vtk 6 is not useable if you have to deal with > dynamic changeable systems of average size on a single computer. > > > > I wish that was targeted. If not in vtk 6, may be in vtk7. > > > > > > On Tue, Jun 30, 2015 at 1:24 PM, Berk Geveci > wrote: > > Yup. Python 3 is now on the roadmap. Probably the first release after > 7, in a few months. > > > > -berk > > > > On Tue, Jun 30, 2015 at 3:48 PM, David Gobbi > wrote: > > On Tue, Jun 30, 2015 at 12:47 PM, Matthew Brett > wrote: > > Hi, > > > > On Tue, Jun 30, 2015 at 10:58 AM, 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. > > > > I would like to put in a humble plea to add Python 3 compatibility to > that list: > > > > http://astrofrog.github.io/blog/2015/05/09/2015-survey-results > > > > Python 3 is being worked on (right now by me, and others can join in a > couple weeks once the core pieces are in place). No, it won't be part of > 6.3, however. > > > > - David > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Search the list archives at: > http://markmail.org/search/?q=vtk-developers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtk-developers > > > > > > > > > > _______________________________________________ > > 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 > > _______________________________________________ > 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 mightos at gmail.com Thu Jul 2 10:06:45 2015 From: mightos at gmail.com (mightos) Date: Thu, 2 Jul 2015 07:06:45 -0700 (MST) Subject: [vtkusers] How to combine multiple arrays ? Message-ID: <1435846005816-5732676.post@n5.nabble.com> Hello, I'm working with multiple arrays and I can't figure out how to combine them. *This is what I have :* /Array1, Type Double, 3 Components:/ X11 | Y11 | Z11 X12 | Y12 | Z12 X13 | Y13 | Z13 . . . /Array2, Type Double, 3 Components:/ X21 | Y21 | Z21 X22 | Y22 | Z22 X23 | Y23 | Z23 . . . *This is what I want in the end :* /Array3, Type Double, 3 Components:/ X11*cos(a)+X21*sin(a) | Y11*cos(a)+Y21*sin(a) | Z11*cos(a)+Z21*sin(a) X12*cos(a)+X22*sin(a) | Y12*cos(a)+Y22*sin(a) | Z12*cos(a)+Z22*sin(a) X13*cos(a)+X23*sin(a) | Y13*cos(a)+Y23*sin(a) | Z13*cos(a)+Z23*sin(a) . . . Do you know how I can handle this ? Thank you in advance :) -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-combine-multiple-arrays-tp5732676.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Jul 2 10:12:58 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 2 Jul 2015 10:12:58 -0400 Subject: [vtkusers] How to combine multiple arrays ? In-Reply-To: <1435846005816-5732676.post@n5.nabble.com> References: <1435846005816-5732676.post@n5.nabble.com> Message-ID: You could try the vtkProgrammableFilter [1] or the vtkArrayFilter [2]. Examples for both are available on their respective Doxygen pages (just search for Examples:). Best regards, Cory [1] http://www.vtk.org/doc/release/6.2/html/classvtkProgrammableFilter.html [2] http://www.vtk.org/doc/release/6.2/html/classvtkArrayCalculator.html On Thu, Jul 2, 2015 at 10:06 AM, mightos wrote: > Hello, > > I'm working with multiple arrays and I can't figure out how to combine > them. > > *This is what I have :* > > /Array1, Type Double, 3 Components:/ > X11 | Y11 | Z11 > X12 | Y12 | Z12 > X13 | Y13 | Z13 > . > . > . > > /Array2, Type Double, 3 Components:/ > X21 | Y21 | Z21 > X22 | Y22 | Z22 > X23 | Y23 | Z23 > . > . > . > > *This is what I want in the end :* > > /Array3, Type Double, 3 Components:/ > X11*cos(a)+X21*sin(a) | Y11*cos(a)+Y21*sin(a) | Z11*cos(a)+Z21*sin(a) > X12*cos(a)+X22*sin(a) | Y12*cos(a)+Y22*sin(a) | Z12*cos(a)+Z22*sin(a) > X13*cos(a)+X23*sin(a) | Y13*cos(a)+Y23*sin(a) | Z13*cos(a)+Z23*sin(a) > . > . > . > > > Do you know how I can handle this ? > > Thank you in advance :) > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-combine-multiple-arrays-tp5732676.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 mightos at gmail.com Thu Jul 2 10:27:31 2015 From: mightos at gmail.com (mightos) Date: Thu, 2 Jul 2015 07:27:31 -0700 (MST) Subject: [vtkusers] How to combine multiple arrays ? In-Reply-To: References: <1435846005816-5732676.post@n5.nabble.com> Message-ID: <1435847251027-5732679.post@n5.nabble.com> Thanks. The *vtkArrayCalculator* seems like a good solution indeed (I've never used vtkProgrammableFilter but I'll take a look at it also). One last question though, even if I use *multicomponent *arrays in the vtkArrayCalculator Function, I always get a array with* one *component only. Is there a way to get a multicomponent array as an output ? Or should I use 3 vtkArrayCalculator (one for X, one for Y and the last one for Z) and then recombine the 3 outputs into a multicomponent array ? If I have to recombine I'll still be stuck on that operation (which is just basically appending 3 columns) Thank you for your help. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-combine-multiple-arrays-tp5732676p5732679.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Jul 2 10:31:53 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 2 Jul 2015 10:31:53 -0400 Subject: [vtkusers] How to combine multiple arrays ? In-Reply-To: <1435847251027-5732679.post@n5.nabble.com> References: <1435846005816-5732676.post@n5.nabble.com> <1435847251027-5732679.post@n5.nabble.com> Message-ID: You should be able to multiply your components by the iHat, jHat, and kHat unit vectors to get a 3-tuple output array, e.g., (X11*cos(a)+X21*sin(a)*iHat) + (Y11*cos(a)+Y21*sin(a)*jHat) + ( Z11*cos(a)+Z21*sin(a))*kHat iHat represents the vector (1, 0 0), jHat represents (0, 1, 0), and kHat represents (0, 0, 1). HTH, Cory On Thu, Jul 2, 2015 at 10:27 AM, mightos wrote: > Thanks. > > The *vtkArrayCalculator* seems like a good solution indeed (I've never used > vtkProgrammableFilter but I'll take a look at it also). > > One last question though, even if I use *multicomponent *arrays in the > vtkArrayCalculator Function, I always get a array with* one *component > only. > > Is there a way to get a multicomponent array as an output ? > Or should I use 3 vtkArrayCalculator (one for X, one for Y and the last one > for Z) and then recombine the 3 outputs into a multicomponent array ? > If I have to recombine I'll still be stuck on that operation (which is just > basically appending 3 columns) > > Thank you for your help. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-combine-multiple-arrays-tp5732676p5732679.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 mightos at gmail.com Thu Jul 2 10:37:26 2015 From: mightos at gmail.com (mightos) Date: Thu, 2 Jul 2015 07:37:26 -0700 (MST) Subject: [vtkusers] How to combine multiple arrays ? In-Reply-To: References: <1435846005816-5732676.post@n5.nabble.com> <1435847251027-5732679.post@n5.nabble.com> Message-ID: <1435847846360-5732682.post@n5.nabble.com> I didn't knew about the iHat, jHat and kHat. That's perfect ! Thank you a lot :) -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-combine-multiple-arrays-tp5732676p5732682.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Jul 2 10:45:18 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 2 Jul 2015 10:45:18 -0400 Subject: [vtkusers] How to combine multiple arrays ? In-Reply-To: <1435847846360-5732682.post@n5.nabble.com> References: <1435846005816-5732676.post@n5.nabble.com> <1435847251027-5732679.post@n5.nabble.com> <1435847846360-5732682.post@n5.nabble.com> Message-ID: Yeah, it's a nice little trick. You're welcome. Cory On Thu, Jul 2, 2015 at 10:37 AM, mightos wrote: > I didn't knew about the iHat, jHat and kHat. That's perfect ! > Thank you a lot :) > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-combine-multiple-arrays-tp5732676p5732682.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 waldo.valenzuela at hotmail.com Thu Jul 2 11:57:39 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Thu, 2 Jul 2015 17:57:39 +0200 Subject: [vtkusers] About sharing window/level values of vtkimageactor from 2D and 3D viewers Message-ID: Hi guys, I am having a problem to shared the values of window/level between a image actor of 2D viewer and 3D viewer, with the same values on both the colour image are different. I create the vtkimageactor like this: // Create a greyscale lookup table vtkSmartPointer table = vtkSmartPointer::New(); table->SetRange(0, 255); // image intensity range table->SetValueRange(0.0, 1.0); // from black to white table->SetSaturationRange(0.0, 0.0); // no color saturation table->SetRampToLinear(); table->Build(); m_imagemaper = VTKImageMapToWindowLevelColors::New(); m_imagemaper->SetLookupTable(table); m_imagemaper->SetInputConnection(resliceimage->GetOutputPort()); m_imagemaper->Update(); VTKImageActor m_imageactor3D = VTKImageActor::New(); #if VTK_MAJOR_VERSION <= 5 m_imageactor3D->SetInput(resliceimage->GetOutput()); #else m_imageactor3D->SetInputData(resliceimage->GetOutput()); #endif m_imageactor3D->GetMapper()->SetInputConnection(m_imagemaper->GetOutputPort()); m_imageactor3D->Update(); VTKImageActor m_imageactor2D = VTKImageActor::New(); #if VTK_MAJOR_VERSION <= 5 m_imageactor2D->SetInput(resliceimage->GetOutput()); #else m_imageactor2D->SetInputData(resliceimage->GetOutput()); #endif m_imageactor2D->GetMapper()->SetInputConnection(m_imagemaper->GetOutputPort()); m_imageactor2D->Update(); For 2D visualisation I set the interactor style to vtkInteractorStyleImage. and 3D visualisation I set the interactor to vtkInteractorStyleTrackballCamera. After, from the 2D viewer a get the window/level values like this: double window = this->CurrentImageProperty->GetColorWindow(); double level = this->CurrentImageProperty->GetColorLevel(); and set this values to 3D visualisation: vtkImageMapToWindowLevelColors *mapper = vtkImageMapToWindowLevelColors::SafeDownCast(m_imageactor3D->GetMapper()->GetInputAlgorithm()); if (mapper) { mapper->SetLevel(level); mapper->SetWindow(window); mapper->Update(); } But the problem is that colour (brightness and contrast) from 2D viewer is different from 3D viewer. I attached a screenshot of the problem. I really appreciate any help on this problem. Cheers, Waldo. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 3Dview.png Type: image/png Size: 91704 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2Dview.png Type: image/png Size: 26205 bytes Desc: not available URL: From sebastien.jourdain at kitware.com Thu Jul 2 12:22:38 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 2 Jul 2015 10:22:38 -0600 Subject: [vtkusers] Swing Integration In-Reply-To: <1435823044808-5732661.post@n5.nabble.com> References: <1435823044808-5732661.post@n5.nabble.com> Message-ID: Have you look at the examples application in Java that are inside the vtk.jar? Are you on Mac or are you using another platform? Seb On Thu, Jul 2, 2015 at 1:44 AM, quadprob wrote: > Hi, > I'm trying to integrate vtk into my swing application. However, the method > shown in the examples > > > renders very slowly and also renders the faces as see through regardless of > opacity settings. The effect is easier to observe when rendering a cube > instead of a sphere. > > I have been able to workaround this by starting the renderWindowInteractor > . Starting the interactor makes it render > much quicker and removes the see-through effect, however, it also causes a > second window to be created. It's hidden behind the main window and closes > when it closes but becomes visible if you move the main window. > > I'd like the positive effects of the interactor without having to suffer > the > second window. How would I accomplish this? > Thanks > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Swing-Integration-tp5732661.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 gustav.lundin at saabgroup.com Fri Jul 3 02:25:53 2015 From: gustav.lundin at saabgroup.com (quadprob) Date: Thu, 2 Jul 2015 23:25:53 -0700 (MST) Subject: [vtkusers] Swing Integration In-Reply-To: References: <1435823044808-5732661.post@n5.nabble.com> Message-ID: <1435904753487-5732695.post@n5.nabble.com> The examples all exhibit the same undesired behaviour that I described in my initial post. Also, I'm running Red Hat Linux. -- View this message in context: http://vtk.1045678.n5.nabble.com/Swing-Integration-tp5732661p5732695.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Fri Jul 3 04:50:25 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Fri, 3 Jul 2015 01:50:25 -0700 (MST) Subject: [vtkusers] updating vtkImageAccumulate Message-ID: <1435913425440-5732697.post@n5.nabble.com> i have a vtkImageData, which I would like to be able to calculate the max, min, average, etc. via vtkImageAccumulate. Then I want to be able to edit the image data, update the image accumulate and see the new statistics. However, it seems that vtkImageAccumulate doesn't work how I hoped it would. When I change my image data, my image accumulate still returns the original statistics of the image data before I made the changes. If I edit my image data, am I obliged to reinitialise my image accumulate to be able to see the statistics on the edited image data? I have attached a simple example of a matrix with one voxel=100 and whose max is found with imageaccumulate. Then, a voxel of 200 is added, imageaccumulate is updated, but returns a max of 100 instead of the new 200. Finally, a new imageaccumulate is used to verify that the actually max is 200 as expected. Any ideas of where I'm going wrong would be greatly appreciated. // create image data vtkSmartPointer id = vtkSmartPointer::New(); id->SetSpacing(1,1,1); id->SetExtent(0,99,0,99,0,99); id->AllocateScalars(VTK_DOUBLE,1); // set all values to zero for (int i=id->GetExtent()[0]; i<=id->GetExtent()[1]; i++) { for (int j=id->GetExtent()[2]; j<=id->GetExtent()[3]; j++) { for (int k=id->GetExtent()[4]; k<=id->GetExtent()[5]; k++) { double* voxel = static_cast(id->GetScalarPointer(i,j,k)); voxel[0] = 0; } } } // set one voxel value to 100 double* voxel = static_cast(id->GetScalarPointer(50,50,50)); voxel[0] = 100; // set image accumulate vtkSmartPointer ia = vtkSmartPointer::New(); ia->SetInputData(id); ia->SetComponentExtent(id->GetExtent()); ia->SetComponentOrigin(id->GetOrigin()); ia->SetComponentSpacing(id->GetSpacing()); ia->Update(); // output the max in the matrix (should be 100) std::cout << "max before change: " << ia->GetMax()[0] << std::endl; // change a different voxel to 200 voxel = static_cast(id->GetScalarPointer(50,50,60)); voxel[0] = 200; // update image accumulate ia->Update(); std::cout << "max after change (want this value to be 200): " << ia->GetMax()[0] << std::endl; // create second image accumulate to verify that the max is, as it should be, 200 vtkSmartPointer ia2 = vtkSmartPointer::New(); ia2->SetInputData(id); ia2->SetComponentExtent(id->GetExtent()); ia2->SetComponentOrigin(id->GetOrigin()); ia2->SetComponentSpacing(id->GetSpacing()); ia2->Update(); std::cout << "max with ia2 (should be 200): " << ia2->GetMax()[0] << std::endl; -- View this message in context: http://vtk.1045678.n5.nabble.com/updating-vtkImageAccumulate-tp5732697.html Sent from the VTK - Users mailing list archive at Nabble.com. From m.sambin at gmail.com Fri Jul 3 05:51:34 2015 From: m.sambin at gmail.com (Marco Sambin) Date: Fri, 3 Jul 2015 11:51:34 +0200 Subject: [vtkusers] vtkImageReslice and SetSlabNumberOfSlices(int) Message-ID: Hi all, with reference to this old question of mine (see below), I would like a clarification: suppose that the output z-spacing is set to 1 mm on my vtkImageReslice instance. Also, suppose that I call SetSlabNumberOfSlices(2) on my reslicer. Where will the 2 slices used to compute the slab image be located w.r.t. the position of my reslice plane? Will the first slice be 0.5 mm "above" and the second slice be 0.5 mm "below" my reslice plane? In other words, will the slices always be "centered" w.r.t. the position of my reslice plane? Maybe this is a silly question, but I like to exactly understand this point. Thanks in advance for the clarification. Regards, Marco On Mon, Mar 25, 2013 at 9:59 PM, Marco Sambin wrote: > Hi David, > > Thanks for the clarification. > I will test this soon. > Regards, > > Marco > Il giorno 25/mar/2013 14:24, "David Gobbi" ha > scritto: > >> Hi Marco, >> >> The way it works is this: vtkImageReslice is creating the slab by >> extracting N samples and combining them, where the distance between >> the samples is set by the third argument to SetOutputSpacing(). If >> the SlabNumberOfSlices is N, then the slab thickness is >> (N-1)*spacing[2] where spacing[2] is the z-spacing set with >> SetOutputSpacing(spacing[0],spacing[1],spacing[2]). >> >> Summary: thickness = (N - 1)*spacing[2] >> >> Slab mode is equivalent to extracting N slices and combining them. >> >> - David >> >> On Mon, Mar 25, 2013 at 6:01 AM, Marco Sambin wrote: >> > Hi all. >> > I am looking at implementing thick reformats through vtkImageReslice. >> > >> > Even after looking at the documentation, I did not fully understand the >> > SetSlabNumberOfSlices(int) method. For instance, in cases of an oblique >> > reformat, what is considered to be a "slice"? What defines the >> "thickness" >> > of a single slice, thus determining the total slab thickness resulting >> from >> > calling SetSlabNumberOfSlices(X)? >> > >> > I was expecting a call like SetSlabThickness(...), rather than >> > SetSlabNumberOfSlices(...). >> > >> > I would appreciate any comment on this. >> > Thanks in advance. >> > >> > Marco >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Jul 3 10:49:27 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 3 Jul 2015 10:49:27 -0400 Subject: [vtkusers] Missing pixel with vtkPolyDataMapper2D and vtkCoordinate In-Reply-To: References: Message-ID: Hi, Thank you for providing the complete code example that shows the problem. I compiled and ran it and see the same problem you report. Thanks also for your suggestion about what to modify. I tried adding 0.5 to the coordinates returned by this->TransformCoordinate->GetComputedDoubleViewportValue(), but this just led to blank pixels on the bottom of the window. I think this may indeed be a bug in the conversion from viewport coordinates to window coordinates. Right now, the transformation appears to be placing coordinates (1, 1) in the lower left corner of the upper right pixel, where I think it should be in the upper right corner of the pixel. When I modify vtkViewport::DisplayToNormalizedDisplay() to divide the u and v coordinates by size-1 instead of just size, the quad fills the window. This calculation should be putting the (1,1) coordinate in the upper right corner of the pixel. Would you mind posting this but on the bug tracker [1]? Thanks, Cory [1] http://www.vtk.org/Bug/view_all_bug_page.php On Wed, Jul 1, 2015 at 4:55 AM, Xabi Riobe wrote: > Here is an example and a screenshot to illustrate the issue. > > I'm wondering if the coordinates returned in > vtkOpenGLPolyDataMapper2D::RenderOverlay by the call to > this->TransformCoordinate->GetComputedDoubleViewportValue(viewport); > should be then shifted with the extra 0.5 to be in the center of the pixel > and not in the border. > > > #define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle, > vtkRenderingOpenGL, vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL) > > #include > #include > #include > #include > #include > #include > #include > #include > #include > > int main(int, char* []) > { > vtkSmartPointer ren1= vtkSmartPointer::New(); > vtkSmartPointer renWin= > vtkSmartPointer::New(); > renWin->SetSize( 1533, 792 ); > renWin->AddRenderer(ren1); > > vtkSmartPointer iren= > vtkSmartPointer::New(); > iren->SetRenderWindow(renWin); > > vtkSmartPointer source = > vtkSmartPointer::New(); > source->SetOrigin(0.0, 0.0, 0.0); > source->SetPoint1(1.0, 0.0, 0.0); > source->SetPoint2(0.0, 1.0, 0.0); > source->Update(); > > vtkSmartPointer scalars = > vtkSmartPointer::New(); > double bottom[3] = {255.0, 0, 0}; > double top[3] = {0, 255.0, 0}; > scalars->Initialize(); > scalars->SetNumberOfComponents(3); > scalars->SetNumberOfTuples(4); > scalars->InsertTuple(0, bottom); > scalars->InsertTuple(1, bottom); > scalars->InsertTuple(2, top); > scalars->InsertTuple(3, top); > source->GetOutput()->GetPointData()->SetScalars(scalars); > > vtkSmartPointer coordinateSystem = > vtkSmartPointer::New(); > coordinateSystem->SetCoordinateSystemToNormalizedViewport(); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(source->GetOutputPort()); > mapper->SetTransformCoordinate(coordinateSystem); > mapper->TransformCoordinateUseDoubleOn(); > > vtkSmartPointer actor2d = > vtkSmartPointer::New(); > actor2d->SetMapper(mapper); > > ren1->AddActor(actor2d); > > ren1->ResetCamera(); > renWin->Render(); > iren->Start(); > } > > [image: Images int?gr?es 1] > > 2015-06-30 18:18 GMT+02:00 Xabi Riobe : > >> Hi, >> >> I want to display a plane as a background. >> For that i have in a vtkActor2D a vtkPolyDataMapper2D filled with a >> vtkPlaneSource going from 0,0,0 to 1,1,1 >> I add to the mapper a vtkCoordinate with >> SetCoordinateSystemToNormalizedViewport >> >> with that, everything seems fine and i don't have to take care of it when >> my view is resized. >> >> but if i put some color on it and look at it carefully i can see an extra >> line and column of black pixels >> >> I looked at the code of vtkCoordinate and vtkViewport and the combination >> of the coordinates transformations leads to a final size of the polygon >> rendered 1 pixel short in both x and y directions. >> >> Is this considered a normal behaviour due to the computation involved, or >> is it definitively a bug? >> >> A quick workaround is to set my plane source a little bit larger, but for >> future features of my app, i would need the exact size... >> >> Thanks for any comments/suggestions >> >> > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 11349 bytes Desc: not available URL: From dhoppes at mbfbioscience.com Fri Jul 3 13:11:34 2015 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Fri, 3 Jul 2015 17:11:34 +0000 Subject: [vtkusers] vtkglyph3D and different representations Message-ID: <46CB11F12B9DC24D860D4082451B318A14F69820@exchange3.microbrightfield.com> Hey all, Got a question about vtkglyph3Dmapper. I would like each glyph to have its own representation that I can adjust the texture, opacity, etc. We've set it up so that each glyph point is represented by vtkpolydata so that we can get the display correct. However, I would like to treat each one separately in terms of the texture, smoothness, etc. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Fri Jul 3 13:24:03 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 03 Jul 2015 17:24:03 +0000 Subject: [vtkusers] updating vtkImageAccumulate In-Reply-To: <1435913425440-5732697.post@n5.nabble.com> References: <1435913425440-5732697.post@n5.nabble.com> Message-ID: Did you called Modified() on your image data? This is how downstream algorithms know to recompute their results. On Fri, Jul 3, 2015 at 4:50 AM mbcx9rb9 wrote: > i have a vtkImageData, which I would like to be able to calculate the max, > min, average, etc. via vtkImageAccumulate. Then I want to be able to edit > the image data, update the image accumulate and see the new statistics. > > However, it seems that vtkImageAccumulate doesn't work how I hoped it > would. > When I change my image data, my image accumulate still returns the original > statistics of the image data before I made the changes. > > If I edit my image data, am I obliged to reinitialise my image accumulate > to > be able to see the statistics on the edited image data? > > I have attached a simple example of a matrix with one voxel=100 and whose > max is found with imageaccumulate. Then, a voxel of 200 is added, > imageaccumulate is updated, but returns a max of 100 instead of the new > 200. > Finally, a new imageaccumulate is used to verify that the actually max is > 200 as expected. > > Any ideas of where I'm going wrong would be greatly appreciated. > > > > // create image data > vtkSmartPointer id = > vtkSmartPointer::New(); > id->SetSpacing(1,1,1); > id->SetExtent(0,99,0,99,0,99); > id->AllocateScalars(VTK_DOUBLE,1); > > // set all values to zero > for (int i=id->GetExtent()[0]; i<=id->GetExtent()[1]; i++) { > for (int j=id->GetExtent()[2]; j<=id->GetExtent()[3]; j++) { > for (int k=id->GetExtent()[4]; k<=id->GetExtent()[5]; k++) { > double* voxel = > static_cast(id->GetScalarPointer(i,j,k)); > voxel[0] = 0; > } > } > } > > // set one voxel value to 100 > double* voxel = static_cast(id->GetScalarPointer(50,50,50)); > voxel[0] = 100; > > // set image accumulate > vtkSmartPointer ia = > vtkSmartPointer::New(); > ia->SetInputData(id); > ia->SetComponentExtent(id->GetExtent()); > ia->SetComponentOrigin(id->GetOrigin()); > ia->SetComponentSpacing(id->GetSpacing()); > ia->Update(); > > // output the max in the matrix (should be 100) > std::cout << "max before change: " << ia->GetMax()[0] << std::endl; > > // change a different voxel to 200 > voxel = static_cast(id->GetScalarPointer(50,50,60)); > voxel[0] = 200; > > // update image accumulate > ia->Update(); > std::cout << "max after change (want this value to be 200): " << > ia->GetMax()[0] << std::endl; > > // create second image accumulate to verify that the max is, as it > should be, 200 > vtkSmartPointer ia2 = > vtkSmartPointer::New(); > ia2->SetInputData(id); > ia2->SetComponentExtent(id->GetExtent()); > ia2->SetComponentOrigin(id->GetOrigin()); > ia2->SetComponentSpacing(id->GetSpacing()); > ia2->Update(); > std::cout << "max with ia2 (should be 200): " << ia2->GetMax()[0] << > std::endl; > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/updating-vtkImageAccumulate-tp5732697.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 Fri Jul 3 14:09:23 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 3 Jul 2015 12:09:23 -0600 Subject: [vtkusers] vtkImageReslice and SetSlabNumberOfSlices(int) In-Reply-To: References: Message-ID: Yes, the slab is centered wrt the reslice plane. So if SlabNumberOfSlices is even, then the two middle "slab" slices will be on either side of the reslice plane (+0.5 above and -0.5 below). Though this isn't quite related, note that it is possible to change the spacing between the "slab" slices with SetSlabSliceSpacingFraction(). - David On Fri, Jul 3, 2015 at 3:51 AM, Marco Sambin wrote: > Hi all, > > with reference to this old question of mine (see below), I would like a > clarification: > > suppose that the output z-spacing is set to 1 mm on my vtkImageReslice > instance. Also, suppose that I call SetSlabNumberOfSlices(2) on my reslicer. > Where will the 2 slices used to compute the slab image be located w.r.t. > the position of my reslice plane? Will the first slice be 0.5 mm "above" > and the second slice be 0.5 mm "below" my reslice plane? In other words, > will the slices always be "centered" w.r.t. the position of my reslice > plane? > > Maybe this is a silly question, but I like to exactly understand this > point. > > Thanks in advance for the clarification. > Regards, > > Marco > > > On Mon, Mar 25, 2013 at 9:59 PM, Marco Sambin wrote: > >> Hi David, >> >> Thanks for the clarification. >> I will test this soon. >> Regards, >> >> Marco >> Il giorno 25/mar/2013 14:24, "David Gobbi" ha >> scritto: >> >>> Hi Marco, >>> >>> The way it works is this: vtkImageReslice is creating the slab by >>> extracting N samples and combining them, where the distance between >>> the samples is set by the third argument to SetOutputSpacing(). If >>> the SlabNumberOfSlices is N, then the slab thickness is >>> (N-1)*spacing[2] where spacing[2] is the z-spacing set with >>> SetOutputSpacing(spacing[0],spacing[1],spacing[2]). >>> >>> Summary: thickness = (N - 1)*spacing[2] >>> >>> Slab mode is equivalent to extracting N slices and combining them. >>> >>> - David >>> >>> On Mon, Mar 25, 2013 at 6:01 AM, Marco Sambin >>> wrote: >>> > Hi all. >>> > I am looking at implementing thick reformats through vtkImageReslice. >>> > >>> > Even after looking at the documentation, I did not fully understand the >>> > SetSlabNumberOfSlices(int) method. For instance, in cases of an oblique >>> > reformat, what is considered to be a "slice"? What defines the >>> "thickness" >>> > of a single slice, thus determining the total slab thickness resulting >>> from >>> > calling SetSlabNumberOfSlices(X)? >>> > >>> > I was expecting a call like SetSlabThickness(...), rather than >>> > SetSlabNumberOfSlices(...). >>> > >>> > I would appreciate any comment on this. >>> > Thanks in advance. >>> > >>> > Marco >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Fri Jul 3 14:11:14 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 3 Jul 2015 12:11:14 -0600 Subject: [vtkusers] Swing Integration In-Reply-To: <1435904753487-5732695.post@n5.nabble.com> References: <1435823044808-5732661.post@n5.nabble.com> <1435904753487-5732695.post@n5.nabble.com> Message-ID: Hum, This is really strange. I've never noticed or eared anything like that before. I'm wondering if that could be related to some configuration of the JVM and how it handle the heavy weight window. So even the sample applications within vtk.jar show transparent faces and slow interactions? Which version of the JVM are you using? Do you have a Nvidia or ATI gpu? Are your openGL drivers generic or do they come from your vendor (ATI/NVidia)? Thanks, Seb On Fri, Jul 3, 2015 at 12:25 AM, quadprob wrote: > The examples all exhibit the same undesired behaviour that I described in > my > initial post. Also, I'm running Red Hat Linux. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Swing-Integration-tp5732661p5732695.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 cory.quammen at kitware.com Fri Jul 3 17:01:55 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 3 Jul 2015 17:01:55 -0400 Subject: [vtkusers] vtkglyph3D and different representations In-Reply-To: <46CB11F12B9DC24D860D4082451B318A14F69820@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A14F69820@exchange3.microbrightfield.com> Message-ID: Hi Doug, I don't believe it is possible to adjust the texture of individual glyphs in either vtkGlyph3D or vtkGlyph3DMapper. Texture and opacity are typically controlled by vtkActor, so you would need more than one vtkActor for different points you are glyphing if you want different opacities and textures. - Cory On Fri, Jul 3, 2015 at 1:11 PM, Doug Hoppes wrote: > Hey all, > > > > Got a question about vtkglyph3Dmapper. I would like each > glyph to have its own representation that I can adjust the texture, > opacity, etc. We?ve set it up so that each glyph point is represented by > vtkpolydata so that we can get the display correct. However, I would like > to treat each one separately in terms of the texture, smoothness, etc. > > > > Doug > > > > _______________________________________________ > 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 Fri Jul 3 17:11:16 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 3 Jul 2015 17:11:16 -0400 Subject: [vtkusers] Using ITK with VTK and BGL In-Reply-To: References: Message-ID: Hi Masakazu, Could you please post your CMakeLists.txt file where you include VTK and ITK? Thanks, Cory On Wed, Jul 1, 2015 at 8:08 PM, Masakazu Gesho wrote: > I used VTK and BGL for the project. > > Now I would like to add ITK package on top of VTK and BGL. > > > When I added ITK package in the CMakeLists.txt with gluing VTK, I > obtained the following error of which I did not see without ITK. > > fatal error: vtkBoostConnectedComponents.h: No such file or directory > #include > > > I use: > > Cmake2.8 > > VTK 6.1 with MPI > > ITK 4.7 > > BGL 1.55 > > > Thank you for our help. > > > Masakazu Gesho > University of Wyoming > PhD Petroleum & Chemical Engineering > > > _______________________________________________ > 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 Fri Jul 3 17:20:51 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 3 Jul 2015 17:20:51 -0400 Subject: [vtkusers] Help needed...Rendering 3D volume/structure using series of 2D images with defined contour In-Reply-To: <1435788392255-5732656.post@n5.nabble.com> References: <1435788392255-5732656.post@n5.nabble.com> Message-ID: Hi Neel007, Welcome to VTK! A good resource for learning VTK by example is the VTK Examples Wiki [1]. Specifically for your need, you might want to look at an example in the VTK source code [2]. You may also find the VTK class documentation [3] helpful. Cheers, Cory [1] http://www.vtk.org/Wiki/VTK/Examples [2] http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Medical/Cxx/GenerateModelsFromLabels.cxx [3] http://www.vtk.org/doc/release/6.2/html/classes.html On Wed, Jul 1, 2015 at 6:06 PM, Neel007 wrote: > Hi, > > I am newbie to VTK. > > I need to Render 3D volume/structure using series of 2D binary-images, with > defined contour on them and I also have the contour association information > on the successive 2D image slides. Goal is to interpolate 'z' axis > connectivity and then render 3D volume/structure of the connected contours > throughout the entire 2D binary-image slides. > > Just wondering if any one of you could link me to some documentation or > example scripts of Using VTK C++ libraries. > > Thank you for your time. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Help-needed-Rendering-3D-volume-structure-using-series-of-2D-images-with-defined-contour-tp5732656.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 oleg.krivosheev at xcision.com Sun Jul 5 00:16:57 2015 From: oleg.krivosheev at xcision.com (Oleg Krivosheev) Date: Sun, 5 Jul 2015 00:16:57 -0400 Subject: [vtkusers] How to show/hide points in VTK with vtkContourWidget/vtkOrientedGlyphContourRepresentation? Message-ID: Hi, All I've inherited c++ app which uses VTK. App creates object of vtkContourWidget type and set representation to vtkOrientedGlyphContourRepresentation, along the line mContourWidget->SetRepresentation(new vtkOrientedGlyphContourRepresentation()); Then data as vtkPolyData are send in and is displayed as set of points connected by spline lines, i.e. contour. I know how to set line width, line pattern etc, but cannot hide points on the curve. Is there a good way to do this? Basically based on some user input points on contours could be hidden or shown. thank you OK PS VTK version is 5.3 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo.hernandez.cerdan at outlook.com Sun Jul 5 03:03:36 2015 From: pablo.hernandez.cerdan at outlook.com (=?iso-8859-1?B?UGFibG8gSGVybuFuZGV6?=) Date: Sun, 5 Jul 2015 09:03:36 +0200 Subject: [vtkusers] QVTKWidgetPlugin is not loading in QT5 designer Message-ID: I have recompiled QT (developer-build) to version 5.5, and using VTK release from git. I set VTK_QT_VERSION to 5, and it links and build properly. Eventhough when I add libQVTKWidgetPlugin.so to the qt5base folder, the widget does not load, with error: Plugin verification data mismatch in '/home/phc/Software/VTK-release/build-devtools/lib/libQVTKWidgetPlugin.so' I also tried with qtcreator, and no luck. ldd in the WidgetPlugin.so shows that is linking properly to the same QT build. I wonder, is there anybody who was succesfull using the VTKwidget in qt5? Is there a bug in the medatada in the plugin? I have also noticed that I receive a warning building VTK in the header Q4VTKWidgetPlugin.h Any clue is welcome Cheers, Pablo -------------- next part -------------- An HTML attachment was scrubbed... URL: From sayanmaity.10 at gmail.com Sun Jul 5 10:38:59 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Sun, 5 Jul 2015 07:38:59 -0700 (MST) Subject: [vtkusers] Help needed...Rendering 3D volume/structure using series of 2D images with defined contour In-Reply-To: References: <1435788392255-5732656.post@n5.nabble.com> Message-ID: <1436107139621-5732722.post@n5.nabble.com> Dear Cory, Thanks a lot for your resourceful reply. I really appreciate it. -- View this message in context: http://vtk.1045678.n5.nabble.com/Help-needed-Rendering-3D-volume-structure-using-series-of-2D-images-with-defined-contour-tp5732656p5732722.html Sent from the VTK - Users mailing list archive at Nabble.com. From xabivtk at gmail.com Mon Jul 6 03:49:16 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Mon, 6 Jul 2015 09:49:16 +0200 Subject: [vtkusers] Missing pixel with vtkPolyDataMapper2D and vtkCoordinate In-Reply-To: References: Message-ID: Thank you Cory for your help. I added the bug in mantis with your suggestion: http://www.vtk.org/Bug/view.php?id=15565 2015-07-03 16:49 GMT+02:00 Cory Quammen : > Hi, > > Thank you for providing the complete code example that shows the problem. > I compiled and ran it and see the same problem you report. Thanks also for > your suggestion about what to modify. I tried adding 0.5 to the coordinates > returned by this->TransformCoordinate->GetComputedDoubleViewportValue(), > but this just led to blank pixels on the bottom of the window. > > I think this may indeed be a bug in the conversion from viewport > coordinates to window coordinates. Right now, the transformation appears to > be placing coordinates (1, 1) in the lower left corner of the upper right > pixel, where I think it should be in the upper right corner of the pixel. > When I modify vtkViewport::DisplayToNormalizedDisplay() to divide the u and > v coordinates by size-1 instead of just size, the quad fills the window. > This calculation should be putting the (1,1) coordinate in the upper right > corner of the pixel. > > Would you mind posting this but on the bug tracker [1]? > > Thanks, > Cory > > [1] http://www.vtk.org/Bug/view_all_bug_page.php > > On Wed, Jul 1, 2015 at 4:55 AM, Xabi Riobe wrote: > >> Here is an example and a screenshot to illustrate the issue. >> >> I'm wondering if the coordinates returned in >> vtkOpenGLPolyDataMapper2D::RenderOverlay by the call to >> this->TransformCoordinate->GetComputedDoubleViewportValue(viewport); >> should be then shifted with the extra 0.5 to be in the center of the pixel >> and not in the border. >> >> >> #define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle, >> vtkRenderingOpenGL, vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL) >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> int main(int, char* []) >> { >> vtkSmartPointer ren1= vtkSmartPointer::New(); >> vtkSmartPointer renWin= >> vtkSmartPointer::New(); >> renWin->SetSize( 1533, 792 ); >> renWin->AddRenderer(ren1); >> >> vtkSmartPointer iren= >> vtkSmartPointer::New(); >> iren->SetRenderWindow(renWin); >> >> vtkSmartPointer source = >> vtkSmartPointer::New(); >> source->SetOrigin(0.0, 0.0, 0.0); >> source->SetPoint1(1.0, 0.0, 0.0); >> source->SetPoint2(0.0, 1.0, 0.0); >> source->Update(); >> >> vtkSmartPointer scalars = >> vtkSmartPointer::New(); >> double bottom[3] = {255.0, 0, 0}; >> double top[3] = {0, 255.0, 0}; >> scalars->Initialize(); >> scalars->SetNumberOfComponents(3); >> scalars->SetNumberOfTuples(4); >> scalars->InsertTuple(0, bottom); >> scalars->InsertTuple(1, bottom); >> scalars->InsertTuple(2, top); >> scalars->InsertTuple(3, top); >> source->GetOutput()->GetPointData()->SetScalars(scalars); >> >> vtkSmartPointer coordinateSystem = >> vtkSmartPointer::New(); >> coordinateSystem->SetCoordinateSystemToNormalizedViewport(); >> >> vtkSmartPointer mapper = >> vtkSmartPointer::New(); >> mapper->SetInputConnection(source->GetOutputPort()); >> mapper->SetTransformCoordinate(coordinateSystem); >> mapper->TransformCoordinateUseDoubleOn(); >> >> vtkSmartPointer actor2d = >> vtkSmartPointer::New(); >> actor2d->SetMapper(mapper); >> >> ren1->AddActor(actor2d); >> >> ren1->ResetCamera(); >> renWin->Render(); >> iren->Start(); >> } >> >> [image: Images int?gr?es 1] >> >> 2015-06-30 18:18 GMT+02:00 Xabi Riobe : >> >>> Hi, >>> >>> I want to display a plane as a background. >>> For that i have in a vtkActor2D a vtkPolyDataMapper2D filled with a >>> vtkPlaneSource going from 0,0,0 to 1,1,1 >>> I add to the mapper a vtkCoordinate with >>> SetCoordinateSystemToNormalizedViewport >>> >>> with that, everything seems fine and i don't have to take care of it >>> when my view is resized. >>> >>> but if i put some color on it and look at it carefully i can see an >>> extra line and column of black pixels >>> >>> I looked at the code of vtkCoordinate and vtkViewport and the >>> combination of the coordinates transformations leads to a final size of the >>> polygon rendered 1 pixel short in both x and y directions. >>> >>> Is this considered a normal behaviour due to the computation involved, >>> or is it definitively a bug? >>> >>> A quick workaround is to set my plane source a little bit larger, but >>> for future features of my app, i would need the exact size... >>> >>> Thanks for any comments/suggestions >>> >>> >> >> _______________________________________________ >> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 11349 bytes Desc: not available URL: From richard.j.brown at live.co.uk Mon Jul 6 04:33:55 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Mon, 6 Jul 2015 01:33:55 -0700 (MST) Subject: [vtkusers] updating vtkImageAccumulate In-Reply-To: References: <1435913425440-5732697.post@n5.nabble.com> Message-ID: That did the trick! Thanks, seems very obvious in hindsight. Regards, Richard > On 03 Jul 2015, at 19:24, Dan Lipsa-2 [via VTK] wrote: > > Did you called Modified() on your image data? This is how downstream algorithms know to recompute their results. > > On Fri, Jul 3, 2015 at 4:50 AM mbcx9rb9 <[hidden email] > wrote: > i have a vtkImageData, which I would like to be able to calculate the max, > min, average, etc. via vtkImageAccumulate. Then I want to be able to edit > the image data, update the image accumulate and see the new statistics. > > However, it seems that vtkImageAccumulate doesn't work how I hoped it would. > When I change my image data, my image accumulate still returns the original > statistics of the image data before I made the changes. > > If I edit my image data, am I obliged to reinitialise my image accumulate to > be able to see the statistics on the edited image data? > > I have attached a simple example of a matrix with one voxel=100 and whose > max is found with imageaccumulate. Then, a voxel of 200 is added, > imageaccumulate is updated, but returns a max of 100 instead of the new 200. > Finally, a new imageaccumulate is used to verify that the actually max is > 200 as expected. > > Any ideas of where I'm going wrong would be greatly appreciated. > > > > // create image data > vtkSmartPointer id = vtkSmartPointer::New(); > id->SetSpacing(1,1,1); > id->SetExtent(0,99,0,99,0,99); > id->AllocateScalars(VTK_DOUBLE,1); > > // set all values to zero > for (int i=id->GetExtent()[0]; i<=id->GetExtent()[1]; i++) { > for (int j=id->GetExtent()[2]; j<=id->GetExtent()[3]; j++) { > for (int k=id->GetExtent()[4]; k<=id->GetExtent()[5]; k++) { > double* voxel = > static_cast(id->GetScalarPointer(i,j,k)); > voxel[0] = 0; > } > } > } > > // set one voxel value to 100 > double* voxel = static_cast(id->GetScalarPointer(50,50,50)); > voxel[0] = 100; > > // set image accumulate > vtkSmartPointer ia = > vtkSmartPointer::New(); > ia->SetInputData(id); > ia->SetComponentExtent(id->GetExtent()); > ia->SetComponentOrigin(id->GetOrigin()); > ia->SetComponentSpacing(id->GetSpacing()); > ia->Update(); > > // output the max in the matrix (should be 100) > std::cout << "max before change: " << ia->GetMax()[0] << std::endl; > > // change a different voxel to 200 > voxel = static_cast(id->GetScalarPointer(50,50,60)); > voxel[0] = 200; > > // update image accumulate > ia->Update(); > std::cout << "max after change (want this value to be 200): " << > ia->GetMax()[0] << std::endl; > > // create second image accumulate to verify that the max is, as it > should be, 200 > vtkSmartPointer ia2 = > vtkSmartPointer::New(); > ia2->SetInputData(id); > ia2->SetComponentExtent(id->GetExtent()); > ia2->SetComponentOrigin(id->GetOrigin()); > ia2->SetComponentSpacing(id->GetSpacing()); > ia2->Update(); > std::cout << "max with ia2 (should be 200): " << ia2->GetMax()[0] << > std::endl; > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/updating-vtkImageAccumulate-tp5732697.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/updating-vtkImageAccumulate-tp5732697p5732713.html > To unsubscribe from updating vtkImageAccumulate, click here . > NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/updating-vtkImageAccumulate-tp5732697p5732724.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Mon Jul 6 10:24:20 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 6 Jul 2015 10:24:20 -0400 Subject: [vtkusers] QVTKWidgetPlugin is not loading in QT5 designer In-Reply-To: References: Message-ID: Hi Pablo, The error you're getting usually indicates that either you have built the plugin against a different Qt version or if against the same version, then a different Qt configuration or architecture or the plugin and Qt are built using different compilers. Do you have any other Qt versions installed on your system that VTK might be compiling against? Have you tried compiling VTK against a different Qt version? Warm Regards, Sankhesh Jhaveri Research & Development Engineer Kitware, Inc. *Phone*: (518) 881 4417 *Fax*: (518) 371 4573 On Sun, Jul 5, 2015 at 3:03 AM, Pablo Hern?ndez < pablo.hernandez.cerdan at outlook.com> wrote: > I have recompiled QT (developer-build) to version 5.5, and using VTK > release from git. > I set VTK_QT_VERSION to 5, and it links and build properly. > Eventhough when I add libQVTKWidgetPlugin.so to the qt5base folder, the > widget does not load, with error: > Plugin verification data mismatch in > '/home/phc/Software/VTK-release/build-devtools/lib/libQVTKWidgetPlugin.so' > > I also tried with qtcreator, and no luck. > ldd in the WidgetPlugin.so shows that is linking properly to the same QT > build. > I wonder, is there anybody who was succesfull using the VTKwidget in qt5? > Is there a bug in the medatada in the plugin? I have also noticed that I > receive a warning building VTK in the header Q4VTKWidgetPlugin.h > > Any clue is welcome > > Cheers, > Pablo > > _______________________________________________ > 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 jfavre at cscs.ch Mon Jul 6 11:30:11 2015 From: jfavre at cscs.ch (Favre Jean) Date: Mon, 6 Jul 2015 15:30:11 +0000 Subject: [vtkusers] failed to compile LIC under OGL2. Message-ID: <0EB9B6375711A04B820E6B6F5CCA9F6841F09793@MBX111.d.ethz.ch> On a linux system, my default gcc is 4.8.4. Using the most recent git , I fail to compile the following, although I see clean dashboards elsewhere. Is this a local issue on my system only? : [ 56%] Building CXX object Rendering/LICOpenGL2/CMakeFiles/vtkRenderingLICOpenGL2.dir/vtkLineIntegralConvolution2D.cxx.o In file included from /usr/include/unistd.h:226:0, from /local/apps/VTK/VTK/Common/System/vtkTimerLog.h:43, from /local/apps/VTK/VTK/Rendering/LICOpenGL2/vtkLineIntegralConvolution2D.cxx:35: /local/apps/VTK/VTK/Rendering/LICOpenGL2/vtkLineIntegralConvolution2D.cxx: In member function ?void vtkLICPingPongBufferManager::DettachBuffers(vtkFrameBufferObject2*)?: /local/apps/VTK/VTK/Rendering/LICOpenGL2/vtkLineIntegralConvolution2D.cxx:599:45: error: second operand to the conditional operator is of type ?void?, but the third operand is neither a throw-expression nor of type ?void? readTex[0] ? readTex[0]->Deactivate() : NULL; ^ /local/apps/VTK/VTK/Rendering/LICOpenGL2/vtkLineIntegralConvolution2D.cxx:600:45: error: second operand to the conditional operator is of type ?void?, but the third operand is neither a throw-expression nor of type ?void? readTex[1] ? readTex[1]->Deactivate() : NULL; ^ /local/apps/VTK/VTK/Rendering/LICOpenGL2/vtkLineIntegralConvolution2D.cxx:602:47: error: second operand to the conditional operator is of type ?void?, but the third operand is neither a throw-expression nor of type ?void? writeTex[0] ? writeTex[0]->Deactivate() : NULL; ^ /local/apps/VTK/VTK/Rendering/LICOpenGL2/vtkLineIntegralConvolution2D.cxx:603:47: error: second operand to the conditional operator is of type ?void?, but the third operand is neither a throw-expression nor of type ?void? writeTex[1] ? writeTex[1]->Deactivate() : NULL ----------------- Jean CSCS -------------- next part -------------- An HTML attachment was scrubbed... URL: From pabloarubi at gmail.com Mon Jul 6 11:59:40 2015 From: pabloarubi at gmail.com (Pablo Rubi) Date: Mon, 6 Jul 2015 12:59:40 -0300 Subject: [vtkusers] QVTKWidgetPlugin is not loading in QT5 designer In-Reply-To: References: Message-ID: Hi Pablo, I'm able to run this example properly using Qt 5.5 (downloaded last friday), VTK 6.2 , CMake and MinGW 4.9.2 (the one included with Qt, which is i686-w64-mingw32). This is what I got. I haven't tried running the plugin from the IDE, if that's what you're asking. Regards, Pablo 2015-07-06 11:24 GMT-03:00 Sankhesh Jhaveri : > Hi Pablo, > > The error you're getting usually indicates that either you have built the > plugin against a different Qt version or if against the same version, then > a different Qt configuration or architecture or the plugin and Qt are built > using different compilers. > > Do you have any other Qt versions installed on your system that VTK might > be compiling against? Have you tried compiling VTK against a different Qt > version? > > > > Warm Regards, > > Sankhesh Jhaveri > Research & Development Engineer > Kitware, Inc. > *Phone*: (518) 881 4417 > *Fax*: (518) 371 4573 > > > > On Sun, Jul 5, 2015 at 3:03 AM, Pablo Hern?ndez < > pablo.hernandez.cerdan at outlook.com> wrote: > >> I have recompiled QT (developer-build) to version 5.5, and using VTK >> release from git. >> I set VTK_QT_VERSION to 5, and it links and build properly. >> Eventhough when I add libQVTKWidgetPlugin.so to the qt5base folder, the >> widget does not load, with error: >> Plugin verification data mismatch in >> '/home/phc/Software/VTK-release/build-devtools/lib/libQVTKWidgetPlugin.so' >> >> I also tried with qtcreator, and no luck. >> ldd in the WidgetPlugin.so shows that is linking properly to the same QT >> build. >> I wonder, is there anybody who was succesfull using the VTKwidget in qt5? >> Is there a bug in the medatada in the plugin? I have also noticed that I >> receive a warning building VTK in the header Q4VTKWidgetPlugin.h >> >> Any clue is welcome >> >> Cheers, >> Pablo >> >> _______________________________________________ >> 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 shantanusvyas at gmail.com Mon Jul 6 12:38:45 2015 From: shantanusvyas at gmail.com (shantanu) Date: Mon, 6 Jul 2015 09:38:45 -0700 (MST) Subject: [vtkusers] Clustered landmark target points when using ICP Message-ID: <1436200725836-5732728.post@n5.nabble.com> Hey, I'm attempting to use the vtkIterativeClosestPointTransform to reconstruct the stanford bunny (mesh reconstruction from depth based images). When I attempt to do so I get misaligned meshes. I checked where the source and landmark points on each mesh were and for the source mesh they were scattered evenly across the mesh (Red) but for the target they were all clustered around the center/torso? of the bunny (green). Since the points are so concentrated in the center I assume the ICP is mismatching for that reason. Any suggestions on how to have the landmarks for the target be more even? Thanks Target Points Source Points Both Layered -- View this message in context: http://vtk.1045678.n5.nabble.com/Clustered-landmark-target-points-when-using-ICP-tp5732728.html Sent from the VTK - Users mailing list archive at Nabble.com. From bastianra at gmail.com Mon Jul 6 19:07:07 2015 From: bastianra at gmail.com (Bastian A.) Date: Mon, 6 Jul 2015 19:07:07 -0400 Subject: [vtkusers] vtkCharts, Qt and segmentation faults in vtkInformation::ReportReferences Message-ID: Hi everyone, I am trying to create an interactive "plot: where users can select a subset of the data, and based on the selection, a variable number of additional plots is added. When the user changes the selection, the number of plots is increased or decreased accordingly. I am using a vtkAnnotationLink and a vtkCommand subclass to trigger the update of the vtkChartMatrix that contains all the plots. My problem is that I am experiencing non-deterministic crashes in my application, which occur deep within the garbage collection following a call of the destructor of a vtkPlotPoints object. What causes the crash is that the "first" IVar of the iterator is a nullpointer. void vtkInformation::ReportReferences(vtkGarbageCollector* collector) { this->Superclass::ReportReferences(collector); // Ask each key/value pair to report any references it holds. typedef vtkInformationInternals::MapType MapType; for(MapType::const_iterator i = this->Internal->Map.begin(); i != this->Internal->Map.end(); ++i) { i->first->Report(this, collector); } } I think that the problem is stemming from the qt eventloop triggering a redraw while I am updating the plot (which involves the destruction and creation of vtkPlots in the vtkChartMatrix). I have following questions: What calls are necessary to remove a scene from the renderer, in such a way that I can destroy items in the scene safely? Or more general; which manipulations of a plot/chart/scene are safe in an interactive setting, where a GUI thread my trigger redraws at any time? Is there a better way than simply duplicating the QVTKWidget and switching between two widgets when updating the scene (manually setting mutexes in the Qt and vtk sub-classes seems like a bad idea since this would depend on implementation details, both in Qt and Vtk)? Thanks, Bastian -------------- next part -------------- An HTML attachment was scrubbed... URL: From tr_jun-jiang.ee at vitrox.com Mon Jul 6 23:28:15 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Mon, 6 Jul 2015 20:28:15 -0700 (MST) Subject: [vtkusers] converting vtkCallBackCommand into java Message-ID: <1436239695444-5732734.post@n5.nabble.com> I want to implement a clipping function in my java_wrapped vtk program exactly like this http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/ImplicitPlaneWidget2 However I don't know how to convert the following code snippet (callback for interactor) into java: /// Callback for the interaction // This does the actual work: updates the vtkPlane implicit function. // This in turn causes the pipeline to update and clip the object. class vtkIPWCallback : public vtkCommand { public: static vtkIPWCallback *New() { return new vtkIPWCallback; } virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkImplicitPlaneWidget2 *planeWidget = reinterpret_cast(caller); vtkImplicitPlaneRepresentation *rep = reinterpret_cast(planeWidget->GetRepresentation()); rep->GetPlane(this->Plane); } vtkIPWCallback():Plane(0),Actor(0) {} vtkPlane *Plane; vtkActor *Actor; };/ If I'm not mistaken addObserver() in Java does the same function, however I don't know where to start as I have difficulty to understand the syntax such as Virtual Void. Can someone pls give me a hint or guide or example? thank you. Sorry for my noobies. -- View this message in context: http://vtk.1045678.n5.nabble.com/converting-vtkCallBackCommand-into-java-tp5732734.html Sent from the VTK - Users mailing list archive at Nabble.com. From m.sambin at gmail.com Tue Jul 7 03:19:32 2015 From: m.sambin at gmail.com (Marco Sambin) Date: Tue, 7 Jul 2015 09:19:32 +0200 Subject: [vtkusers] vtkImageReslice and SetSlabNumberOfSlices(int) In-Reply-To: References: Message-ID: David, Thanks for the clarification. Regards, Marco Il 03/lug/2015 08:09 PM, "David Gobbi" ha scritto: > Yes, the slab is centered wrt the reslice plane. So if SlabNumberOfSlices > is even, then the two middle "slab" slices will be on either side of the > reslice plane (+0.5 above and -0.5 below). > > Though this isn't quite related, note that it is possible to change the > spacing between the "slab" slices with SetSlabSliceSpacingFraction(). > > - David > > On Fri, Jul 3, 2015 at 3:51 AM, Marco Sambin wrote: > >> Hi all, >> >> with reference to this old question of mine (see below), I would like a >> clarification: >> >> suppose that the output z-spacing is set to 1 mm on my vtkImageReslice >> instance. Also, suppose that I call SetSlabNumberOfSlices(2) on my reslicer. >> Where will the 2 slices used to compute the slab image be located w.r.t. >> the position of my reslice plane? Will the first slice be 0.5 mm "above" >> and the second slice be 0.5 mm "below" my reslice plane? In other words, >> will the slices always be "centered" w.r.t. the position of my reslice >> plane? >> >> Maybe this is a silly question, but I like to exactly understand this >> point. >> >> Thanks in advance for the clarification. >> Regards, >> >> Marco >> >> >> On Mon, Mar 25, 2013 at 9:59 PM, Marco Sambin wrote: >> >>> Hi David, >>> >>> Thanks for the clarification. >>> I will test this soon. >>> Regards, >>> >>> Marco >>> Il giorno 25/mar/2013 14:24, "David Gobbi" ha >>> scritto: >>> >>>> Hi Marco, >>>> >>>> The way it works is this: vtkImageReslice is creating the slab by >>>> extracting N samples and combining them, where the distance between >>>> the samples is set by the third argument to SetOutputSpacing(). If >>>> the SlabNumberOfSlices is N, then the slab thickness is >>>> (N-1)*spacing[2] where spacing[2] is the z-spacing set with >>>> SetOutputSpacing(spacing[0],spacing[1],spacing[2]). >>>> >>>> Summary: thickness = (N - 1)*spacing[2] >>>> >>>> Slab mode is equivalent to extracting N slices and combining them. >>>> >>>> - David >>>> >>>> On Mon, Mar 25, 2013 at 6:01 AM, Marco Sambin >>>> wrote: >>>> > Hi all. >>>> > I am looking at implementing thick reformats through vtkImageReslice. >>>> > >>>> > Even after looking at the documentation, I did not fully understand >>>> the >>>> > SetSlabNumberOfSlices(int) method. For instance, in cases of an >>>> oblique >>>> > reformat, what is considered to be a "slice"? What defines the >>>> "thickness" >>>> > of a single slice, thus determining the total slab thickness >>>> resulting from >>>> > calling SetSlabNumberOfSlices(X)? >>>> > >>>> > I was expecting a call like SetSlabThickness(...), rather than >>>> > SetSlabNumberOfSlices(...). >>>> > >>>> > I would appreciate any comment on this. >>>> > Thanks in advance. >>>> > >>>> > Marco >>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephan.Franke at inpro.de Tue Jul 7 03:48:50 2015 From: Stephan.Franke at inpro.de (Stephan) Date: Tue, 7 Jul 2015 00:48:50 -0700 (MST) Subject: [vtkusers] vtk 6.1 TCL Wrapping problem In-Reply-To: References: <1435671015301-5732592.post@n5.nabble.com> Message-ID: <1436255330290-5732738.post@n5.nabble.com> Hallo Jorge, thank you very much. This hint has helped me a lot. Best regards, Stephan -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-6-1-TCL-Wrapping-problem-tp5732529p5732738.html Sent from the VTK - Users mailing list archive at Nabble.com. From Stephan.Franke at inpro.de Tue Jul 7 03:58:26 2015 From: Stephan.Franke at inpro.de (Stephan) Date: Tue, 7 Jul 2015 00:58:26 -0700 (MST) Subject: [vtkusers] vtk 6.1 TCL Wrapping problem In-Reply-To: References: Message-ID: <1436255906021-5732739.post@n5.nabble.com> Hallo Goodwin, long ago that we had the pleasure to communicate with each other :-)) Thank you very much for the link an the offer to update your work to vtk 6.x. This offer I gladly accept :-)) Best regards, Stephan -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-6-1-TCL-Wrapping-problem-tp5732529p5732739.html Sent from the VTK - Users mailing list archive at Nabble.com. From jose.de.paula at live.com Tue Jul 7 08:22:47 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 7 Jul 2015 05:22:47 -0700 (MST) Subject: [vtkusers] Save images of a volume in 1: 1 Message-ID: <1436271767003-5732742.post@n5.nabble.com> I'm using a vtkVolume to display a DICOM volume. How should I proceed to save the image generated by this vtkVolume ensuring its size in 1: 1? And if possible with a dpi of 300? I saw the way to save is to be ... Void UCModulo3D::WindowToJPG(vtkRenderWindow * rw, const char * filename) { vtkWindowToImageFilter * filter = vtkWindowToImageFilter::New(); filter->SetInput(rw); filter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName(filename); writer->SetInputData(filter->GetOutput()); writer->Write(); writer->Delete(); filter->Delete(); } But in this way the size is taken into consideration the vtkrenderwindo size. -- View this message in context: http://vtk.1045678.n5.nabble.com/Save-images-of-a-volume-in-1-1-tp5732742.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcin.bukat at gmail.com Tue Jul 7 08:38:39 2015 From: marcin.bukat at gmail.com (Marcin Bukat) Date: Tue, 7 Jul 2015 14:38:39 +0200 Subject: [vtkusers] QVTKRenderWindowInteractor and SetSize Message-ID: Hello, I have a problem resizing offscreen rendered window. The code below is simple demo of my problem. When I run this code on linux everything work as expected, saved 'screenshot' is of requested 320x240 resolution and UI stays intact. On windows however SetSize() is simply ignored and screenshot is saved in native UI resolution. Interactive resizing of vtk widget works correctly so I guess I am missing some important bit. Any help is welcome. PS. I use vtk6.2 and qt4.8 on both systems #!/usr/bin/env python import sys import vtk from PyQt4 import QtCore, QtGui from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor class MainWindow(QtGui.QMainWindow): def __init__(self, parent = None): QtGui.QMainWindow.__init__(self, parent) self.hs = QtGui.QSplitter(QtCore.Qt.Horizontal) self.vs = QtGui.QSplitter(QtCore.Qt.Vertical) self.vspace0 = QtGui.QLabel('') self.vs.addWidget(self.vspace0) self.vtkWidget = QVTKRenderWindowInteractor(self.vs) self.vs.addWidget(self.vtkWidget) self.vspace1 = QtGui.QPushButton('Save') self.vs.addWidget(self.vspace1) self.hspace0 = QtGui.QLabel('') self.hs.addWidget(self.hspace0) self.hs.addWidget(self.vs) self.hspace1 = QtGui.QLabel('') self.hs.addWidget(self.hspace1) self.ren = vtk.vtkRenderer() self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) self.iren = self.vtkWidget.GetRenderWindow().GetInteractor() # Create source source = vtk.vtkConeSource() source.SetResolution(256) # Create a mapper mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(source.GetOutputPort()) # Create an actor actor = vtk.vtkActor() actor.SetMapper(mapper) self.ren.AddActor(actor) self.ren.ResetCamera() self.setCentralWidget(self.hs) self.show() self.iren.SetInteractorStyle(vtk.vtkInteractorStyleRubberBandPick()) self.iren.Initialize() self.vspace1.clicked.connect(self.screenshot) def to_image(self, renderWindow): windowToImageFilter = vtk.vtkWindowToImageFilter() windowToImageFilter.SetInput(renderWindow) windowToImageFilter.SetMagnification(1) windowToImageFilter.Update() return windowToImageFilter def screenshot(self): wren = self.vtkWidget.GetRenderWindow() w,h = wren.GetSize() wren.OffScreenRenderingOn() print((w,h)) wren.SetSize(320,240) print(wren.GetSize()) windowToImageFilter = self.to_image(wren) writer = vtk.vtkPNGWriter() writer.SetInputConnection(windowToImageFilter.GetOutputPort()) writer.SetFileName('test_out.png') writer.Write() wren.SetSize(w,h) wren.OffScreenRenderingOff() print('Saved screenshot!') if __name__ == "__main__": app = QtGui.QApplication(sys.argv) window = MainWindow() window.resize(800,800) window.setWindowTitle('Simple') sys.exit(app.exec_()) -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Tue Jul 7 09:55:15 2015 From: daviddoria at gmail.com (David Doria) Date: Tue, 7 Jul 2015 09:55:15 -0400 Subject: [vtkusers] Clustered landmark target points when using ICP In-Reply-To: <1436200725836-5732728.post@n5.nabble.com> References: <1436200725836-5732728.post@n5.nabble.com> Message-ID: On Mon, Jul 6, 2015 at 12:38 PM, shantanu wrote: > Hey, I'm attempting to use the vtkIterativeClosestPointTransform to > reconstruct the stanford bunny (mesh reconstruction from depth based > images). When I attempt to do so I get misaligned meshes. I checked where > the source and landmark points on each mesh were and for the source mesh > they were scattered evenly across the mesh (Red) but for the target they > were all clustered around the center/torso? of the bunny (green). Since the > points are so concentrated in the center I assume the ICP is mismatching > for > that reason. Any suggestions on how to have the landmarks for the target be > more even? > > Thanks > >From a quick look (line 292 in vtkIterativeClosestPointTransform.cxx), it looks like the points to use are computed by stepping through the points using a step size computed as: step = this->Source->GetNumberOfPoints() / this->MaximumNumberOfLandmarks; // the default # landmarks is 200 There is no guarantee that doing this will result in points reasonably spread over the mesh. One thing you could do is downsample one or both meshes before doing the ICP. This should let you control the number and distribution of points that are used in the matching process while ensuring they are spaced over the entire mesh. Then you can apply the transformation computed by the ICP filter to the original mesh. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Tue Jul 7 10:29:59 2015 From: DLRdave at aol.com (David Cole) Date: Tue, 7 Jul 2015 10:29:59 -0400 Subject: [vtkusers] converting vtkCallBackCommand into java In-Reply-To: <1436239695444-5732734.post@n5.nabble.com> References: <1436239695444-5732734.post@n5.nabble.com> Message-ID: Take a look at the "myCallback" code here as an example of how to handle VTK events in Java: http://www.vtk.org/Wiki/VTK/Examples/Java/Miscellaneous/Cone6 Does that work? HTH, David C. On Mon, Jul 6, 2015 at 11:28 PM, James Potota wrote: > I want to implement a clipping function in my java_wrapped vtk program > exactly like this > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/ImplicitPlaneWidget2 > > > However I don't know how to convert the following code snippet (callback for > interactor) into java: > > /// Callback for the interaction > // This does the actual work: updates the vtkPlane implicit function. > // This in turn causes the pipeline to update and clip the object. > > class vtkIPWCallback : public vtkCommand > { > public: > static vtkIPWCallback *New() > { return new vtkIPWCallback; } > virtual void Execute(vtkObject *caller, unsigned long, void*) > { > vtkImplicitPlaneWidget2 *planeWidget = > reinterpret_cast(caller); > vtkImplicitPlaneRepresentation *rep = > > reinterpret_cast(planeWidget->GetRepresentation()); > rep->GetPlane(this->Plane); > } > vtkIPWCallback():Plane(0),Actor(0) {} > vtkPlane *Plane; > vtkActor *Actor; > };/ > > If I'm not mistaken addObserver() in Java does the same function, however I > don't know where to start as I have difficulty to understand the syntax such > as Virtual Void. Can someone pls give me a hint or guide or example? thank > you. Sorry for my noobies. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/converting-vtkCallBackCommand-into-java-tp5732734.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 shantanusvyas at gmail.com Tue Jul 7 10:43:46 2015 From: shantanusvyas at gmail.com (shantanu) Date: Tue, 7 Jul 2015 07:43:46 -0700 (MST) Subject: [vtkusers] Clustered landmark target points when using ICP In-Reply-To: References: <1436200725836-5732728.post@n5.nabble.com> Message-ID: <1436280226610-5732747.post@n5.nabble.com> Thanks!, I'll try it out, I wasn't sure if that was the case since when I use any amount of landmarks they all cluster there, (10-15000) but usually only for that mesh, I tested it on all the others stanford bunny meshes and they seem to be more spread. -- View this message in context: http://vtk.1045678.n5.nabble.com/Clustered-landmark-target-points-when-using-ICP-tp5732728p5732747.html Sent from the VTK - Users mailing list archive at Nabble.com. From shantanusvyas at gmail.com Tue Jul 7 11:15:52 2015 From: shantanusvyas at gmail.com (shantanu) Date: Tue, 7 Jul 2015 08:15:52 -0700 (MST) Subject: [vtkusers] Clustered landmark target points when using ICP In-Reply-To: References: <1436200725836-5732728.post@n5.nabble.com> Message-ID: <1436282152938-5732748.post@n5.nabble.com> So I tried out just downsampling it first and then using ICP on those new points and found the landmarks were much more evenly distributed! Thanks. The issue is still the alignment, as it aligns it as how it did previously despite the target points being more dispersed. Do you have any suggestions for tuning ICP (or my meshes) to align these meshes better? I believe the rotation applied to the source mesh should be around 45 degrees about y with some translation. ICP run over downsampled meshes Two meshes layered before applying ICP -- View this message in context: http://vtk.1045678.n5.nabble.com/Clustered-landmark-target-points-when-using-ICP-tp5732728p5732748.html Sent from the VTK - Users mailing list archive at Nabble.com. From pabosle at sandia.gov Tue Jul 7 13:09:31 2015 From: pabosle at sandia.gov (Bosler, Peter Andrew) Date: Tue, 7 Jul 2015 17:09:31 +0000 Subject: [vtkusers] Build error, VTK 6.2, Mac OS X 10.10.4, GCC 4.9 Message-ID: Good morning, I am trying to build VTK 6.2 on a Mac running Yosemite with the GCC 4.9 compilers and OpenMPI 1.8.6, and I get the error below regarding what appears to be a system file. I had no problems building VTK before upgrading to Yosemite from Mavericks - has anyone else run into this problem? Thanks for your time, Pete Bosler [ 15%] Building C object ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.c.o In file included from /usr/include/dispatch/dispatch.h:51:0, from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15, from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13, from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55, from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19, from /Users/pabosle/sourceCodes/VTK-6.2.0/ThirdParty/freetype/vtkfreetype/src/base/ftmac.c:100, from /Users/pabosle/sourceCodes/VTK-6.2.0/ThirdParty/freetype/vtkfreetype/src/base/ftbase.c:38: /usr/include/dispatch/object.h:143:15: error: expected identifier or '(' before '^' token typedef void (^dispatch_block_t)(void); ^ /usr/include/dispatch/object.h:362:3: error: unknown type name 'dispatch_block_t' dispatch_block_t notification_block); ^ make[2]: *** [ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.c.o] Error 1 make[1]: *** [ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/all] Error 2 make: *** [all] Error 2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Jul 7 13:52:55 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 7 Jul 2015 13:52:55 -0400 Subject: [vtkusers] Build error, VTK 6.2, Mac OS X 10.10.4, GCC 4.9 In-Reply-To: References: Message-ID: Looks like a know issue with Yosemite: https://github.com/hashdist/hashstack/issues/742 On Tue, Jul 7, 2015 at 1:09 PM, Bosler, Peter Andrew wrote: > Good morning, > > I am trying to build VTK 6.2 on a Mac running Yosemite with the GCC 4.9 > compilers and OpenMPI 1.8.6, and I get the error below regarding what > appears to be a system file. I had no problems building VTK before > upgrading to Yosemite from Mavericks ? has anyone else run into this > problem? > > Thanks for your time, > > Pete Bosler > > [ 15%] Building C object > ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.c.o > In file included from /usr/include/dispatch/dispatch.h:51:0, > from > /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15, > from > /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13, > from > /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55, > from > /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19, > from > /Users/pabosle/sourceCodes/VTK-6.2.0/ThirdParty/freetype/vtkfreetype/src/base/ftmac.c:100, > from > /Users/pabosle/sourceCodes/VTK-6.2.0/ThirdParty/freetype/vtkfreetype/src/base/ftbase.c:38: > /usr/include/dispatch/object.h:143:15: error: expected identifier or '(' > before '^' token > typedef void (^dispatch_block_t)(void); > ^ > /usr/include/dispatch/object.h:362:3: error: unknown type name > 'dispatch_block_t' > dispatch_block_t notification_block); > ^ > make[2]: *** > [ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.c.o] > Error 1 > make[1]: *** > [ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/all] Error 2 > make: *** [all] Error 2 > > _______________________________________________ > 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 Tue Jul 7 13:54:38 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 7 Jul 2015 13:54:38 -0400 Subject: [vtkusers] Build error, VTK 6.2, Mac OS X 10.10.4, GCC 4.9 In-Reply-To: References: Message-ID: This link has some workaround suggestions... https://github.com/andrewgho/movewin-ruby/issues/1 On Tue, Jul 7, 2015 at 1:52 PM, Bill Lorensen wrote: > Looks like a know issue with Yosemite: > https://github.com/hashdist/hashstack/issues/742 > > > On Tue, Jul 7, 2015 at 1:09 PM, Bosler, Peter Andrew wrote: >> Good morning, >> >> I am trying to build VTK 6.2 on a Mac running Yosemite with the GCC 4.9 >> compilers and OpenMPI 1.8.6, and I get the error below regarding what >> appears to be a system file. I had no problems building VTK before >> upgrading to Yosemite from Mavericks ? has anyone else run into this >> problem? >> >> Thanks for your time, >> >> Pete Bosler >> >> [ 15%] Building C object >> ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.c.o >> In file included from /usr/include/dispatch/dispatch.h:51:0, >> from >> /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15, >> from >> /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13, >> from >> /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55, >> from >> /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19, >> from >> /Users/pabosle/sourceCodes/VTK-6.2.0/ThirdParty/freetype/vtkfreetype/src/base/ftmac.c:100, >> from >> /Users/pabosle/sourceCodes/VTK-6.2.0/ThirdParty/freetype/vtkfreetype/src/base/ftbase.c:38: >> /usr/include/dispatch/object.h:143:15: error: expected identifier or '(' >> before '^' token >> typedef void (^dispatch_block_t)(void); >> ^ >> /usr/include/dispatch/object.h:362:3: error: unknown type name >> 'dispatch_block_t' >> dispatch_block_t notification_block); >> ^ >> make[2]: *** >> [ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.c.o] >> Error 1 >> make[1]: *** >> [ThirdParty/freetype/vtkfreetype/CMakeFiles/vtkfreetype.dir/all] Error 2 >> make: *** [all] Error 2 >> >> _______________________________________________ >> 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 mightos at gmail.com Tue Jul 7 16:30:10 2015 From: mightos at gmail.com (mightos) Date: Tue, 7 Jul 2015 13:30:10 -0700 (MST) Subject: [vtkusers] How to get the IDs of min and max from a GetRange() ? Message-ID: <1436301010371-5732756.post@n5.nabble.com> Hello Let's say I have a vtkScalars with 100000 values. I would like to know the minimum and maximum values and their position in the vtkScalars. I currently use vtkScalars.GetRange()[0] to get the minimum value and vtkScalars.GetRange()[1] for the maximum. However, I was wondering how I could get the indexes from that. Any help is welcome :) -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-the-IDs-of-min-and-max-from-a-GetRange-tp5732756.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Tue Jul 7 16:35:47 2015 From: DLRdave at aol.com (David Cole) Date: Tue, 7 Jul 2015 16:35:47 -0400 Subject: [vtkusers] How to get the IDs of min and max from a GetRange() ? In-Reply-To: <1436301010371-5732756.post@n5.nabble.com> References: <1436301010371-5732756.post@n5.nabble.com> Message-ID: 0 0 1 2 8 9 10 9 0 0 0 9 10 9 8 6 4 3 0 0 What's the index of 10? :-P You'll have to scan looking for the first or last index, I think, since, in general, the min and max may occur any number of times in a data set. HTH, David C. On Tue, Jul 7, 2015 at 4:30 PM, mightos wrote: > Hello > > Let's say I have a vtkScalars with 100000 values. > I would like to know the minimum and maximum values and their position in > the vtkScalars. > > I currently use vtkScalars.GetRange()[0] to get the minimum value and > vtkScalars.GetRange()[1] for the maximum. However, I was wondering how I > could get the indexes from that. > > Any help is welcome :) > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-the-IDs-of-min-and-max-from-a-GetRange-tp5732756.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 cory.quammen at kitware.com Tue Jul 7 17:39:55 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 7 Jul 2015 16:39:55 -0500 Subject: [vtkusers] How to get the IDs of min and max from a GetRange() ? In-Reply-To: References: <1436301010371-5732756.post@n5.nabble.com> Message-ID: You can use the LookupValue() member function, e.g., // Assuming vtkScalars is a subclass of vtkDataArray minIndex = vtkScalars.LookupValue(minValue) maxIndex = vtkScalars.LookupValue(maxValue) This will do the scanning David mentioned and return (probably) the first index that matches the value you are querying. There is even a variant that puts all the IDs with the query value in a vtkIdList. See http://www.vtk.org/doc/release/6.2/html/classvtkDataArrayTemplate.html#aefa527440fb06df9da217831f2bf3704 Hope that helps, Cory On Tue, Jul 7, 2015 at 3:35 PM, David Cole via vtkusers wrote: > 0 0 1 2 8 9 10 9 0 0 0 9 10 9 8 6 4 3 0 0 > > What's the index of 10? > > :-P > > > You'll have to scan looking for the first or last index, I think, > since, in general, the min and max may occur any number of times in a > data set. > > HTH, > David C. > > > > > On Tue, Jul 7, 2015 at 4:30 PM, mightos wrote: > > Hello > > > > Let's say I have a vtkScalars with 100000 values. > > I would like to know the minimum and maximum values and their position in > > the vtkScalars. > > > > I currently use vtkScalars.GetRange()[0] to get the minimum value and > > vtkScalars.GetRange()[1] for the maximum. However, I was wondering how I > > could get the indexes from that. > > > > Any help is welcome :) > > > > > > > > -- > > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-get-the-IDs-of-min-and-max-from-a-GetRange-tp5732756.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 > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Tue Jul 7 17:46:27 2015 From: DLRdave at aol.com (David Cole) Date: Tue, 7 Jul 2015 17:46:27 -0400 Subject: [vtkusers] How to get the IDs of min and max from a GetRange() ? In-Reply-To: References: <1436301010371-5732756.post@n5.nabble.com> Message-ID: Thanks, Cory. That was really much more helpful than my previous (semi-glib) reply... On Tue, Jul 7, 2015 at 5:39 PM, Cory Quammen wrote: > You can use the LookupValue() member function, e.g., > > // Assuming vtkScalars is a subclass of vtkDataArray > minIndex = vtkScalars.LookupValue(minValue) > maxIndex = vtkScalars.LookupValue(maxValue) > > This will do the scanning David mentioned and return (probably) the first > index that matches the value you are querying. > > There is even a variant that puts all the IDs with the query value in a > vtkIdList. See > > http://www.vtk.org/doc/release/6.2/html/classvtkDataArrayTemplate.html#aefa527440fb06df9da217831f2bf3704 > > Hope that helps, > Cory > > On Tue, Jul 7, 2015 at 3:35 PM, David Cole via vtkusers > wrote: >> >> 0 0 1 2 8 9 10 9 0 0 0 9 10 9 8 6 4 3 0 0 >> >> What's the index of 10? >> >> :-P >> >> >> You'll have to scan looking for the first or last index, I think, >> since, in general, the min and max may occur any number of times in a >> data set. >> >> HTH, >> David C. >> >> >> >> >> On Tue, Jul 7, 2015 at 4:30 PM, mightos wrote: >> > Hello >> > >> > Let's say I have a vtkScalars with 100000 values. >> > I would like to know the minimum and maximum values and their position >> > in >> > the vtkScalars. >> > >> > I currently use vtkScalars.GetRange()[0] to get the minimum value and >> > vtkScalars.GetRange()[1] for the maximum. However, I was wondering how I >> > could get the indexes from that. >> > >> > Any help is welcome :) >> > >> > >> > >> > -- >> > View this message in context: >> > http://vtk.1045678.n5.nabble.com/How-to-get-the-IDs-of-min-and-max-from-a-GetRange-tp5732756.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 > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. From jfavre at cscs.ch Wed Jul 8 05:21:22 2015 From: jfavre at cscs.ch (Favre Jean) Date: Wed, 8 Jul 2015 09:21:22 +0000 Subject: [vtkusers] How to get the IDs of min and max from a GetRange() ? In-Reply-To: References: <1436301010371-5732756.post@n5.nabble.com> , Message-ID: <0EB9B6375711A04B820E6B6F5CCA9F6841F09F46@MBX111.d.ethz.ch> my preference goes towards using numpy for this type to query use the where() function. # example 1: import vtk from vtk.numpy_interface import dataset_adapter as dsa # assuming your mesh data is in the object 'vtkgrid' np_grid = dsa.WrapDataObject(vtkgrid) # assuming your scalar variable is called 'scalars' np_scalars = np_grid.PointData['scalars'] # min and max are: print np.min(np_scalars), np.max(np_scalars) #Their position(s) in the array is(are): np.where(np_scalars == np.max(np_scalars)) np.where(np_scalars == np.min(np_scalars)) # example 2: a = np.array([0, 0, 1, 2, 8, 9, 10, 9, 0, 0, 0, 9, 10, 9, 8, 6, 4, 3, 0, 0]) In [51]: np.where(a == a.min()) Out[51]: (array([ 0, 1, 8, 9, 10, 18, 19]),) In [52]: np.where(a == a.max()) Out[52]: (array([ 6, 12]),) References: http://kitware.com/blog/home/post/714 ----------------- Jean CSCS -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jul 8 08:08:45 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 8 Jul 2015 07:08:45 -0500 Subject: [vtkusers] How to get the IDs of min and max from a GetRange() ? In-Reply-To: <0EB9B6375711A04B820E6B6F5CCA9F6841F09F46@MBX111.d.ethz.ch> References: <1436301010371-5732756.post@n5.nabble.com> <0EB9B6375711A04B820E6B6F5CCA9F6841F09F46@MBX111.d.ethz.ch> Message-ID: Very nice, Jean. On Wed, Jul 8, 2015 at 4:21 AM, Favre Jean wrote: > my preference goes towards using numpy for this type to query > > use the where() function. > > # example 1: > > import vtk > from vtk.numpy_interface import dataset_adapter as dsa > > # assuming your mesh data is in the object 'vtkgrid' > np_grid = dsa.WrapDataObject(vtkgrid) > > # assuming your scalar variable is called 'scalars' > np_scalars = np_grid.PointData['scalars'] > > # min and max are: > print np.min(np_scalars), np.max(np_scalars) > > #Their position(s) in the array is(are): > np.where(np_scalars == np.max(np_scalars)) > np.where(np_scalars == np.min(np_scalars)) > > # example 2: > > a = np.array([0, 0, 1, 2, 8, 9, 10, 9, 0, 0, 0, 9, 10, 9, 8, 6, 4, 3, 0, > 0]) > > In [51]: np.where(a == a.min()) > Out[51]: (array([ 0, 1, 8, 9, 10, 18, 19]),) > > In [52]: np.where(a == a.max()) > Out[52]: (array([ 6, 12]),) > > References: > > http://kitware.com/blog/home/post/714 > > ----------------- > Jean > CSCS > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Wed Jul 8 08:13:30 2015 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Wed, 8 Jul 2015 12:13:30 +0000 Subject: [vtkusers] classes to learn more about vtk Message-ID: <46CB11F12B9DC24D860D4082451B318A14F69DF5@exchange3.microbrightfield.com> Hi all, I just moved to North Carolina. Does anyone know of any classes taught by the local universities that teach vtk? I know that there are courses taught by Kitware but more interested in something that was longer than a week intensive. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Wed Jul 8 09:41:37 2015 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 08 Jul 2015 13:41:37 +0000 Subject: [vtkusers] How to get the IDs of min and max from a GetRange() ? In-Reply-To: References: <1436301010371-5732756.post@n5.nabble.com> <0EB9B6375711A04B820E6B6F5CCA9F6841F09F46@MBX111.d.ethz.ch> Message-ID: Note that LookupValue uses internal data structures to speed repeated queries (at the cost of more memory). If basically does a binary search in a sorted array using std::lower_bound()[1] after sorting the array on first call. [1] http://www.sgi.com/tech/stl/lower_bound.html On Wed, Jul 8, 2015 at 8:08 AM Cory Quammen wrote: > Very nice, Jean. > > On Wed, Jul 8, 2015 at 4:21 AM, Favre Jean wrote: > >> my preference goes towards using numpy for this type to query >> >> use the where() function. >> >> # example 1: >> >> import vtk >> from vtk.numpy_interface import dataset_adapter as dsa >> >> # assuming your mesh data is in the object 'vtkgrid' >> np_grid = dsa.WrapDataObject(vtkgrid) >> >> # assuming your scalar variable is called 'scalars' >> np_scalars = np_grid.PointData['scalars'] >> >> # min and max are: >> print np.min(np_scalars), np.max(np_scalars) >> >> #Their position(s) in the array is(are): >> np.where(np_scalars == np.max(np_scalars)) >> np.where(np_scalars == np.min(np_scalars)) >> >> # example 2: >> >> a = np.array([0, 0, 1, 2, 8, 9, 10, 9, 0, 0, 0, 9, 10, 9, 8, 6, 4, 3, 0, >> 0]) >> >> In [51]: np.where(a == a.min()) >> Out[51]: (array([ 0, 1, 8, 9, 10, 18, 19]),) >> >> In [52]: np.where(a == a.max()) >> Out[52]: (array([ 6, 12]),) >> >> References: >> >> http://kitware.com/blog/home/post/714 >> >> ----------------- >> Jean >> CSCS >> > > > > -- > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.hadimogullari at netcad.com.tr Wed Jul 8 10:47:54 2015 From: ali.hadimogullari at netcad.com.tr (alihadim) Date: Wed, 8 Jul 2015 07:47:54 -0700 (MST) Subject: [vtkusers] Simplify is suggestion Message-ID: <1436366874350-5732764.post@n5.nabble.com> Hi All, I created vtk unstructuregrid data while uses cell type tetra.My data file size is 55 mb. After I uses vtkQuadricDecimation but I didn't take result. new output data cell count 0. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Simplify-is-suggestion-tp5732764.html Sent from the VTK - Users mailing list archive at Nabble.com. From MEEHANBT at nv.doe.gov Wed Jul 8 11:02:25 2015 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Wed, 8 Jul 2015 15:02:25 +0000 Subject: [vtkusers] Saving multiple time steps in a vtkXMLStructuredGrid file ... Message-ID: I was hoping to be able to write a scalar field that changed over time to a vtkXMLStructuredGridFile, following the example on this thread: http://public.kitware.com/pipermail/vtkusers/2012-November/077262.html But when I examined my ?*vts? file, the scalar function wasn?t written to a different time step. I?d be happy to turn this into an example on the wiki if I could get it to work ? import vtk NX = 10 NY = 10 NZ = 10 #-------------------------------Create your Grid-------------------------------# pts = vtk.vtkPoints() for i in range(NX): for j in range(NY): for k in range(NZ): pts.InsertNextPoint(i, j, k) sg = vtk.vtkStructuredGrid() sg.SetDimensions(NX, NY, NZ) sg.SetPoints(pts) f1 = vtk.vtkDoubleArray() f1.SetName("Function 1") for i in range(NX): for j in range(NY): for k in range(NZ): f1.InsertNextValue(i+j+k) sg.GetPointData().AddArray(f1) #----------------------------------Save File-----------------------------------# w = vtk.vtkXMLStructuredGridWriter() w.SetFileName("test.vts") w.SetInputData(sg) w.SetDataModeToAscii() w.SetCompressorTypeToNone() w.SetNumberOfTimeSteps(3) w.Start() w.WriteNextTime(0.0) w.WriteNextTime(0.1) # I wanted to see if I could change "Function 1" at the third time step, but # when I look at the file that is written, the time step for this never seems # to change? f1 = vtk.vtkDoubleArray() f1.SetName("Function 1") for i in range(NX): for j in range(NY): for k in range(NZ): f1.InsertNextValue(-(i+j+k)) sg.GetPointData().AddArray(f1) sg.Modified() w.WriteNextTime(0.2) w.Stop() From cory.quammen at kitware.com Wed Jul 8 11:15:20 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 8 Jul 2015 10:15:20 -0500 Subject: [vtkusers] Simplify is suggestion In-Reply-To: <1436366874350-5732764.post@n5.nabble.com> References: <1436366874350-5732764.post@n5.nabble.com> Message-ID: Hi, The vtkQuadricDecimationFilter only works with triangle cells. See [1]. Cory [1] http://www.vtk.org/doc/release/6.2/html/classvtkQuadricDecimation.html#details On Wed, Jul 8, 2015 at 9:47 AM, alihadim wrote: > Hi All, > I created vtk unstructuregrid data while uses cell type tetra.My data file > size is 55 mb. After I uses vtkQuadricDecimation but I didn't take result. > new output data cell count 0. > > > Thanks. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Simplify-is-suggestion-tp5732764.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 sean at rogue-research.com Wed Jul 8 13:48:14 2015 From: sean at rogue-research.com (Sean McBride) Date: Wed, 8 Jul 2015 13:48:14 -0400 Subject: [vtkusers] Build error, VTK 6.2, Mac OS X 10.10.4, GCC 4.9 In-Reply-To: References: Message-ID: <20150708174814.278657015@mail.rogue-research.com> On Tue, 7 Jul 2015 17:09:31 +0000, Bosler, Peter Andrew said: >/usr/include/dispatch/object.h:143:15: error: expected identifier or '(' >before '^' token > typedef void (^dispatch_block_t)(void); > ^ That caret indicates what's known as a "block", see: Probably gcc 4.9 doesn't support blocks. Maybe a newer gcc does? Also, the system headers in OS 10.10 maybe now assume that the compiler supports blocks, whereas the 10.9 headers maybe had #if cases to build without block support. You could try building against the 10.9 SDK instead (use CMAKE_OSX_SYSROOT). Or use clang instead of gcc. 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 Wed Jul 8 15:38:30 2015 From: oleg.krivosheev at xcision.com (Oleg Krivosheev) Date: Wed, 8 Jul 2015 15:38:30 -0400 Subject: [vtkusers] Display a filled semi-transparent contour? Message-ID: Hi, All currently I'm displaying contour coming as vtkPolyData in the vtcContourWidget and use vtkOrientedGlyphRepresentation. So it looks like set of points connected by smooth spline lines, editable, could set color, pattern etc. Is it possible to display such closed contour as filled semi-transparent (with some user-set alpha) one? Any help or pointer would be greatly appreciated regards OK -------------- next part -------------- An HTML attachment was scrubbed... URL: From anderchidi at yahoo.com Wed Jul 8 17:39:54 2015 From: anderchidi at yahoo.com (Anderson chidi Apunike) Date: Wed, 8 Jul 2015 21:39:54 +0000 (UTC) Subject: [vtkusers] vtk PLY reader errors Message-ID: <561499369.1762906.1436391594022.JavaMail.yahoo@mail.yahoo.com> Hi VTK developpers,? I am currently using vtkPLYReader class to load some polygonal objects.? I convert a txt file into a ply file ?(ascii format) with Python. When I try opening the ply file with VTKplyreader, it returns the following error:? ERROR: In ..\..\VTK\IO\vtkPLYReader.cxx, line 125? vtkPLYReader (000000000483BDE0): Cannot read geometry? When I try opening the same PLY file that I created usinga software caled MeshLab, it opens the file in Meshlab, showing all the points.? I am confused at this point, not knowing what to do about it. Here's part of my file. It has 266 vertices, but I reduced them to 15.It has no faces. It only has vertices with their respective x, y,z coordinates.? ply? format ascii 1.0? element vertex 15? property float x? property float y? property float z? element face 0? end_header? 53.242 91.622 149.959? 129.485 97.222 149.719? 81.920 4.705 46.381? 81.827 4.788 46.983? 80.120 4.781 47.902? 76.090 4.647 49.168? 68.482 6.366 51.216? 68.482 6.366 51.216? 58.200 11.971 54.295? 48.691 17.704 54.613? 40.140 25.495 53.721? 32.668 34.396 51.962? 26.993 44.212 46.917? 22.274 51.449 35.907? 24.514 49.859 18.384? Thanks.? Anderson -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Wed Jul 8 18:25:37 2015 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Wed, 8 Jul 2015 22:25:37 +0000 Subject: [vtkusers] vtk PLY reader errors In-Reply-To: <201507082140.t68Lduio022827-t68Lduiv022827@mta-1.nv.doe.gov> References: <201507082140.t68Lduio022827-t68Lduiv022827@mta-1.nv.doe.gov> Message-ID: If you add a line after "element face 0? property list uchar int vertex_index It will load just fine. Just for clarity, here is the whole file: ply format ascii 1.0 element vertex 15 property float x property float y property float z element face 0 property list uchar int vertex_index end_header 53.242 91.622 149.959 129.485 97.222 149.719 81.920 4.705 46.381 81.827 4.788 46.983 80.120 4.781 47.902 76.090 4.647 49.168 68.482 6.366 51.216 68.482 6.366 51.216 58.200 11.971 54.295 48.691 17.704 54.613 40.140 25.495 53.721 32.668 34.396 51.962 26.993 44.212 46.917 22.274 51.449 35.907 24.514 49.859 18.384 Here is the code I tested it with: import vtk r = vtk.vtkPLYReader() r.SetFileName("stuff.ply") r.Update() From: vtkusers > on behalf of Anderson chidi Apunike via vtkusers > Reply-To: Anderson chidi Apunike > Date: Wednesday, July 8, 2015 at 2:39 PM To: "vtkusers at vtk.org" > Subject: [vtkusers] vtk PLY reader errors Hi VTK developpers, I am currently using vtkPLYReader class to load some polygonal objects. I convert a txt file into a ply file (ascii format) with Python. When I try opening the ply file with VTKplyreader, it returns the following error: ERROR: In ..\..\VTK\IO\vtkPLYReader.cxx, line 125 vtkPLYReader (000000000483BDE0): Cannot read geometry When I try opening the same PLY file that I created usinga software caled MeshLab, it opens the file in Meshlab, showing all the points. I am confused at this point, not knowing what to do about it. Here's part of my file. It has 266 vertices, but I reduced them to 15. It has no faces. It only has vertices with their respective x, y,z coordinates. ply format ascii 1.0 element vertex 15 property float x property float y property float z element face 0 end_header 53.242 91.622 149.959 129.485 97.222 149.719 81.920 4.705 46.381 81.827 4.788 46.983 80.120 4.781 47.902 76.090 4.647 49.168 68.482 6.366 51.216 68.482 6.366 51.216 58.200 11.971 54.295 48.691 17.704 54.613 40.140 25.495 53.721 32.668 34.396 51.962 26.993 44.212 46.917 22.274 51.449 35.907 24.514 49.859 18.384 Thanks. Anderson -------------- next part -------------- An HTML attachment was scrubbed... URL: From tr_jun-jiang.ee at vitrox.com Wed Jul 8 20:16:21 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Wed, 8 Jul 2015 17:16:21 -0700 (MST) Subject: [vtkusers] converting vtkCallBackCommand into java In-Reply-To: References: <1436239695444-5732734.post@n5.nabble.com> Message-ID: <1436400981196-5732780.post@n5.nabble.com> Hi David. Thanks for reply. I will try it out. -- View this message in context: http://vtk.1045678.n5.nabble.com/converting-vtkCallBackCommand-into-java-tp5732734p5732780.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Jul 8 23:41:31 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 8 Jul 2015 22:41:31 -0500 Subject: [vtkusers] classes to learn more about vtk In-Reply-To: <46CB11F12B9DC24D860D4082451B318A14F69DF5@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A14F69DF5@exchange3.microbrightfield.com> Message-ID: Hi Doug, Not that I know of in the Research Triangle. Where are you in NC? There was a scientific visualization course taught for many years by Russell M Taylor at UNC Chapel Hill which wasn't a VTK course per se, but often involved VTK in some exercises and final projects. He has since departed from the university. The UNC School of Information and Library Science offers a course in Information Visualization, but I don't know if it involves VTK. Chris Healey at NC State teaches graphics and vis courses from time to time, but again they are not typically heavy on VTK. Sorry if that isn't much help, Cory On Wed, Jul 8, 2015 at 7:13 AM, Doug Hoppes wrote: > Hi all, > > > > I just moved to North Carolina. Does anyone know of any > classes taught by the local universities that teach vtk? I know that there > are courses taught by Kitware but more interested in something that was > longer than a week intensive. > > > > Doug > > > > _______________________________________________ > 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 alexmalvtk at gmail.com Thu Jul 9 01:47:40 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Wed, 8 Jul 2015 22:47:40 -0700 Subject: [vtkusers] [vtk-developers] VTK Roadmap In-Reply-To: References: <2CE400AE-BADE-42F0-94B8-C693F222147C@kitware.com> Message-ID: Thanks David, Berk and Ken for suggestions! vtkMultiBlockDataSet with vtkPolyData as blocks did produce the best performing results. Usage of vtkCompositePolyDataMapper2 gives more flexibility - no need to remove and re-add polydata in/out multiblock dataset which simplified my code greatly if you want to hide/show blocks , ability to color and set transparency (have not used yet) for each block is very useful. On top it seems fixes (might be only partially) behavior of vtkHardwareSelector. At least now it returns selection which I can track back to block. Why partially? Cause even I am sure I am selecting a single block area selection produces extra blocks. Interesting that if window is defined as a point (x1=x2, y1=y2) only correct result is produced. This may be either vtkHardwareSelector or vtkConvertSelection::ToSelectionType which I use to convert selection to vtkSelectionNode::BLOCKS. Mostly likely in vtkHardwareSelector cause selection it produces has too many Cell ids (checked with Dump). But at this moment I have not found an easy way to verify where exactly, so it will be probably a subject of another post tomorrow. Thanks again for suggestions! Alex On Wed, Jul 8, 2015 at 2:19 PM, Ken Martin wrote: > Hello Alex, > > > > Your use case is definitely one that I would like to see work well in the > current VTK with the new OpenGL2 backend. Currently the right mapper for > this type of work is something called vtkCompositePolyDataMapper2 taking a > composite dataset as input (See > Rendering/Core/Testing/Cxx/TestCompositePolyDataMapper2.cxx for an > example) Your use case may still run into performance issues as I have not > tested changing just one part of a composite dataset, but if it does run > into performance issues let me know as I do want that use case to work well > and it really should :-) > > > > Thanks > > Ken > > > > Ken Martin PhD > > Chairman & CFO > > Kitware Inc. > > 28 Corporate Drive > > Clifton Park NY 12065 > > ken.martin at kitware.com > > 518 881-4901 (w) > > 518 371-4573 (f) > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf > Of *Berk Geveci > *Sent:* Thursday, July 2, 2015 9:21 AM > *To:* David Thompson > *Cc:* Alex Malyushytskyy; VTK Developers; VTK Users > *Subject:* Re: [vtk-developers] [vtkusers] VTK Roadmap > > > > I agree with David. This is currently the best path for scene graph style > use, especially combined with the OpenGL2 backend. This will be available > in VTK 6.3 and VTK 7 but continues to evolve. So please let us know if you > run into issues, performance or otherwise. > > > > We also discussed developing a full-featured scene graph actor but it was > not a high priority. VTK's major use cases center around a few large > geometry objects or a large number of small objects that have related > properties coming from a point/cell array (molecules, tensors etc.) > However, we will continue to add more scene graph style capabilities to > multi-block rendering. Probably including transform support per block, > inheritance of properties from an upper node etc. > > > > Best, > > -berk > > > > On Thu, Jul 2, 2015 at 9:01 AM, David Thompson > wrote: > > Hi Alex, > > I think there is a third option that would be much more usable; generating > a multiblock dataset that uses a single actor and mapper, but in which each > block can be independently replaced with an edited version. As long as the > source only regenerates a small number of leaf nodes, this would not have a > large impact on memory, rendering, or picking performance. > > David > > > On Jul 1, 2015, at 11:49 PM, Alex Malyushytskyy > wrote: > > > As a user I think VTK during last 2 major releases acquired performance > issues which makes it very difficult if not impossible to use for my needs > as a developer of CAD type applications. > > > > Let me explain. Typical CAD application functionality can be > demonstrated on the building model. > > Building consists of a few type of structural components: columns, > beams, slabs and walls. > > Geometry of such component is defined by different attributes. For > column for example it might be section shape, cross-section dimension, etc. > > User of the CAD system should be able to select/pick components on the > screen, change such component attributes and should see geometry change on > the screen fast enough. > > > > Lets say we want to create 60 story building with 100 rooms per floor. > > This gives us 6000 components or about 50k rectangular cells. > > > > With vtk developer basically has 2 choices of the implementation: > > 1) minimize number of actors. Lets say actor for whole building. In > such case every component geometry is appended to the building polydata. So > finally you have only 1 dataset, 1 mapper and 1 actor. > > 2) create actor per component. In this case you have 1 dataset, 1 mapper > and 1 actor per component. > > > > Unfortunately neither approach works well for CAD application when model > has to be editable by user. At least not with VTK 6.0.1. > > > > Comparison of usage cases: > > > > - when you need to re-generate whole model geometry (for example file > withy model description loaded). > > Approach 1 demonstrates better performance even though it requires > additional append filter execution. > > Approach 2 is slow - from 6 to 10 times slower. For a building > described above it would be 7-8 sec for Approach 1 and 30-40 sec for > approach 2 on my system. > > > > - when you need to modify a single component and update presentation. > > > > Approach 1 takes basically the same time as regenerate model from the > scratch. > > It takes basically the same time as regenerate model from the scratch. > > But 7 sec are not acceptable anymore. > > Modification of the dataset itself takes no time. All time is taken by > vtk pipeline. > > So basically there is no way for improvement. > > > > - picking/selection components. > > Approach 1 is slow. Keep in mind that user have to select components, > not cells. > > So in this case you have to add to cell field which would allow to keep > track which component picked cells belong to. Then selection is equivalent > of adding data field to polydata and after picking setting value to such > field for all cells which belong to that component. > > This is definitely slower than for Approach 2. When all you need to keep > tracking and select appropriate actor . > > > > > > Approach 2 is very fast(less than second). > > User would might be able to survive slow initial model loading, > > if there were not any other differences. > > > > Unfortunately when you look at the application memory usage such model > when approach 2 is used will take over 1.5 GB of memory when in case of > approach 1 just about 140k. > > That is for single view. You would not be able to display such model in > 2 views on 32 bit Windows. > > > > > > That is counting that you static mode and ImmediateModeRenderingOn were > set for mapper, > > and no intermediate filters are stored ( vtkPolydata -> Mapper -> actor > pipeline is used). > > > > With number of components increasing memory usage and time grow. > > So basically described above model is about as big editable model as VTK > can handle without user breaking monitor after 30 min of work. > > > > For comparison I was using hoops3d (1998-2000) for developing of 3D FEM > pre-, post-processing application with similar capabilities. 15 years ago > on the appropriate systems I've seen better performance. Also I believe > that 10 years ago VTK did not require such memory to display such size of > data with exactly the same pipeline. > > I blame changes in vtk 5 and 6. > > > > As a conclusion I afraid vtk 6 is not useable if you have to deal with > dynamic changeable systems of average size on a single computer. > > > > I wish that was targeted. If not in vtk 6, may be in vtk7. > > > > > > On Tue, Jun 30, 2015 at 1:24 PM, Berk Geveci > wrote: > > Yup. Python 3 is now on the roadmap. Probably the first release after > 7, in a few months. > > > > -berk > > > > On Tue, Jun 30, 2015 at 3:48 PM, David Gobbi > wrote: > > On Tue, Jun 30, 2015 at 12:47 PM, Matthew Brett > wrote: > > Hi, > > > > On Tue, Jun 30, 2015 at 10:58 AM, 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. > > > > I would like to put in a humble plea to add Python 3 compatibility to > that list: > > > > http://astrofrog.github.io/blog/2015/05/09/2015-survey-results > > > > Python 3 is being worked on (right now by me, and others can join in a > couple weeks once the core pieces are in place). No, it won't be part of > 6.3, however. > > > > - David > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Search the list archives at: > http://markmail.org/search/?q=vtk-developers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtk-developers > > > > > > > > > > _______________________________________________ > > 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 > > _______________________________________________ > 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 Charles.GARRAUD at b-com.com Thu Jul 9 05:43:34 2015 From: Charles.GARRAUD at b-com.com (Charles GARRAUD) Date: Thu, 9 Jul 2015 09:43:34 +0000 Subject: [vtkusers] Porting QVTKWidget to QtQuick2 Message-ID: Hi, As a VTK and QT user, I used to make intensive use of QVTKWidget. I've switched to QML for non-vtk applications and I would like to do so for vtk app as well. Do you plan to port QVTKWidget to QtQuick2 or it is not in the box for now? Thanks for your answer, Best Regards Charles -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.hadimogullari at netcad.com.tr Thu Jul 9 09:01:35 2015 From: ali.hadimogullari at netcad.com.tr (alihadim) Date: Thu, 9 Jul 2015 06:01:35 -0700 (MST) Subject: [vtkusers] Simplify is suggestion In-Reply-To: References: <1436366874350-5732764.post@n5.nabble.com> Message-ID: <1436446895386-5732790.post@n5.nabble.com> Hi, I tried to open the program using ParaView. This program opened and I saw that using simplify method. I think paraview is using a different algorithm. (I know that paraview is using VTK to.) -- View this message in context: http://vtk.1045678.n5.nabble.com/Simplify-is-suggestion-tp5732764p5732790.html Sent from the VTK - Users mailing list archive at Nabble.com. From utkarsh.ayachit at kitware.com Thu Jul 9 10:03:49 2015 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Thu, 09 Jul 2015 14:03:49 +0000 Subject: [vtkusers] [vtk-developers] VTK Roadmap In-Reply-To: References: <2CE400AE-BADE-42F0-94B8-C693F222147C@kitware.com> Message-ID: > > > On top it seems fixes (might be only partially) behavior of > vtkHardwareSelector. At least now it returns selection which I can track > back to block. Why partially? Cause even I am sure I am selecting a single > block area selection produces extra blocks. Interesting that if window is > defined as a point (x1=x2, y1=y2) only correct result is produced. > Do you have sample code to demonstrate this? We use this vtkConvertSelection in ParaView without this issue. Utkarsh -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Thu Jul 9 10:40:00 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 9 Jul 2015 10:40:00 -0400 Subject: [vtkusers] Porting QVTKWidget to QtQuick2 In-Reply-To: References: Message-ID: Hi Charles, Currently there are no plans of adding QtQuick2 support for VTK. One alternative I'd suggest is that if you have a QWidget application, you can use QWidget::createWindowContainer to embed QML parts. That way, you can create a QMainWindow to use QVTKWidget. Hope that helps. Warm Regards, Sankhesh Jhaveri Research & Development Engineer Kitware, Inc. *Phone*: (518) 881 4417 *Fax*: (518) 371 4573 On Thu, Jul 9, 2015 at 5:43 AM, Charles GARRAUD wrote: > Hi, > > > > As a VTK and QT user, I used to make intensive use of QVTKWidget. > > I?ve switched to QML for non-vtk applications and I would like to do so > for vtk app as well. > > > > Do you plan to port QVTKWidget to QtQuick2 or it is not in the box for now? > > > > Thanks for your answer, > > > > Best Regards > > > > Charles > > > > _______________________________________________ > 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 Jul 9 10:48:44 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 9 Jul 2015 07:48:44 -0700 (MST) Subject: [vtkusers] vtkContourWidget with vtkImageSlice Message-ID: <1436453324506-5732800.post@n5.nabble.com> Hi, I'm trying to connect vtkContourWidget in a vtkImageSlice, but I'm having trouble first when I try to direct, vtkContourWidget appears incorrectly in the plane (always behind the images). When I try to use vtkImagePointPlacer, which I believe is the correct outside, the entrance to it is a VtkImageActor, and I can not draw this kind of vtkImageSlice object. I'm letting go something? Or is there some other way to make that connection? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkContourWidget-with-vtkImageSlice-tp5732800.html Sent from the VTK - Users mailing list archive at Nabble.com. From 15891495523 at 126.com Thu Jul 9 10:51:11 2015 From: 15891495523 at 126.com (15891495523 at 126.com) Date: Thu, 9 Jul 2015 22:51:11 +0800 Subject: [vtkusers] A question about displaying Image using VTK Message-ID: <2015070922510984090213@126.com> Dear all I feel confused when display a CT image using VTK. How can I make those black and gray part in the following picture invisible ? The key part of my code is : vtkSmartPointer opacityTransferFunction = vtkSmartPointer::New(); opacityTransferFunction->AddPoint(0,1200); opacityTransferFunction->AddPoint(1200,0.4); opacityTransferFunction->AddPoint(2000,0.2); vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); colorTransferFunction->AddRGBPoint(0,0,0.5,0); colorTransferFunction->AddRGBPoint(60,1,0,0); colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); Thank you in advanced! ZhangQiang -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InsertPic_.jpg Type: image/jpeg Size: 100667 bytes Desc: not available URL: From dave.demarle at kitware.com Thu Jul 9 12:30:28 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 9 Jul 2015 12:30:28 -0400 Subject: [vtkusers] classes to learn more about vtk In-Reply-To: References: <46CB11F12B9DC24D860D4082451B318A14F69DF5@exchange3.microbrightfield.com> Message-ID: Utah had a similar visualization with VTK course back when I was a student and the world was young. Any other Universities out there currently teaching a Vis with VTK type course? If so is there a tele-commuting aspect? If not would any professors like to collaborate with Kitware on putting one together? Barring that sometimes when we work closely with researchers from other companies and labs on a big project we structure the contract such that our collaborators get embedded for a time at Kitware. Early on in the meeting we get each other up to speed (often with Kitware's side presenting the course materials). Then we work together closely on whatever project we are undertaking taking advantage of proximity to get things done in a hurry. So basically a code sprint at Kitware. hope that helps David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Jul 8, 2015 at 11:41 PM, Cory Quammen wrote: > Hi Doug, > > Not that I know of in the Research Triangle. Where are you in NC? > > There was a scientific visualization course taught for many years by > Russell M Taylor at UNC Chapel Hill which wasn't a VTK course per se, but > often involved VTK in some exercises and final projects. He has since > departed from the university. The UNC School of Information and Library > Science offers a course in Information Visualization, but I don't know if > it involves VTK. Chris Healey at NC State teaches graphics and vis courses > from time to time, but again they are not typically heavy on VTK. > > Sorry if that isn't much help, > Cory > > On Wed, Jul 8, 2015 at 7:13 AM, Doug Hoppes > wrote: > >> Hi all, >> >> >> >> I just moved to North Carolina. Does anyone know of any >> classes taught by the local universities that teach vtk? I know that there >> are courses taught by Kitware but more interested in something that was >> longer than a week intensive. >> >> >> >> Doug >> >> >> >> _______________________________________________ >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Jul 9 12:42:56 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 9 Jul 2015 11:42:56 -0500 Subject: [vtkusers] A question about displaying Image using VTK In-Reply-To: <2015070922510984090213@126.com> References: <2015070922510984090213@126.com> Message-ID: Instead of using a vtkColorTransferFunction, try using a vtkDiscretizableColorTransferFunction and setting the opacity function via SetScalarOpacityFunction(), e.g. vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); colorTransferFunction->AddRGBPoint(0,0,0.5,0); colorTransferFunction->AddRGBPoint(60,1,0,0); colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); colorTransferFunction->SetScalarOpacityFunction(opacityTransferFunction); then enable opacity mapping with colorTransferFunction->EnableOpacityMappingOn(); HTH, Cory On Thu, Jul 9, 2015 at 9:51 AM, 15891495523 at 126.com <15891495523 at 126.com> wrote: > Dear all > > I feel confused when display a CT image using VTK. How can I make > those black and gray part in the following picture invisible ? > The key part of my code is : > > vtkSmartPointer opacityTransferFunction = > vtkSmartPointer::New(); > opacityTransferFunction->AddPoint(0,1200); > opacityTransferFunction->AddPoint(1200,0.4); > opacityTransferFunction->AddPoint(2000,0.2); > > vtkSmartPointer colorTransferFunction = > vtkSmartPointer::New(); > colorTransferFunction->AddRGBPoint(0,0,0.5,0); > colorTransferFunction->AddRGBPoint(60,1,0,0); > colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); > > > Thank you in advanced! > > ZhangQiang > > > ------------------------------ > > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: InsertPic_.jpg Type: image/jpeg Size: 100667 bytes Desc: not available URL: From sankhesh.jhaveri at kitware.com Thu Jul 9 16:15:07 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 9 Jul 2015 16:15:07 -0400 Subject: [vtkusers] Save images of a volume in 1: 1 In-Reply-To: <1436271767003-5732742.post@n5.nabble.com> References: <1436271767003-5732742.post@n5.nabble.com> Message-ID: Hi Jose, vtkWindowToImageFilter grabs a screenshot of the render window. To write the image out, you will need to pass the image to the writer. Something like, writer->SetInputData() Warm Regards, Sankhesh Jhaveri Research & Development Engineer Kitware, Inc. *Phone*: (518) 881 4417 *Fax*: (518) 371 4573 On Tue, Jul 7, 2015 at 8:22 AM, Jose Barreto wrote: > I'm using a vtkVolume to display a DICOM volume. > > How should I proceed to save the image generated by this vtkVolume ensuring > its size in 1: 1? And if possible with a dpi of 300? > > I saw the way to save is to be ... > > Void UCModulo3D::WindowToJPG(vtkRenderWindow * rw, const char * filename) > { > vtkWindowToImageFilter * filter = vtkWindowToImageFilter::New(); > filter->SetInput(rw); > filter->Update(); > > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName(filename); > writer->SetInputData(filter->GetOutput()); > writer->Write(); > writer->Delete(); > filter->Delete(); > } > > But in this way the size is taken into consideration the vtkrenderwindo > size. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Save-images-of-a-volume-in-1-1-tp5732742.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 Jul 9 19:39:40 2015 From: siavashk at ece.ubc.ca (siavashk) Date: Thu, 9 Jul 2015 16:39:40 -0700 (MST) Subject: [vtkusers] VTK Change Value Event Message-ID: <1436485180677-5732812.post@n5.nabble.com> [Sorry for possible multiple postings, I am not sure if my original email went through] Hello, I am trying to write a complicated GUI. The final GUI should have a minimap and it should also be able to zoom and pan images. The minimap has a rectangle that corresponds to the viewport. There are two challenges associated with this problem that make it difficult compared to standard vtk examples: 1) If the zoom value is beyond a threshold, I have to load a higher reolution image from the hard drive and update the displayed vtkImage and the minimap accordingly; and 2) Higher resolution images are also larger than the available memory (~10 GB), so I cannot load the entire image at once. I should only load part of the image that is to be displayed on the viewport. I am using the mouse wheel event and mouse move events for zooming and panning. I am updating the minimap using the window render event. The issue is that the minimap, zoom and pan callbacks (classes inherited from vtkCommand), share states. For example, if the zoom changes using the mouse wheel, the size of the rectangle in the minimap callback should change too. As a result, keeping track of shared information between callbacks is too complicated. What I think I should do is to have user events change the state of the GUI (e.g. the zoom value) and have callbacks that execute when the state changes. Unfortunately, I am not sure how to do this properly in VTK. So my question is this: *Is there a way to fire an event when a value (e.g. a double variable) is changed in VTK? And how do you catch this event?* Thank you, Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Change-Value-Event-tp5732812.html Sent from the VTK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Thu Jul 9 19:32:35 2015 From: siavashk at ece.ubc.ca (Siavash) Date: Thu, 9 Jul 2015 16:32:35 -0700 Subject: [vtkusers] VTK Change Value Event Message-ID: <559F0493.5080606@ece.ubc.ca> Hello, I am trying to write a complicated GUI. The final GUI should have a minimap and it should also be able to zoom and pan images. The minimap has a rectangle that corresponds to the viewport. There are two challenges associated with this problem that make it difficult compared to standard vtk examples: 1) If the zoom value is beyond a threshold, I have to load a higher reolution image from the hard drive and update the displayed vtkImage and the minimap accordingly; and 2) Higher resolution images are also larger than the available memory (~10 GB), so I cannot load the entire image at once. I should only load part of the image that is to be displayed on the viewport. I am using the mouse wheel event and mouse move events for zooming and panning. I am updating the minimap using the window render event. The issue is that the minimap, zoom and pan callbacks (classes inherited from vtkCommand), share states. For example, if the zoom changes using the mouse wheel, the size of the rectangle in the minimap callback should change too. As a result, keeping track of shared information between callbacks is too complicated. What I think I should do is to have user events change the state of the GUI (e.g. the zoom value) and have callbacks that execute when the state changes. Unfortunately, I am not sure how to do this properly in VTK. *_So my question is this: Is there a way to fire an event when a value (e.g. a double variable) is changed in VTK? And how do you catch this event?_* Thank you, Siavash -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Thu Jul 9 20:17:39 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Thu, 9 Jul 2015 17:17:39 -0700 Subject: [vtkusers] [vtk-developers] VTK Roadmap In-Reply-To: References: <2CE400AE-BADE-42F0-94B8-C693F222147C@kitware.com> Message-ID: It seems style interactor breaks something when window is drawn. Calling vtkRenderer::Render() before vtkHardwareSelector:: Select() solved the problem. Regards, Alex On Thu, Jul 9, 2015 at 7:03 AM, Utkarsh Ayachit wrote: > >> On top it seems fixes (might be only partially) behavior of >> vtkHardwareSelector. At least now it returns selection which I can track >> back to block. Why partially? Cause even I am sure I am selecting a single >> block area selection produces extra blocks. Interesting that if window is >> defined as a point (x1=x2, y1=y2) only correct result is produced. >> > > Do you have sample code to demonstrate this? We use > this vtkConvertSelection in ParaView without this issue. > > Utkarsh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 15891495523 at 126.com Fri Jul 10 02:55:40 2015 From: 15891495523 at 126.com (15891495523 at 126.com) Date: Fri, 10 Jul 2015 14:55:40 +0800 Subject: [vtkusers] A question about displaying Image using VTK References: <2015070922510984090213@126.com>, Message-ID: <201507101117411951732@126.com> Dear Cory I am sorry, but those code doesn't work. And the complete code is : void main() { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetDirectoryName("G:\\Perfusion Project\\Perfusion_MIP\\MIP\\TimePhase\\Time2"); reader->SetDataByteOrderToBigEndian(); reader->Update(); vtkSmartPointer shift = vtkSmartPointer::New(); shift->SetInputConnection(reader->GetOutputPort()); shift->SetOutputScalarTypeToUnsignedShort(); shift->Update(); vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputData(shift->GetOutput()); reslice->SetOutputDimensionality(3); reslice->Update(); vtkSmartPointer image = vtkSmartPointer::New(); image=reslice->GetOutput(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputData(image); writer->SetFileName("C:\\Users\\zhq\\Desktop\\VolumeData.vtk"); writer->Update(); vtkSmartPointer ren = vtkSmartPointer::New(); vtkSmartPointer renWin = vtkSmartPointer::New(); vtkSmartPointer iren = vtkSmartPointer::New(); vtkSmartPointer style = vtkSmartPointer::New(); renWin->AddRenderer(ren); renWin->SetInteractor(iren); iren->SetInteractorStyle(style); vtkSmartPointer opacityTransferFunction = vtkSmartPointer::New(); opacityTransferFunction->AddPoint(0,1200); opacityTransferFunction->AddPoint(1200,0.4); opacityTransferFunction->AddPoint(2000,0.2); /*vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); colorTransferFunction->AddRGBPoint(0,0,0.5,0); colorTransferFunction->AddRGBPoint(60,1,0,0); colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8);*/ vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); colorTransferFunction->AddRGBPoint(0,0,0.5,0); colorTransferFunction->AddRGBPoint(60,1,0,0); colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); colorTransferFunction->SetScalarOpacityFunction(opacityTransferFunction); colorTransferFunction->EnableOpacityMappingOn(); vtkSmartPointer volumeProperty = vtkSmartPointer::New(); volumeProperty->SetColor(colorTransferFunction); volumeProperty->SetScalarOpacity(opacityTransferFunction); volumeProperty->ShadeOn(); volumeProperty->SetInterpolationTypeToLinear(); volumeProperty->SetAmbient(0.2); vtkSmartPointer mipRayCastFunction = vtkSmartPointer::New(); vtkSmartPointer compositeFunction = vtkSmartPointer::New(); vtkSmartPointer volumeMapper = vtkSmartPointer::New(); volumeMapper->SetVolumeRayCastFunction(compositeFunction); volumeMapper->SetInputData(image); vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); ren->AddVolume(volume); ren->SetBackground(1,1,1); renWin->Render(); iren->Initialize(); iren->Start(); } Thank you very much! ZhangQiang From: Cory Quammen Date: 2015-07-10 00:42 To: 15891495523 at 126.com CC: vtkusers Subject: Re: [vtkusers] A question about displaying Image using VTK Instead of using a vtkColorTransferFunction, try using a vtkDiscretizableColorTransferFunction and setting the opacity function via SetScalarOpacityFunction(), e.g. vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); colorTransferFunction->AddRGBPoint(0,0,0.5,0); colorTransferFunction->AddRGBPoint(60,1,0,0); colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); colorTransferFunction->SetScalarOpacityFunction(opacityTransferFunction); then enable opacity mapping with colorTransferFunction->EnableOpacityMappingOn(); HTH, Cory On Thu, Jul 9, 2015 at 9:51 AM, 15891495523 at 126.com <15891495523 at 126.com> wrote: Dear all I feel confused when display a CT image using VTK. How can I make those black and gray part in the following picture invisible ? The key part of my code is : vtkSmartPointer opacityTransferFunction = vtkSmartPointer::New(); opacityTransferFunction->AddPoint(0,1200); opacityTransferFunction->AddPoint(1200,0.4); opacityTransferFunction->AddPoint(2000,0.2); vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); colorTransferFunction->AddRGBPoint(0,0,0.5,0); colorTransferFunction->AddRGBPoint(60,1,0,0); colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); Thank you in advanced! ZhangQiang _______________________________________________ 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. ?????????????????????????????????????????? ?? 1 ??? InsertPic_.jpg(99K) ???? ???? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InsertPic_(07-10-14-55-37).jpg Type: image/jpeg Size: 22021 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InsertPic_(07-10(07-10-14-55-37).jpg Type: image/jpeg Size: 100667 bytes Desc: not available URL: From Gerald.Lodron at joanneum.at Fri Jul 10 02:59:05 2015 From: Gerald.Lodron at joanneum.at (Lodron, Gerald) Date: Fri, 10 Jul 2015 06:59:05 +0000 Subject: [vtkusers] Crash on vtkImageData with QNan Message-ID: Hi I wrote an application to watch some normal 2D image data. When I load a floating point image (monochrome) including QNan's I get a complete crash. I tried compiling my program in debug mode but here the app only hangs up (no crash directly), pressing on debugs pause seems to hang anywhere in window's nvoglv64.dll. When I compile my program in DebugWithRel Runtime it seemed that it is anywhere in vtkImageStatistics.dll. I am using image statistics but their functions were not called by my app (user needs to call special GUI entry), should not be called in current application usage so crash must be anywhere in rendering pipeline..... I also debugged it using std::cout's in release mode but it seems that my pipeline building up works perfectly and returns, crash seems to be later after some "interactor" or "Mapper" pipeline stuff.... Any ideas/suggestions to find the error? Replacing pixel values before rendering would be an option but is not very nice since I want to show the image data and not modified image data.... Thanks, best regards Gerald Lodron Machine Vision Applications DIGITAL - Institute for Information and Communication Technologies JOANNEUM RESEARCH Forschungsgesellschaft mbH Steyrergasse 17, 8010 Graz, AUSTRIA phone: +43-316-876-1751 fax: +43-316-876-1751 web: http://www.joanneum.at/digital e-mail: gerald.lodron at joanneum.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.sambin at gmail.com Fri Jul 10 04:49:54 2015 From: m.sambin at gmail.com (Marco Sambin) Date: Fri, 10 Jul 2015 10:49:54 +0200 Subject: [vtkusers] vtkImageReslice and SetSlabNumberOfSlices(int) Message-ID: Hi. Regarding the SetSlabSliceSpacingFraction() method of vtkImageReslice, it is a recent addition? I cannot find it in my VTK 6.1... Thanks and best regards, Marco Sambin On Tue, Jul 7, 2015 at 9:19 AM, Marco Sambin wrote: > David, > > Thanks for the clarification. > Regards, > > Marco > Il 03/lug/2015 08:09 PM, "David Gobbi" ha scritto: > >> Yes, the slab is centered wrt the reslice plane. So if >> SlabNumberOfSlices is even, then the two middle "slab" slices will be on >> either side of the reslice plane (+0.5 above and -0.5 below). >> >> Though this isn't quite related, note that it is possible to change the >> spacing between the "slab" slices with SetSlabSliceSpacingFraction(). >> >> - David >> >> On Fri, Jul 3, 2015 at 3:51 AM, Marco Sambin wrote: >> >>> Hi all, >>> >>> with reference to this old question of mine (see below), I would like a >>> clarification: >>> >>> suppose that the output z-spacing is set to 1 mm on my vtkImageReslice >>> instance. Also, suppose that I call SetSlabNumberOfSlices(2) on my reslicer. >>> Where will the 2 slices used to compute the slab image be located w.r.t. >>> the position of my reslice plane? Will the first slice be 0.5 mm "above" >>> and the second slice be 0.5 mm "below" my reslice plane? In other words, >>> will the slices always be "centered" w.r.t. the position of my reslice >>> plane? >>> >>> Maybe this is a silly question, but I like to exactly understand this >>> point. >>> >>> Thanks in advance for the clarification. >>> Regards, >>> >>> Marco >>> >>> >>> On Mon, Mar 25, 2013 at 9:59 PM, Marco Sambin >>> wrote: >>> >>>> Hi David, >>>> >>>> Thanks for the clarification. >>>> I will test this soon. >>>> Regards, >>>> >>>> Marco >>>> Il giorno 25/mar/2013 14:24, "David Gobbi" ha >>>> scritto: >>>> >>>>> Hi Marco, >>>>> >>>>> The way it works is this: vtkImageReslice is creating the slab by >>>>> extracting N samples and combining them, where the distance between >>>>> the samples is set by the third argument to SetOutputSpacing(). If >>>>> the SlabNumberOfSlices is N, then the slab thickness is >>>>> (N-1)*spacing[2] where spacing[2] is the z-spacing set with >>>>> SetOutputSpacing(spacing[0],spacing[1],spacing[2]). >>>>> >>>>> Summary: thickness = (N - 1)*spacing[2] >>>>> >>>>> Slab mode is equivalent to extracting N slices and combining them. >>>>> >>>>> - David >>>>> >>>>> On Mon, Mar 25, 2013 at 6:01 AM, Marco Sambin >>>>> wrote: >>>>> > Hi all. >>>>> > I am looking at implementing thick reformats through vtkImageReslice. >>>>> > >>>>> > Even after looking at the documentation, I did not fully understand >>>>> the >>>>> > SetSlabNumberOfSlices(int) method. For instance, in cases of an >>>>> oblique >>>>> > reformat, what is considered to be a "slice"? What defines the >>>>> "thickness" >>>>> > of a single slice, thus determining the total slab thickness >>>>> resulting from >>>>> > calling SetSlabNumberOfSlices(X)? >>>>> > >>>>> > I was expecting a call like SetSlabThickness(...), rather than >>>>> > SetSlabNumberOfSlices(...). >>>>> > >>>>> > I would appreciate any comment on this. >>>>> > Thanks in advance. >>>>> > >>>>> > Marco >>>> >>>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jul 10 08:52:52 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 10 Jul 2015 06:52:52 -0600 Subject: [vtkusers] vtkImageReslice and SetSlabNumberOfSlices(int) In-Reply-To: References: Message-ID: Hi Marco, It was added a few months after VTK 6.1 was released. - David On Fri, Jul 10, 2015 at 2:49 AM, Marco Sambin wrote: > Hi. > Regarding the SetSlabSliceSpacingFraction() method of vtkImageReslice, it > is a recent addition? > I cannot find it in my VTK 6.1... > > Thanks and best regards, > > Marco Sambin > > > On Tue, Jul 7, 2015 at 9:19 AM, Marco Sambin wrote: > >> David, >> >> Thanks for the clarification. >> Regards, >> >> Marco >> Il 03/lug/2015 08:09 PM, "David Gobbi" ha >> scritto: >> >>> Yes, the slab is centered wrt the reslice plane. So if >>> SlabNumberOfSlices is even, then the two middle "slab" slices will be on >>> either side of the reslice plane (+0.5 above and -0.5 below). >>> >>> Though this isn't quite related, note that it is possible to change the >>> spacing between the "slab" slices with SetSlabSliceSpacingFraction(). >>> >>> - David >>> >>> On Fri, Jul 3, 2015 at 3:51 AM, Marco Sambin wrote: >>> >>>> Hi all, >>>> >>>> with reference to this old question of mine (see below), I would like a >>>> clarification: >>>> >>>> suppose that the output z-spacing is set to 1 mm on my vtkImageReslice >>>> instance. Also, suppose that I call SetSlabNumberOfSlices(2) on my reslicer. >>>> Where will the 2 slices used to compute the slab image be located >>>> w.r.t. the position of my reslice plane? Will the first slice be 0.5 mm >>>> "above" and the second slice be 0.5 mm "below" my reslice plane? In other >>>> words, will the slices always be "centered" w.r.t. the position of my >>>> reslice plane? >>>> >>>> Maybe this is a silly question, but I like to exactly understand this >>>> point. >>>> >>>> Thanks in advance for the clarification. >>>> Regards, >>>> >>>> Marco >>>> >>>> >>>> On Mon, Mar 25, 2013 at 9:59 PM, Marco Sambin >>>> wrote: >>>> >>>>> Hi David, >>>>> >>>>> Thanks for the clarification. >>>>> I will test this soon. >>>>> Regards, >>>>> >>>>> Marco >>>>> Il giorno 25/mar/2013 14:24, "David Gobbi" >>>>> ha scritto: >>>>> >>>>>> Hi Marco, >>>>>> >>>>>> The way it works is this: vtkImageReslice is creating the slab by >>>>>> extracting N samples and combining them, where the distance between >>>>>> the samples is set by the third argument to SetOutputSpacing(). If >>>>>> the SlabNumberOfSlices is N, then the slab thickness is >>>>>> (N-1)*spacing[2] where spacing[2] is the z-spacing set with >>>>>> SetOutputSpacing(spacing[0],spacing[1],spacing[2]). >>>>>> >>>>>> Summary: thickness = (N - 1)*spacing[2] >>>>>> >>>>>> Slab mode is equivalent to extracting N slices and combining them. >>>>>> >>>>>> - David >>>>>> >>>>>> On Mon, Mar 25, 2013 at 6:01 AM, Marco Sambin >>>>>> wrote: >>>>>> > Hi all. >>>>>> > I am looking at implementing thick reformats through >>>>>> vtkImageReslice. >>>>>> > >>>>>> > Even after looking at the documentation, I did not fully understand >>>>>> the >>>>>> > SetSlabNumberOfSlices(int) method. For instance, in cases of an >>>>>> oblique >>>>>> > reformat, what is considered to be a "slice"? What defines the >>>>>> "thickness" >>>>>> > of a single slice, thus determining the total slab thickness >>>>>> resulting from >>>>>> > calling SetSlabNumberOfSlices(X)? >>>>>> > >>>>>> > I was expecting a call like SetSlabThickness(...), rather than >>>>>> > SetSlabNumberOfSlices(...). >>>>>> > >>>>>> > I would appreciate any comment on this. >>>>>> > Thanks in advance. >>>>>> > >>>>>> > Marco >>>>> >>>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anderchidi at yahoo.com Fri Jul 10 10:35:00 2015 From: anderchidi at yahoo.com (Anderson chidi Apunike) Date: Fri, 10 Jul 2015 14:35:00 +0000 (UTC) Subject: [vtkusers] vtk PLY reader errors In-Reply-To: <20150708222551.0E1BBB05FD@public.kitware.com> References: <201507082140.t68Lduio022827-t68Lduiv022827@mta-1.nv.doe.gov> <20150708222551.0E1BBB05FD@public.kitware.com> Message-ID: <1839103616.3020211.1436538900529.JavaMail.yahoo@mail.yahoo.com> Thanks Meehan, the error doesn't appear anymore.?I was expecting to recieve this message on my inbox folder, but it entered as spam and I check on it with a lesser frequency. Thanks for your help, I appreciate it. On Wednesday, July 8, 2015 7:25 PM, "Meehan, Bernard" wrote: If you add a line after "element face 0? property list uchar int vertex_index It will load just fine. Just for clarity, here is the whole file:plyformat ascii 1.0element vertex 15property float xproperty float yproperty float zelement face 0property list uchar int vertex_indexend_header53.242 91.622 149.959129.485 97.222 149.71981.920 4.705 46.38181.827 4.788 46.98380.120 4.781 47.90276.090 4.647 49.16868.482 6.366 51.21668.482 6.366 51.21658.200 11.971 54.29548.691 17.704 54.61340.140 25.495 53.72132.668 34.396 51.96226.993 44.212 46.91722.274 51.449 35.90724.514 49.859 18.384 Here is the code I tested it with:import vtkr = vtk.vtkPLYReader()r.SetFileName("stuff.ply")r.Update() From: vtkusers on behalf of Anderson chidi Apunike via vtkusers Reply-To: Anderson chidi Apunike Date: Wednesday, July 8, 2015 at 2:39 PM To: "vtkusers at vtk.org" Subject: [vtkusers] vtk PLY reader errors Hi VTK developpers,? I am currently using vtkPLYReader class to load some polygonal objects.? I convert a txt file into a ply file ?(ascii format) with Python. When I try opening the ply file with VTKplyreader, it returns the following error:? ERROR: In ..\..\VTK\IO\vtkPLYReader.cxx, line 125? vtkPLYReader (000000000483BDE0): Cannot read geometry? When I try opening the same PLY file that I created usinga software caled MeshLab, it opens the file in Meshlab, showing all the points.? I am confused at this point, not knowing what to do about it. Here's part of my file. It has 266 vertices, but I reduced them to 15.It has no faces. It only has vertices with their respective x, y,z coordinates.? ply? format ascii 1.0? element vertex 15? property float x? property float y? property float z? element face 0? end_header? 53.242 91.622 149.959? 129.485 97.222 149.719? 81.920 4.705 46.381? 81.827 4.788 46.983? 80.120 4.781 47.902? 76.090 4.647 49.168? 68.482 6.366 51.216? 68.482 6.366 51.216? 58.200 11.971 54.295? 48.691 17.704 54.613? 40.140 25.495 53.721? 32.668 34.396 51.962? 26.993 44.212 46.917? 22.274 51.449 35.907? 24.514 49.859 18.384? Thanks.? Anderson _______________________________________________ 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 github at stefanlau.com Fri Jul 10 11:46:51 2015 From: github at stefanlau.com (Stefan Lau) Date: Fri, 10 Jul 2015 17:46:51 +0200 Subject: [vtkusers] vtkGL2PSExporter in combination with QVTKRenderWindowInteractor In-Reply-To: References: <55914017.1010506@stefanlau.com> Message-ID: <559FE8EB.2060300@stefanlau.com> Allright after a short holiday, I had another few hours to debug the issue. But no success. Some other stuff that I tried (but now I'm out of ideas): * Installing everything inside a VirtualBox running Ubuntu 14.04 (using the Ubuntu-provided vtk packages, which are broken btw: https://bugs.launchpad.net/ubuntu/+source/vtk6/+bug/1354127) * Using VTK 6.2 (building my own version of VTK) * Using OpenGL software rendering (I thought that maybe it's a driver issue of the intel drivers) All yield the same corrupted result: The image that I sent in the last email. I haven't tried running it on a completely different machine, since I have none available ATM. Any ideas on how I could proceed? - Stefan Am 29.06.2015 um 16:23 schrieb David Lonie: > and the attachment... > > On Mon, Jun 29, 2015 at 10:22 AM, David Lonie > wrote: > > Running the test script works for me -- see attachment, the VTK > window is on the right, and the svg rendered in chrome on the left. > > Some other issues that might be coming into play: > > 1) What Qt version are you using, and > 2) Which OpenGL backend is being used on VTK? (Did you explicitly > select the experimental OpenGL2 backend while building VTK?) > > Dave > > > On Mon, Jun 29, 2015 at 8:54 AM, Stefan Lau > wrote: > > Hi, > > I'm trying to export an image from my application created in > PyQt4 to a > vector image. While the vtkGL2PSExporter works fine from > outside my QT > application, when trying to export the image from inside it > the output looks corrupted. A minimal example can be found at > the end of this email. Did I miss something (or call something > incorrectly)? Is this a known issue? > > Version: VTK 6.1.0 > > Thanks for any help, > Stefan Lau > > > > Minimal Example: > #!/usr/bin/env python > > import sys > import os > import vtk > from PyQt4 import QtCore, QtGui > from vtk.qt4.QVTKRenderWindowInteractor import > QVTKRenderWindowInteractor > > class MainWindow(QtGui.QMainWindow): > > def __init__(self, parent = None): > QtGui.QMainWindow.__init__(self, parent) > > self.frame = QtGui.QFrame() > > self.vl = QtGui.QVBoxLayout() > self.vtkWidget = QVTKRenderWindowInteractor(self.frame) > self.vl.addWidget(self.vtkWidget) > > self.ren = vtk.vtkRenderer() > self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) > self.iren = > self.vtkWidget.GetRenderWindow().GetInteractor() > > # Create source > source = vtk.vtkSphereSource() > source.SetCenter(0, 0, 0) > source.SetRadius(5.0) > > # Create a mapper > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(source.GetOutputPort()) > > # Create an actor > actor = vtk.vtkActor() > actor.SetMapper(mapper) > > button = QtGui.QPushButton(self.frame) > button.setGeometry(20, 20, 32, 32) > button.setIcon(QtGui.QIcon.fromTheme('document-save')) > button.setToolTip('Save Visualization') > > button.clicked.connect(self.store_visualization) > > self.ren.AddActor(actor) > > self.ren.ResetCamera() > > self.frame.setLayout(self.vl) > self.setCentralWidget(self.frame) > > self.show() > self.iren.Initialize() > > def store_visualization(self, render_window): > file_name = str(QtGui.QFileDialog.getSaveFileName( > self, > 'Save Visualization', > os.path.join(os.getcwd(), '/visualization.svg'), > 'SVG-Images (*.svg)' > )) > > if len(file_name) > 0: > exporter = vtk.vtkGL2PSExporter() > exporter.SetRenderWindow(self.vtkWidget.GetRenderWindow()) > exporter.SetFileFormatToSVG() > exporter.CompressOff() > exporter.DrawBackgroundOff() > exporter.SetFilePrefix(os.path.splitext(file_name)[0]) > exporter.Write() > > > if __name__ == "__main__": > app = QtGui.QApplication(sys.argv) > window = MainWindow() > sys.exit(app.exec_()) > _______________________________________________ > 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.lonie at kitware.com Fri Jul 10 12:01:19 2015 From: david.lonie at kitware.com (David Lonie) Date: Fri, 10 Jul 2015 12:01:19 -0400 Subject: [vtkusers] vtkGL2PSExporter in combination with QVTKRenderWindowInteractor In-Reply-To: <559FE8EB.2060300@stefanlau.com> References: <55914017.1010506@stefanlau.com> <559FE8EB.2060300@stefanlau.com> Message-ID: On Fri, Jul 10, 2015 at 11:46 AM, Stefan Lau wrote: > Allright after a short holiday, I had another few hours to debug the > issue. But no success. > > Some other stuff that I tried (but now I'm out of ideas): > * Installing everything inside a VirtualBox running Ubuntu 14.04 (using > the Ubuntu-provided > vtk packages, which are broken btw: > https://bugs.launchpad.net/ubuntu/+source/vtk6/+bug/1354127) > * Using VTK 6.2 (building my own version of VTK) > * Using OpenGL software rendering (I thought that maybe it's a driver > issue of the intel drivers) > > All yield the same corrupted result: The image that I sent in the last > email. > I haven't tried running it on a completely different machine, since I have > none available ATM. > Any ideas on how I could proceed? > I'd try building the current development version and see if it persists. See the 'clone' section of https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md for the information on how to get the sources. After downloading, the build process should be the same as 6.2. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Jul 10 13:00:03 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 10 Jul 2015 12:00:03 -0500 Subject: [vtkusers] Simplify is suggestion In-Reply-To: <1436446895386-5732790.post@n5.nabble.com> References: <1436366874350-5732764.post@n5.nabble.com> <1436446895386-5732790.post@n5.nabble.com> Message-ID: Do you mean you saw the reduced level-of-detail representation of your data in ParaView when you were interactively changing the view? ParaView uses the vtkQuadricClustering decimation filter to compute that decimated geometry. Cory On Thu, Jul 9, 2015 at 8:01 AM, alihadim wrote: > Hi, > I tried to open the program using ParaView. This program opened and I saw > that using simplify method. > I think paraview is using a different algorithm. (I know that paraview is > using VTK to.) > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Simplify-is-suggestion-tp5732764p5732790.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 sayanmaity.10 at gmail.com Fri Jul 10 17:48:39 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Fri, 10 Jul 2015 14:48:39 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively Message-ID: <1436564919015-5732834.post@n5.nabble.com> I have a quick question : Does: vtkImageBlend (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/CombineImages) generate 3D / Volumetric representation of 2D Image Data by appending them Or vtkAppendPolyData(http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/CombinePolyData) enerate 3D / Volumetric representation of 2D vtkPolyData by appending them a response will be highly appreciate. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Jul 10 17:55:49 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 10 Jul 2015 16:55:49 -0500 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1436564919015-5732834.post@n5.nabble.com> References: <1436564919015-5732834.post@n5.nabble.com> Message-ID: On Fri, Jul 10, 2015 at 4:48 PM, Neel007 wrote: > I have a quick question : > > Does: > > vtkImageBlend > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/CombineImages) generate > 3D > / Volumetric representation of 2D Image Data by appending them > Nope. See vtkImageAppend for that functionality. > Or > > vtkAppendPolyData( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/CombinePolyData) > enerate 3D / Volumetric representation of 2D vtkPolyData by appending them > > a response will be highly appreciate. > Nope. It combines the various polydata you set as its input into a single polydata output. Are you trying to create a surface from a set of contours? If so, vtkVoxelContoursToSurfaceFilter might do what you want. HTH, Cory > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834.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 sayanmaity.10 at gmail.com Fri Jul 10 18:20:13 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Fri, 10 Jul 2015 15:20:13 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436564919015-5732834.post@n5.nabble.com> Message-ID: <1436566813503-5732836.post@n5.nabble.com> Dear Cory, Thank you for your quick response. Actually I am trying to generate 3D tetrahedral mesh representation from 2D series/stacks of binary images as a volume (binary volumetric Data). The 2D stacks of Binary Images are shown below: In Matlab by using iso2mesh toolbox, volume to mesh generator function can create the 3D tetrahedral mesh representation: I want to reproduce the same functionality for HPC version as you know the Matlab version is very inefficient when the stack size increase. I thin in VTK the pipeline will be more or less: 1) Read the *.tif files. 2) Find the iso contours (The white pixels in the image stacks) in each 2d image and generate isosurface. 3) Save them as a polydata object .vtp 4) Generate isosurface by loading the .vtp object vtk_Delaunay3D But not sure if the pipeline is implementable or which function to use. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5732836.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Jul 10 18:56:53 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 10 Jul 2015 17:56:53 -0500 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1436566813503-5732836.post@n5.nabble.com> References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> Message-ID: VTK doesn't have a built-in tetrahedral mesh-generation solution. vtkDelaunay3D computes a tetrahedral mesh, but it is of the convex hull of the points in its input, not a mesh within the volume defined by a vtkPolyData. You could try to use tetgen for that. Alternatively, you could create a 3D image from your input 2D images, then use vtkThreshold to create an unstructured grid of just the white parts of the 3D image. To convert the resulting hexahedral elements in the unstructured grid to tetrahedra, use vtkDataSetTriangleFilter. HTH, Cory On Fri, Jul 10, 2015 at 5:20 PM, Neel007 wrote: > Dear Cory, > > Thank you for your quick response. > > Actually I am trying to generate 3D tetrahedral mesh representation from 2D > series/stacks of binary images as a volume (binary volumetric Data). > > The 2D stacks of Binary Images are shown below: > > > > > In Matlab by using iso2mesh toolbox, volume to mesh generator function can > create the 3D tetrahedral mesh representation: > > > > I want to reproduce the same functionality for HPC version as you know the > Matlab version is very inefficient when the stack size increase. I thin in > VTK the pipeline will be more or less: > > 1) Read the *.tif files. > 2) Find the iso contours (The white pixels in the image stacks) in each 2d > image and generate isosurface. > 3) Save them as a polydata object .vtp > 4) Generate isosurface by loading the .vtp object vtk_Delaunay3D > > But not sure if the pipeline is implementable or which function to use. > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5732836.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 15891495523 at 126.com Fri Jul 10 20:34:21 2015 From: 15891495523 at 126.com (zhq) Date: Fri, 10 Jul 2015 17:34:21 -0700 (MST) Subject: [vtkusers] A question about QT+VTK Message-ID: <1436574861892-5732838.post@n5.nabble.com> Dear all I want to build a project using QT+VTK. I use the code giving by http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowNoUiFile My computer is: Win7+VS2012+VTK6.0+QT5 When I build the project using CMake, the error appears: What can I do ? Thank you in advanced! ZhangQiang -- View this message in context: http://vtk.1045678.n5.nabble.com/A-question-about-QT-VTK-tp5732838.html Sent from the VTK - Users mailing list archive at Nabble.com. From pabloarubi at gmail.com Fri Jul 10 21:46:33 2015 From: pabloarubi at gmail.com (Pablo Rubi) Date: Fri, 10 Jul 2015 22:46:33 -0300 Subject: [vtkusers] A question about QT+VTK In-Reply-To: <1436574861892-5732838.post@n5.nabble.com> References: <1436574861892-5732838.post@n5.nabble.com> Message-ID: In CMake GUI, there's an Advanced option to enable at the top right corner. After enabling it, you should see a variable called VTK_QT_VERSION, make sure you have it set as 5. Have you tried that already? Regards, Pablo 2015-07-10 21:34 GMT-03:00 zhq <15891495523 at 126.com>: > Dear all > > I want to build a project using QT+VTK. I use the code giving by > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowNoUiFile > > My computer is: Win7+VS2012+VTK6.0+QT5 > > When I build the project using CMake, the error appears: > > > What can I do ? > > Thank you in advanced! > > ZhangQiang > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/A-question-about-QT-VTK-tp5732838.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 Fri Jul 10 22:03:45 2015 From: 15891495523 at 126.com (15891495523 at 126.com) Date: Sat, 11 Jul 2015 10:03:45 +0800 Subject: [vtkusers] A question about QT+VTK References: <1436574861892-5732838.post@n5.nabble.com>, Message-ID: <201507111003444713687@126.com> Deal Pablo Thank you for your reply. But, in fact, I can't find the VTK_QT_VERSION. Is there something wrong with my CMake ? ZhangQiang From: Pablo Rubi Date: 2015-07-11 09:46 To: zhq CC: vtkusers Subject: Re: [vtkusers] A question about QT+VTK In CMake GUI, there's an Advanced option to enable at the top right corner. After enabling it, you should see a variable called VTK_QT_VERSION, make sure you have it set as 5. Have you tried that already? Regards, Pablo 2015-07-10 21:34 GMT-03:00 zhq <15891495523 at 126.com>: Dear all I want to build a project using QT+VTK. I use the code giving by http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowNoUiFile My computer is: Win7+VS2012+VTK6.0+QT5 When I build the project using CMake, the error appears: What can I do ? Thank you in advanced! ZhangQiang -- View this message in context: http://vtk.1045678.n5.nabble.com/A-question-about-QT-VTK-tp5732838.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: InsertPic_455F.jpg Type: image/jpeg Size: 87317 bytes Desc: not available URL: From pabloarubi at gmail.com Fri Jul 10 22:23:27 2015 From: pabloarubi at gmail.com (Pablo Rubi) Date: Fri, 10 Jul 2015 23:23:27 -0300 Subject: [vtkusers] A question about QT+VTK In-Reply-To: <201507111003444713687@126.com> References: <1436574861892-5732838.post@n5.nabble.com> <201507111003444713687@126.com> Message-ID: Try using the "Add Entry" button to create the CMAKE_PREFIX_PATH variable, and set it to the C:/path/to/qt-5.2.1-install/5.2.1/. Source: http://www.vtk.org/Wiki/VTK/Configure_and_Build#Qt5..2A Sorry I can't be more specific, as I'm doing this from memory. I guessed the version was the error because one of the errors was found while running FindQt*4*.cmake. 2015-07-10 23:03 GMT-03:00 15891495523 at 126.com <15891495523 at 126.com>: > Deal Pablo > > Thank you for your reply. But, in fact, I can't find the > VTK_QT_VERSION. > > Is there something wrong with my CMake ? > > ZhangQiang > > > > *From:* Pablo Rubi > *Date:* 2015-07-11 09:46 > *To:* zhq <15891495523 at 126.com> > *CC:* vtkusers > *Subject:* Re: [vtkusers] A question about QT+VTK > In CMake GUI, there's an Advanced option to enable at the top right > corner. After enabling it, you should see a variable called VTK_QT_VERSION, > make sure you have it set as 5. > > Have you tried that already? > > Regards, > Pablo > > 2015-07-10 21:34 GMT-03:00 zhq <15891495523 at 126.com>: > >> Dear all >> >> I want to build a project using QT+VTK. I use the code giving by >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowNoUiFile >> >> My computer is: Win7+VS2012+VTK6.0+QT5 >> >> When I build the project using CMake, the error appears: >> >> >> What can I do ? >> >> Thank you in advanced! >> >> ZhangQiang >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/A-question-about-QT-VTK-tp5732838.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: InsertPic_455F.jpg Type: image/jpeg Size: 87317 bytes Desc: not available URL: From drescherjm at gmail.com Fri Jul 10 22:40:02 2015 From: drescherjm at gmail.com (John Drescher) Date: Fri, 10 Jul 2015 22:40:02 -0400 Subject: [vtkusers] A question about QT+VTK In-Reply-To: <1436574861892-5732838.post@n5.nabble.com> References: <1436574861892-5732838.post@n5.nabble.com> Message-ID: On Fri, Jul 10, 2015 at 8:34 PM, zhq <15891495523 at 126.com> wrote: > Dear all > > I want to build a project using QT+VTK. I use the code giving by > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowNoUiFile > > My computer is: Win7+VS2012+VTK6.0+QT5 > > When I build the project using CMake, the error appears: > > > What can I do ? > > Thank you in advanced! > Did you build vtk-6 yourself with Qt5? John From alexmalvtk at gmail.com Sat Jul 11 00:33:45 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 10 Jul 2015 21:33:45 -0700 Subject: [vtkusers] A question about QT+VTK In-Reply-To: References: <1436574861892-5732838.post@n5.nabble.com> Message-ID: CMake-GUI should show advanced check button which you have to check to see needed options. But I do not see it on your screenshot. On Fri, Jul 10, 2015 at 7:40 PM, John Drescher wrote: > On Fri, Jul 10, 2015 at 8:34 PM, zhq <15891495523 at 126.com> wrote: > > Dear all > > > > I want to build a project using QT+VTK. I use the code giving by > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowNoUiFile > > > > My computer is: Win7+VS2012+VTK6.0+QT5 > > > > When I build the project using CMake, the error appears: > > > > > > What can I do ? > > > > Thank you in advanced! > > > > Did you build vtk-6 yourself with Qt5? > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Sat Jul 11 00:47:08 2015 From: drescherjm at gmail.com (John Drescher) Date: Sat, 11 Jul 2015 00:47:08 -0400 Subject: [vtkusers] A question about QT+VTK In-Reply-To: References: <1436574861892-5732838.post@n5.nabble.com> Message-ID: > CMake-GUI should show advanced check button which you have to check to see > needed options. > But I do not see it on your screenshot. > The screenshot appears to be about building the example not vtk. I don't think anything is marked as advanced in the example. John From alexmalvtk at gmail.com Sat Jul 11 01:26:35 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 10 Jul 2015 22:26:35 -0700 Subject: [vtkusers] Selection with vtkCompositePolyDataMapper2 mapper problem Message-ID: Using vtkHardwareSelector with vtkMultiBlockDataSet and vtkCompositePolyDataMapper2 sometimes is producing wrong results. I have a vtkMultiBlockDataSet with polydata (sometimes NULL) as blocks. On the screenshot you can see the simplest geometry which I can reproduce the problem on. Each rectangle there is a separate block. It also displays window frame which supposed to define selection. As you can see results (in red like colors) There is an extra block selected which is totally outside of the frame. Relative functions which do selection and extraction are available in the attachment. For some reason if I select a single component - basically by clicking without dragging selection frame, result is always correct. Result seems also depends on view angle. I tracked that wrong results appear after vtkConvertSelection::ToSelectionType in converted to vtkSelectionNode::BLOCKS vtkSelection. I would appreciate any help or ideas. I am using vtk-6-1-0. Regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after selection_andSelectionFrame.png Type: image/png Size: 7164 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: samplecode.cpp Type: text/x-c++src Size: 5728 bytes Desc: not available URL: From 15891495523 at 126.com Sat Jul 11 08:10:55 2015 From: 15891495523 at 126.com (zhq) Date: Sat, 11 Jul 2015 05:10:55 -0700 (MST) Subject: [vtkusers] A question about QT+VTK In-Reply-To: References: <1436574861892-5732838.post@n5.nabble.com> Message-ID: <1436616655639-5732847.post@n5.nabble.com> Yes, I'd like to build a project with VTK and QT. But, in the current project, I just want to build a QT project with CMake. -- View this message in context: http://vtk.1045678.n5.nabble.com/A-question-about-QT-VTK-tp5732838p5732847.html Sent from the VTK - Users mailing list archive at Nabble.com. From sayanmaity.10 at gmail.com Sat Jul 11 11:39:49 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Sat, 11 Jul 2015 08:39:49 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> Message-ID: <1436629189054-5732849.post@n5.nabble.com> Dear Cory, Thanks for your explanatory reply. I will follow one of the way you mentioned. Just to confirm to create a 3D image from the input 2D *.tif images should I use vtkVolume16Reader or vtkVolumeReader. Thank you for your time. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5732849.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Sat Jul 11 22:28:54 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Sat, 11 Jul 2015 22:28:54 -0400 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1436629189054-5732849.post@n5.nabble.com> References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436629189054-5732849.post@n5.nabble.com> Message-ID: I could actually try to use the vtkTIFFReader and invoke the following member functions: SetFileNameSliceOffset(1); SetFileNameSliceSpacing(1); SetFilePattern("2.%d.bspline.tif"); I haven't tried this in a while, so you might have to modify it a bit to get it right. Cheers, Cory On Sat, Jul 11, 2015 at 11:39 AM, Neel007 wrote: > Dear Cory, > > Thanks for your explanatory reply. I will follow one of the way you > mentioned. > > Just to confirm to create a 3D image from the input 2D *.tif images should > I use vtkVolume16Reader or vtkVolumeReader. Thank you for your time. > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5732849.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 github at stefanlau.com Sun Jul 12 04:51:21 2015 From: github at stefanlau.com (Stefan Lau) Date: Sun, 12 Jul 2015 10:51:21 +0200 Subject: [vtkusers] vtkGL2PSExporter in combination with QVTKRenderWindowInteractor In-Reply-To: References: <55914017.1010506@stefanlau.com> <559FE8EB.2060300@stefanlau.com> Message-ID: <55A22A89.7010709@stefanlau.com> Allright, I tried with current development version, the issue is still there. I also finally tried a different machine (with different drivers and distro) and the issue is still there, so it should not only be an issue on my machine. One thing I noticed though: When trying it on a live Ubuntu, I had it working once ;-). After installing it on hdd, it was in the broken state again. What is your setup in terms of package versions etc.? I want be able to get it to a working state, since I need the svgs for my masters thesis. - Stefan Am 10.07.2015 um 18:01 schrieb David Lonie: > On Fri, Jul 10, 2015 at 11:46 AM, Stefan Lau > wrote: > > Allright after a short holiday, I had another few hours to debug > the issue. But no success. > > Some other stuff that I tried (but now I'm out of ideas): > * Installing everything inside a VirtualBox running Ubuntu 14.04 > (using the Ubuntu-provided > vtk packages, which are broken btw: > https://bugs.launchpad.net/ubuntu/+source/vtk6/+bug/1354127) > * Using VTK 6.2 (building my own version of VTK) > * Using OpenGL software rendering (I thought that maybe it's a > driver issue of the intel drivers) > > All yield the same corrupted result: The image that I sent in the > last email. > I haven't tried running it on a completely different machine, > since I have none available ATM. > Any ideas on how I could proceed? > > > I'd try building the current development version and see if it > persists. See the 'clone' section of > https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md > for the information on how to get the sources. After downloading, the > build process should be the same as 6.2. > > Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborsic at ne-scientific.com Mon Jul 13 03:12:30 2015 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Mon, 13 Jul 2015 09:12:30 +0200 Subject: [vtkusers] Enabling python SIP wrapping Message-ID: <55A364DE.1060709@ne-scientific.com> Dear VTK Users, I used to wrap VTK with SIP/Python with VTK 5.x / Qt 4.x I have recently switched to VTK 6.2 / Qt 5.4, with Python 2.7 - this under Windows 8.1 64bit / VS 2013 / CMAKE 3.x. During the project configuration stage with CMAKE the variable VTK_WRAP_PYTHON_SIP does not show in the main variables nor I have found it using a search on the advanced variables, and therefore I am not sure about how to wrap with SIP. SIP support seams to be still there though, as for example the vtkWrapPython.sip CMAKE module is in the source tree. Can anybody please suggest how I could enable SIP wrapping ? Thanks in advance for any suggestions and thank you for your time, Best Regards, Andrea -- ++++++++++++++++++++++++++++++++++++ Andrea Borsic Ph.D. Founder NE Scientific LLC 16 Cavendish Court, Lebanon, NH, 03766 Tel: +1 603 676 7450 Web: www.ne-scientific.com Twitter: https://twitter.com/ne_scientific From liuyanbc157 at gmail.com Mon Jul 13 05:31:05 2015 From: liuyanbc157 at gmail.com (Jan) Date: Mon, 13 Jul 2015 09:31:05 +0000 (UTC) Subject: [vtkusers] Change scalarbar labels Message-ID: 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 From ale.nonis at libero.it Mon Jul 13 08:24:07 2015 From: ale.nonis at libero.it (ale.nonis at libero.it) Date: Mon, 13 Jul 2015 14:24:07 +0200 (CEST) Subject: [vtkusers] Morphing one texture to another Message-ID: <441120773.1080141436790247167.JavaMail.defaultUser@defaultHost> Dear all, i have a problem. In my project i morph one mesh into another (one face to another face), and it's work but, i can't doing the texture morphing. Is there a clever way for morphing one texture into another in vtk? Thank you in advance. Regards. Alessandro. From cory.quammen at kitware.com Mon Jul 13 08:54:01 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 13 Jul 2015 08:54:01 -0400 Subject: [vtkusers] Morphing one texture to another In-Reply-To: <441120773.1080141436790247167.JavaMail.defaultUser@defaultHost> References: <441120773.1080141436790247167.JavaMail.defaultUser@defaultHost> Message-ID: Alessandro, I'm not sure if this is what you need, but maybe you could try vtkImageBlend [1] or vtkImageWeightedSum [2]. Cory [1] http://www.vtk.org/doc/release/6.2/html/classvtkImageBlend.html [2] http://www.vtk.org/doc/release/6.2/html/classvtkImageWeightedSum.html On Mon, Jul 13, 2015 at 8:24 AM, ale.nonis--- via vtkusers wrote: > Dear all, > i have a problem. In my project i morph one mesh into another (one face to > another face), and it's work but, i can't doing the texture morphing. Is > there > a clever way for morphing one texture into another in vtk? > > Thank you in advance. > > Regards. > > Alessandro. > _______________________________________________ > 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 Jul 13 08:59:01 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 13 Jul 2015 08:59:01 -0400 Subject: [vtkusers] Enabling python SIP wrapping In-Reply-To: <55A364DE.1060709@ne-scientific.com> References: <55A364DE.1060709@ne-scientific.com> Message-ID: <20150713125901.GA27674@megas.kitware.com> On Mon, Jul 13, 2015 at 09:12:30 +0200, Andrea Borsic wrote: > I used to wrap VTK with SIP/Python with VTK 5.x / Qt 4.x > > I have recently switched to VTK 6.2 / Qt 5.4, with Python 2.7 - this > under Windows 8.1 64bit / VS 2013 / CMAKE 3.x. During the project > configuration stage with CMAKE the variable VTK_WRAP_PYTHON_SIP does not > show in the main variables nor I have found it using a search on the > advanced variables, and therefore I am not sure about how to wrap with > SIP. SIP support seams to be still there though, as for example the > vtkWrapPython.sip CMAKE module is in the source tree. > > Can anybody please suggest how I could enable SIP wrapping ? > > Thanks in advance for any suggestions and thank you for your time, SIP wrapping was missed during the modularization of VTK. Some bits are laying around, but nothing ever calls or uses it. It will likely need porting to the modular infrastructure. What classes did you need access to? The classes SIP would wrap currently are: QVTKGraphicsItem QVTKInteractor QVTKInteractorAdapter QVTKWidget QVTKWidget2 vtkQtAbstractModelAdapter vtkQtAnnotationLayersModelAdapter vtkQtTableModelAdapter vtkQtTreeModelAdapter All the rest should be handled by VTK's wrappers. --Ben From aborsic at ne-scientific.com Mon Jul 13 09:08:40 2015 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Mon, 13 Jul 2015 15:08:40 +0200 Subject: [vtkusers] Enabling python SIP wrapping In-Reply-To: <20150713125901.GA27674@megas.kitware.com> References: <55A364DE.1060709@ne-scientific.com> <20150713125901.GA27674@megas.kitware.com> Message-ID: <55A3B858.5080108@ne-scientific.com> Hi Ben Thank you for your reply. I need: * QVTKInteractor * QVTKInteractorAdapter * QVTKWidget so things look good. I will try running SIP manually on them. Though I am not a wrapping expert I would be happy to contribute time to any community effort centered on "upgrading" the SIP work to the new modular structure. Thanks and Best Regards, Andrea On 7/13/2015 2:59 PM, Ben Boeckel wrote: > On Mon, Jul 13, 2015 at 09:12:30 +0200, Andrea Borsic wrote: >> I used to wrap VTK with SIP/Python with VTK 5.x / Qt 4.x >> >> I have recently switched to VTK 6.2 / Qt 5.4, with Python 2.7 - this >> under Windows 8.1 64bit / VS 2013 / CMAKE 3.x. During the project >> configuration stage with CMAKE the variable VTK_WRAP_PYTHON_SIP does not >> show in the main variables nor I have found it using a search on the >> advanced variables, and therefore I am not sure about how to wrap with >> SIP. SIP support seams to be still there though, as for example the >> vtkWrapPython.sip CMAKE module is in the source tree. >> >> Can anybody please suggest how I could enable SIP wrapping ? >> >> Thanks in advance for any suggestions and thank you for your time, > SIP wrapping was missed during the modularization of VTK. Some bits are > laying around, but nothing ever calls or uses it. It will likely need > porting to the modular infrastructure. What classes did you need access > to? The classes SIP would wrap currently are: > > QVTKGraphicsItem > QVTKInteractor > QVTKInteractorAdapter > QVTKWidget > QVTKWidget2 > vtkQtAbstractModelAdapter > vtkQtAnnotationLayersModelAdapter > vtkQtTableModelAdapter > vtkQtTreeModelAdapter > > All the rest should be handled by VTK's wrappers. > > --Ben -- ++++++++++++++++++++++++++++++++++++ Andrea Borsic Ph.D. CEO & Founder NE Scientific LLC 16 Cavendish Court, Lebanon, NH, 03766 Tel: +1 603 676 7450 Web: www.ne-scientific.com Twitter: https://twitter.com/ne_scientific -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Mon Jul 13 09:16:41 2015 From: david.lonie at kitware.com (David Lonie) Date: Mon, 13 Jul 2015 09:16:41 -0400 Subject: [vtkusers] vtkGL2PSExporter in combination with QVTKRenderWindowInteractor In-Reply-To: <55A22A89.7010709@stefanlau.com> References: <55914017.1010506@stefanlau.com> <559FE8EB.2060300@stefanlau.com> <55A22A89.7010709@stefanlau.com> Message-ID: This is very odd. I'm using an up-to-date arch linux with VTK built from the current development branch. I just tested with today's code and it's still working here. I also tried the vtk 6.1.0-8 package from pacman and that works with your script, too. I'm not really sure what could be happening in your tests. Do the other vector graphics formats (ps, eps, pdf) work? On Sun, Jul 12, 2015 at 4:51 AM, Stefan Lau wrote: > Allright, I tried with current development version, the issue is still > there. > > I also finally tried a different machine (with > different drivers and distro) and the issue is still there, so it should > not > only be an issue on my machine. > > One thing I noticed though: When trying it on a live Ubuntu, I had it > working once ;-). After installing it on hdd, it was in the broken > state again. > > What is your setup in terms of package versions etc.? I want > be able to get it to a working state, since I need the svgs for my > masters thesis. > > - Stefan > > > Am 10.07.2015 um 18:01 schrieb David Lonie: > > On Fri, Jul 10, 2015 at 11:46 AM, Stefan Lau > wrote: > >> Allright after a short holiday, I had another few hours to debug the >> issue. But no success. >> >> Some other stuff that I tried (but now I'm out of ideas): >> * Installing everything inside a VirtualBox running Ubuntu 14.04 (using >> the Ubuntu-provided >> vtk packages, which are broken btw: >> >> https://bugs.launchpad.net/ubuntu/+source/vtk6/+bug/1354127) >> * Using VTK 6.2 (building my own version of VTK) >> * Using OpenGL software rendering (I thought that maybe it's a driver >> issue of the intel drivers) >> >> All yield the same corrupted result: The image that I sent in the last >> email. >> I haven't tried running it on a completely different machine, since I >> have none available ATM. >> Any ideas on how I could proceed? >> > > I'd try building the current development version and see if it persists. > See the 'clone' section of > > https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md > for the information on how to get the sources. After downloading, the build > process should be the same as 6.2. > > Dave > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anushaba at buffalo.edu Mon Jul 13 10:17:26 2015 From: anushaba at buffalo.edu (Anusha Balasubramoniam) Date: Mon, 13 Jul 2015 10:17:26 -0400 Subject: [vtkusers] Color mapping on stl file Message-ID: Dear All, I am not able to get a color map on an stl file. Please, kindly help. I am not able to figure out how to do it. Thank you, Anusha -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Jul 13 10:26:57 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 13 Jul 2015 10:26:57 -0400 Subject: [vtkusers] Fwd: ANNOUNCE: Kitware is hiring In-Reply-To: References: Message-ID: Hi folks, We are looking to hire visualization developers to our Scientific Computing team. If you are a talented visualization researcher and developer with strong C++ skills, please consider applying. You will join a great team and work on many interesting and challenging technical problems - always aiming to deliver robust and widely used software solutions. For the full posting see: http://tinyurl.com/l8sgvzw JOB DESCRIPTION Kitware is seeking to hire highly skilled Research and Development Engineers (R&D Engineers) to join our Scientific Computing team and contribute to our scientific and information visualization efforts. Candidates will work to develop and improve leading visualization software solutions. Kitware collaborates on a multitude of basic and applied research and development projects. Our collaborators include the top universities from around the world, national research labs, medical device manufacturers, car manufacturers, oil and gas companies, financial institutes, and many others. The projects range from extending our open source C++ libraries and applications, such as VTK, ParaView, and CMake, to developing proprietary domain-specific vertical applications for a wide array of platforms including web and mobile devices. By joining our team you will participate in a dynamic work environment with exceptionally talented and friendly coworkers who are committed to high-quality development practices. You will collaborate with esteemed researchers from around the world by: * Designing and developing scalable data analysis and visualization tools for use by researchers and professionals from various domains; * Solving a wide array of problems ranging from developing distributed memory parallel algorithms for data analysis, optimizing distributed parallel codes to compiling and maintaining software on supercomputers. * Designing and developing tools to improve scientific data analysis workflows; * Contributing to and supporting our dynamic open source communities built around several of our open source tools. -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Mon Jul 13 12:50:23 2015 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Mon, 13 Jul 2015 16:50:23 +0000 Subject: [vtkusers] Color mapping on stl file In-Reply-To: <201507131418.t6DEIK0S009974-t6DEIK0Y009974@mta-1.nv.doe.gov> References: <201507131418.t6DEIK0S009974-t6DEIK0Y009974@mta-1.nv.doe.gov> Message-ID: There are a few examples on the Wiki page that could be contorted into what you were looking for, some of it is not very straightforward for beginners with VTK though. The following is a python script that could be run from the command line with ?python display_stl_with_color.py your_stl_file.stl? It isn?t hard to convert this to C if that is what you were working in. Here starts the script: # A lot of this was taken from the example on the Wiki: # http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ColoredElevationMap import vtk, sys # Read in your STL file f = vtk.vtkSTLReader() f.SetFileName(sys.argv[1]) f.Update() # This is necessary to have the data ready to read. # The vtkSTLReader reads in your file as a vtkPolyData, 'obj' is a reference to # that output. I'm using the bounds that are automatically calculated during # the import phase to give a range for the height of the points in the file. # I believe that the bounds are (xmin, xmax, ymin, ymax, zmin, zmax). obj = f.GetOutputDataObject(0) min_z, max_z = obj.GetBounds()[4:] # I am creating a lookup table to correspond to the height field. I am using # the default values. Remember that the lookup table is a rather complex and # handy object, and there are lots of options to set if you need something # special. lut = vtk.vtkLookupTable() lut.SetTableRange(min_z, max_z) lut.Build() # This is an array that I am creating to store the heights of the points. I # will use this as a scalar field on the 'obj' so that the lookup table can be # used to color it. You could obviously make the array anything you wanted, # such as ?x? or ?y? or squared distance from some other point, for instance. heights = vtk.vtkDoubleArray() heights.SetName("Z_Value") # Loop through the points in the vtkPolyData and record the height in the # 'heights' array. for i in range(obj.GetNumberOfPoints()): z = obj.GetPoint(i)[-1] heights.InsertNextValue(z) # Add this array to the point data as a scalar. obj.GetPointData().SetScalars(heights) # Visualization stuff ... you need to tell the mapper about the scalar field # and the lookup table. The rest of this is pretty standard stuff. mapper = vtk.vtkPolyDataMapper() mapper.SetInputDataObject(obj) mapper.SetScalarRange(min_z, max_z) mapper.SetLookupTable(lut) actor = vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(.1, .2, .4) renw = vtk.vtkRenderWindow() renw.AddRenderer(renderer) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renw) renw.Render() iren.Start() From: vtkusers > on behalf of Anusha Balasubramoniam > Date: Monday, July 13, 2015 at 7:17 AM To: "vtkusers at vtk.org" > Subject: [vtkusers] Color mapping on stl file Dear All, I am not able to get a color map on an stl file. Please, kindly help. I am not able to figure out how to do it. Thank you, Anusha -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.rapuano at gmail.com Mon Jul 13 14:13:11 2015 From: c.rapuano at gmail.com (audialc) Date: Mon, 13 Jul 2015 11:13:11 -0700 (MST) Subject: [vtkusers] vtkProjectedTexture example In-Reply-To: <41A97F3464883247A39A022E96C3DD50924EC405@mail-server.ntb.ch> References: <41A97F3464883247A39A022E96C3DD50924EC405@mail-server.ntb.ch> Message-ID: <1436811191010-5732867.post@n5.nabble.com> Hi, I'm very interested too. I'm looking for an example that show me how to use this class, but I didn't find it. Have you ever used this class? Can you post here an example? Every language is ok. Thank you -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkProjectedTexture-example-tp5723907p5732867.html Sent from the VTK - Users mailing list archive at Nabble.com. From sayanmaity.10 at gmail.com Mon Jul 13 14:28:18 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Mon, 13 Jul 2015 11:28:18 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436629189054-5732849.post@n5.nabble.com> Message-ID: <1436812098883-5732868.post@n5.nabble.com> Dear Cory, I am able to read the 2D *.tif's file using the script you mentioned: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileNameSliceOffset(1); reader->SetFileNameSliceSpacing(1); reader->SetFilePattern("C:\\Users\\Neel\\Desktop\\VTK_try\\test_images\\2.%d.bspline.tif"); reader->SetDataExtent(0, 63, 0, 63, 1, 551); reader->SetOrientationType(3); reader->Update(); And using the ImageSlicing.cxx I am able to vie the resulting 3D volume from the 2D tif's: http://web.mit.edu/16.225/dv/VTK/Examples/ImageProcessing/Cxx/ImageSlicing.cxx -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5732868.html Sent from the VTK - Users mailing list archive at Nabble.com. From sayanmaity.10 at gmail.com Mon Jul 13 18:45:18 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Mon, 13 Jul 2015 15:45:18 -0700 (MST) Subject: [vtkusers] vtkImageData pixel values of a Binary Image resulting -5.4861292803319049e+303 ; Instead of 0 & 1 Message-ID: <1436827518460-5732873.post@n5.nabble.com> I am trying to read series of 2D *.tif images and then convert it to vtkImageData. The vtkImageData pixel values of a Binary Image resulting -5.4861292803319049e+303 ; Instead of 0 & 1, Any suggestion if I am missing something will be highly appreciated: the output screen and code: int _tmain(int argc, _TCHAR* argv[]) { // Start by loading some data. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileNameSliceOffset(1); reader->SetFileNameSliceSpacing(1); reader->SetFilePattern("C:\\Users\\Neel\\Desktop\\VTK_try\\test_images\\2.%d.bspline.tif"); reader->SetDataExtent(0, 63, 0, 63, 1, 2); reader->SetOrientationType(3); reader->Update(); // Conver it to an image data vtkSmartPointer imageData = vtkSmartPointer::New(); //vtkImageData *imageData=0; imageData->AllocateScalars(VTK_DOUBLE,1); imageData =reader->GetOutput() ; int* dims = imageData->GetDimensions(); // int dims[3]; // can't do this std::cout << "Dims: " << " x: " << dims[0] << " y: " << dims[1] << " z: " << dims[2] << std::endl; std::cout << "Number of points: " << imageData->GetNumberOfPoints() << std::endl; std::cout << "Number of cells: " << imageData->GetNumberOfCells() << std::endl; int extent[6]; imageData->GetExtent(extent) ; vtkIdType numberOfPointArrays = imageData->GetPointData()->GetNumberOfArrays(); std::cout << "Number of PointData arrays: " << numberOfPointArrays << std::endl; cout<< "Number of Scalar Components: "<GetNumberOfScalarComponents()<GetPointData()->GetArray(i)->GetName()); //arrayNames.push_back(polydata->GetPointData()->GetArrayName(i)); int dataTypeID = imageData->GetPointData()->GetArray(i)->GetDataType(); std::cout << "Array " << i << ": " << reader->GetOutput()->GetPointData()->GetArrayName(i) << " (type: " << dataTypeID << ")" << std::endl; } // Retrieve the entries from the image data and print them to the screen std::vector vec_vals; for (int z = 0; z < dims[2]; z++) { for (int y = 0; y < dims[1]; y++) { for (int x = 0; x < dims[0]; x++) { double* pixel = static_cast(imageData->GetScalarPointer()); // do something with v //std::cout << pixel[0] << " "; vec_vals.push_back(pixel[0]); } std::cout << std::endl; } std::cout << std::endl; } } -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageData-pixel-values-of-a-Binary-Image-resulting-5-4861292803319049e-303-Instead-of-0-1-tp5732873.html Sent from the VTK - Users mailing list archive at Nabble.com. From alexmalvtk at gmail.com Mon Jul 13 19:50:15 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Mon, 13 Jul 2015 16:50:15 -0700 Subject: [vtkusers] Color mapping on stl file In-Reply-To: References: Message-ID: AFAIK If you are talking about color stored in stl file, standard stl format does not store color. So vtkStlReader skips color field if it is found. So color data is lost. On Mon, Jul 13, 2015 at 7:17 AM, Anusha Balasubramoniam < anushaba at buffalo.edu> wrote: > Dear All, > > I am not able to get a color map on an stl file. > Please, kindly help. > I am not able to figure out how to do it. > > Thank you, > Anusha > > _______________________________________________ > 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 sayanmaity.10 at gmail.com Mon Jul 13 20:10:35 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Mon, 13 Jul 2015 17:10:35 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> Message-ID: <1436832635014-5732876.post@n5.nabble.com> Dear Cory, I was following the second-step you mentioned: "Alternatively, you could *create a 3D image from your input 2D image*s, then use *vtkThreshold to create an unstructured grid of just the white parts of the 3D image*. To convert the resulting hexahedral elements in the *unstructured grid to tetrahedra, use vtkDataSetTriangleFilter*." I am able to complete the first step successfully the second one partially. I have included the code & the output window, if you can have a look and give me some input It will be very much appreciated. Thank you for your time. */create a 3D image from your input 2D images...(Working Fine as I have visualized it similar as Matlab)/* // Start by loading some data. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileNameSliceOffset(1); reader->SetFileNameSliceSpacing(1); reader->SetFilePattern("C:\\Users\\Neel\\Desktop\\VTK_try\\test_images\\2.%d.bspline.tif"); reader->SetDataExtent(0, 63, 0, 63, 1, 551); reader->SetOrientationType(3); reader->Update(); */vtkThreshold to create an unstructured grid of just the white parts of the 3D image/* As you have suggested to use vtkThreshold but the input data being binary "Image Thresholding" operation is not applicable. Thus, I tried to convert the 3D volume of *.tif stack of images to vtkImageData and trying to use vtkClipVolume to create an unstructured grid using the white pixels. Here I'm facing an issue: vtkImageData pixel values of the Binary Image resulting -5.4861292803319049e+303 ; Instead of 0 & 1; Any suggestion if I am missing something here. The code snippet & the output-window: // Create an image data vtkSmartPointer imageData = vtkSmartPointer::New(); //vtkImageData *imageData=0; imageData->AllocateScalars(VTK_DOUBLE,1); imageData =reader->GetOutput() ; int* dims = imageData->GetDimensions(); // int dims[3]; // can't do this std::cout << "Dims: " << " x: " << dims[0] << " y: " << dims[1] << " z: " << dims[2] << std::endl; std::cout << "Number of points: " << imageData->GetNumberOfPoints() << std::endl; std::cout << "Number of cells: " << imageData->GetNumberOfCells() << std::endl; int extent[6]; imageData->GetExtent(extent) ; vtkIdType numberOfPointArrays = imageData->GetPointData()->GetNumberOfArrays(); std::cout << "Number of PointData arrays: " << numberOfPointArrays << std::endl; cout<< "Number of Scalar Components: "<GetNumberOfScalarComponents()<GetPointData()->GetArray(i)->GetName()); //arrayNames.push_back(polydata->GetPointData()->GetArrayName(i)); int dataTypeID = imageData->GetPointData()->GetArray(i)->GetDataType(); std::cout << "Array " << i << ": " << reader->GetOutput()->GetPointData()->GetArrayName(i) << " (type: " << dataTypeID << ")" << std::endl; } vtkSmartPointer vol = vtkSmartPointer::New(); vol->SetInputData(imageData); double tryval=-5.4861292803319049e+303;//* */Not sure which value I should for clipping/* vol->SetValue(tryval); vol->Update(); *For few slices (50) vtkClipVolume is working but for entire series it throwing memory exception. I think I might need to use some other functionalities. Please give me some suggestion.* */unstructured grid to tetrahedra, use vtkDataSetTriangleFilter/* vtkNew tf; tf->SetInputConnection(vol->GetOutputPort()); tf->Update(); -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5732876.html Sent from the VTK - Users mailing list archive at Nabble.com. From alexmalvtk at gmail.com Mon Jul 13 20:50:40 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Mon, 13 Jul 2015 17:50:40 -0700 Subject: [vtkusers] Selection with vtkCompositePolyDataMapper2 mapper problem In-Reply-To: References: Message-ID: Attempt to upgrade to vtk-6-2-0 did not fix the problem On Fri, Jul 10, 2015 at 10:26 PM, Alex Malyushytskyy wrote: > Using vtkHardwareSelector with vtkMultiBlockDataSet and vtkCompositePolyDataMapper2 > sometimes is producing wrong results. > I have a vtkMultiBlockDataSet with polydata (sometimes NULL) as blocks. > On the screenshot you can see the simplest geometry which I can reproduce > the problem on. Each rectangle there is a separate block. > It also displays window frame which supposed to define selection. > As you can see results (in red like colors) There is an extra block > selected which is totally outside of the frame. > > Relative functions which do selection and extraction are available in the > attachment. > For some reason if I select a single component - basically by clicking > without dragging selection frame, result is always correct. > Result seems also depends on view angle. > I tracked that wrong results appear after vtkConvertSelection::ToSelectionType > in converted to vtkSelectionNode::BLOCKS > vtkSelection. > > > I would appreciate any help or ideas. > I am using vtk-6-1-0. > > Regards, > Alex > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Tue Jul 14 00:56:46 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Mon, 13 Jul 2015 21:56:46 -0700 Subject: [vtkusers] Selection with vtkCompositePolyDataMapper2 mapper problem In-Reply-To: References: Message-ID: I tried to debug selection and found that in : vtkSelection* vtkHardwareSelector::GenerateSelection( unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) GetPixelInformation(pos, 0); already returns PixelInformation.CompositeID for block which is outside selection frame as a valid This means that problem is either within CaptureBuffers() or GetPixelInformation() and possibly involves painter or mapper. I afraid I will have to give up on this unless I get any suggestion which may help me in finding bug location. On Mon, Jul 13, 2015 at 5:50 PM, Alex Malyushytskyy wrote: > Attempt to upgrade to vtk-6-2-0 did not fix the problem > > On Fri, Jul 10, 2015 at 10:26 PM, Alex Malyushytskyy > wrote: > >> Using vtkHardwareSelector with vtkMultiBlockDataSet and vtkCompositePolyDataMapper2 >> sometimes is producing wrong results. >> I have a vtkMultiBlockDataSet with polydata (sometimes NULL) as blocks. >> On the screenshot you can see the simplest geometry which I can >> reproduce the problem on. Each rectangle there is a separate block. >> It also displays window frame which supposed to define selection. >> As you can see results (in red like colors) There is an extra block >> selected which is totally outside of the frame. >> >> Relative functions which do selection and extraction are available in >> the attachment. >> For some reason if I select a single component - basically by clicking >> without dragging selection frame, result is always correct. >> Result seems also depends on view angle. >> I tracked that wrong results appear after vtkConvertSelection::ToSelectionType >> in converted to vtkSelectionNode::BLOCKS >> vtkSelection. >> >> >> I would appreciate any help or ideas. >> I am using vtk-6-1-0. >> >> Regards, >> Alex >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.kilgus at dkfz-heidelberg.de Tue Jul 14 05:31:40 2015 From: t.kilgus at dkfz-heidelberg.de (Kilgus, Thomas) Date: Tue, 14 Jul 2015 11:31:40 +0200 Subject: [vtkusers] vtkProjectedTexture example In-Reply-To: <1436811191010-5732867.post@n5.nabble.com> References: <41A97F3464883247A39A022E96C3DD50924EC405@mail-server.ntb.ch> <1436811191010-5732867.post@n5.nabble.com> Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C17E0450@DKFZEX01.ad.dkfz-heidelberg.de> Hi there, I used this class to project an RGB texture of a camera onto a CT surface. I figured it was working very well but not very straight forward to use. The documentation was insufficient for me (and two students), so we just did the math and solved everything more or by trial and error. The class produces very nice texture coordinates to map an image onto a polydata. Unfortunately, this was almost two years ago and I fear I don't remember details. Here is my code anyway (I removed parts from our own toolkit and added comments): vtkSmartPointer projectedTexture = vtkSmartPointer::New(); mitk::Surface* surfaceToComputeTextureOn = dynamic_cast(surfaceNodeToComputeTexture->GetData()); mitk::Surface* surfaceToPutTextureOn = dynamic_cast(surfaceNodeToPutTextureOn->GetData()); //Settings for vtkProjectedTexture projectedTexture->SetPosition(0,0,0); projectedTexture->SetFocalPoint(0,0,1); projectedTexture->SetUp(0,1,0); //RGB camera intrinsics. Width and Height are the resolution of the camera. See intrinsic camera calibration in literature projectedTexture->SetAspectRatio( -d->m_width, d->m_height, d->m_CameraIntrinsics->GetFocalLengthX() ); float dx = ( (d->m_width/2.0f) - d->m_CameraIntrinsics->GetPrincipalPointX() ) / -d->m_width; float dy = ( (d->m_height/2.0f) - d->m_CameraIntrinsics->GetPrincipalPointY() ) / -d->m_height; projectedTexture->SetSRange(dx, 1+dx); projectedTexture->SetTRange(dy, 1+dy); projectedTexture->SetInputData( polyDataToComputeTextureOn ); //this can be the same as the one to project on projectedTexture->Update(); //Map Texture on Surface polyDataToPutTextureOn->GetPointData()->SetTCoords(projectedTexture->GetOutput()->GetPointData()->GetTCoords()); //can be a different surface or the same //here is what you need in addition: vtkSmartPointer vtkTxture = vtkSmartPointer::New(); vtkTxture->SetInputData( someVtkImageData ); //in my case an RGB camera image actor->SetTexture(vtkTxture); //your polydata actor Bottom line the class works really well and I failed to submit an additional example or documentation to improve the usability. I hope this helps! Regards, Thomas Kilgus German Cancer Research Center (DKFZ) Div. Medical and Biological Informatics Junior group: Computer-assisted Interventions (E131) Im Neuenheimer Feld 280 69120 Heidelberg, Germany Phone: +49(0) 6221-42-3545 -----Urspr?ngliche Nachricht----- Von: vtkusers [mailto:vtkusers-bounces at vtk.org] Im Auftrag von audialc Gesendet: Montag, 13. Juli 2015 20:13 An: vtkusers at vtk.org Betreff: Re: [vtkusers] vtkProjectedTexture example Hi, I'm very interested too. I'm looking for an example that show me how to use this class, but I didn't find it. Have you ever used this class? Can you post here an example? Every language is ok. Thank you -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkProjectedTexture-example-tp5723907p5732867.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 utkarsh.ayachit at kitware.com Tue Jul 14 05:32:14 2015 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 14 Jul 2015 09:32:14 +0000 Subject: [vtkusers] Selection with vtkCompositePolyDataMapper2 mapper problem In-Reply-To: References: Message-ID: Alex, Can you share the dataset (as a vtm perhaps)? I see if I can reproduce this with ParaView. Utkarsh On Tue, Jul 14, 2015 at 12:56 AM Alex Malyushytskyy wrote: > I tried to debug selection and found that in : > > vtkSelection* vtkHardwareSelector::GenerateSelection( unsigned int x1, > unsigned int y1, > unsigned int x2, unsigned int y2) > > GetPixelInformation(pos, 0); already returns PixelInformation.CompositeID > for block which is outside selection frame as a valid > > This means that problem is either within CaptureBuffers() or > GetPixelInformation() > and possibly involves painter or mapper. > I afraid I will have to give up on this unless I get any suggestion which > may help me in finding bug location. > > > On Mon, Jul 13, 2015 at 5:50 PM, Alex Malyushytskyy > wrote: > >> Attempt to upgrade to vtk-6-2-0 did not fix the problem >> >> On Fri, Jul 10, 2015 at 10:26 PM, Alex Malyushytskyy < >> alexmalvtk at gmail.com> wrote: >> >>> Using vtkHardwareSelector with vtkMultiBlockDataSet and vtkCompositePolyDataMapper2 >>> sometimes is producing wrong results. >>> I have a vtkMultiBlockDataSet with polydata (sometimes NULL) as blocks. >>> On the screenshot you can see the simplest geometry which I can >>> reproduce the problem on. Each rectangle there is a separate block. >>> It also displays window frame which supposed to define selection. >>> As you can see results (in red like colors) There is an extra block >>> selected which is totally outside of the frame. >>> >>> Relative functions which do selection and extraction are available in >>> the attachment. >>> For some reason if I select a single component - basically by clicking >>> without dragging selection frame, result is always correct. >>> Result seems also depends on view angle. >>> I tracked that wrong results appear after vtkConvertSelection::ToSelectionType >>> in converted to vtkSelectionNode::BLOCKS >>> vtkSelection. >>> >>> >>> I would appreciate any help or ideas. >>> I am using vtk-6-1-0. >>> >>> Regards, >>> Alex >>> >>> >>> >>> >> > _______________________________________________ > 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 t.kilgus at Dkfz-Heidelberg.de Tue Jul 14 05:44:35 2015 From: t.kilgus at Dkfz-Heidelberg.de (Kilgus, Thomas) Date: Tue, 14 Jul 2015 11:44:35 +0200 Subject: [vtkusers] Filter to remove internal structure of a polydata? Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C17E045A@DKFZEX01.ad.dkfz-heidelberg.de> Hi everyone, I am not sure how to call this, but I was wondering if there is any filter (or combination) to remove internal structures of a PolyData? By internal I mean stuff that is not visible to the camera, unless you make the surface translucent. I know that there is a vtkPolyDataConnectivityFilter which works for some uses cases, but my data is connected at some parts. I am not even sure if this is possible, but the virtual camera could rotate around the object and every cell which is not seen (hit by a ray) could be deleted. Is there anything like this in VTK? Regards, Thomas Thomas Kilgus German Cancer Research Center (DKFZ) Div. Medical and Biological Informatics Junior group: Computer-assisted Interventions (E131) Im Neuenheimer Feld 280 69120 Heidelberg, Germany Phone: +49(0) 6221-42-3545 -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.kilgus at Dkfz-Heidelberg.de Tue Jul 14 05:00:45 2015 From: t.kilgus at Dkfz-Heidelberg.de (Kilgus, Thomas) Date: Tue, 14 Jul 2015 11:00:45 +0200 Subject: [vtkusers] Filter to remove internal structure of a poly data? Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> Hi everyone, I am not sure how to call this, but I was wondering if there is any filter (or combination) to remove internal structures of a PolyData? By internal I mean stuff that is not visible to the camera, unless you make the surface translucent. I know that there is a vtkPolyDataConnectivityFilter which works for some uses cases, but my data is connected at some parts. I am not even sure if this is possible, but the virtual camera could rotate around the object and every cell which is not seen (hit by a ray) could be deleted. Is there anything like this in VTK? Regards, Thomas Thomas Kilgus German Cancer Research Center (DKFZ) Div. Medical and Biological Informatics Junior group: Computer-assisted Interventions (E131) Im Neuenheimer Feld 280 69120 Heidelberg, Germany Phone: +49(0) 6221-42-3545 -------------- next part -------------- An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Tue Jul 14 06:53:14 2015 From: agatakrason at gmail.com (agatte) Date: Tue, 14 Jul 2015 03:53:14 -0700 (MST) Subject: [vtkusers] Fitting surface to the image Message-ID: <1436871194457-5732884.post@n5.nabble.com> I have a question about fitting surface to the image. (I have a surface vtk polydata file and 3D image) Is there any method or solution to make it in VTK ? I would appreciate for any help. -- View this message in context: http://vtk.1045678.n5.nabble.com/Fitting-surface-to-the-image-tp5732884.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Tue Jul 14 07:37:09 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 14 Jul 2015 07:37:09 -0400 Subject: [vtkusers] Filter to remove internal structure of a poly data? In-Reply-To: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> References: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: Try vtkDataSetSurfaceFilter. It produces the external skin of any dataset in the form of a polydata. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 5:00 AM, Kilgus, Thomas wrote: > Hi everyone, > > > > I am not sure how to call this, but I was wondering if there is any filter > (or combination) to remove internal structures of a PolyData? By internal I > mean stuff that is not visible to the camera, unless you make the surface > translucent. I know that there is a vtkPolyDataConnectivityFilter which > works for some uses cases, but my data is connected at some parts. I am not > even sure if this is possible, but the virtual camera could rotate around > the object and every cell which is not seen (hit by a ray) could be > deleted. Is there anything like this in VTK? > > > > Regards, > > Thomas > > > > Thomas Kilgus > > German Cancer Research Center (DKFZ) > > Div. Medical and Biological Informatics > > Junior group: Computer-assisted Interventions (E131) > > Im Neuenheimer Feld 280 > > 69120 Heidelberg, Germany > > Phone: +49(0) 6221-42-3545 > > > > _______________________________________________ > 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 Tue Jul 14 08:24:56 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 14 Jul 2015 08:24:56 -0400 Subject: [vtkusers] Fitting surface to the image In-Reply-To: <1436871194457-5732884.post@n5.nabble.com> References: <1436871194457-5732884.post@n5.nabble.com> Message-ID: Agata, Not really. You might have better luck with ITK (www.itk.org). There is a mailing list for which you can sign up at http://www.itk.org/ITK/help/mailing.html Cory On Tue, Jul 14, 2015 at 6:53 AM, agatte wrote: > > I have a question about fitting surface to the image. (I have a surface > vtk > polydata file and 3D image) > Is there any method or solution to make it in VTK ? > > > I would appreciate for any help. > > > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Fitting-surface-to-the-image-tp5732884.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 t.kilgus at Dkfz-Heidelberg.de Tue Jul 14 08:26:15 2015 From: t.kilgus at Dkfz-Heidelberg.de (Kilgus, Thomas) Date: Tue, 14 Jul 2015 14:26:15 +0200 Subject: [vtkusers] Filter to remove internal structure of a poly data? In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C17E04C1@DKFZEX01.ad.dkfz-heidelberg.de> Hi David, sounds great, but it doesn?t do anything on my data. Do you know how the filter works? Attached is my code and a screenshot how my data looks like. Any ideas? Regards, Thomas Code: std::string inputFilename = ?path/to/file?; std::string outputFilename = ?path/to/save?; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName ( inputFilename.c_str() ); reader->Update(); vtkSmartPointer filter = vtkSmartPointer::New(); filter->SetInputConnection(reader->GetOutputPort()); filter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputConnection(filter->GetOutputPort()); writer->SetFileName(outputFilename.c_str()); writer->Update(); writer->Write(); Von: David E DeMarle [mailto:dave.demarle at kitware.com] Gesendet: Dienstag, 14. Juli 2015 13:37 An: Kilgus, Thomas Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data? Try vtkDataSetSurfaceFilter. It produces the external skin of any dataset in the form of a polydata. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 5:00 AM, Kilgus, Thomas > wrote: Hi everyone, I am not sure how to call this, but I was wondering if there is any filter (or combination) to remove internal structures of a PolyData? By internal I mean stuff that is not visible to the camera, unless you make the surface translucent. I know that there is a vtkPolyDataConnectivityFilter which works for some uses cases, but my data is connected at some parts. I am not even sure if this is possible, but the virtual camera could rotate around the object and every cell which is not seen (hit by a ray) could be deleted. Is there anything like this in VTK? Regards, Thomas Thomas Kilgus German Cancer Research Center (DKFZ) Div. Medical and Biological Informatics Junior group: Computer-assisted Interventions (E131) Im Neuenheimer Feld 280 69120 Heidelberg, Germany Phone: +49(0) 6221-42-3545 _______________________________________________ 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: ConnectedPolyData.png Type: image/png Size: 79753 bytes Desc: ConnectedPolyData.png URL: From dave.demarle at kitware.com Tue Jul 14 08:34:52 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 14 Jul 2015 08:34:52 -0400 Subject: [vtkusers] Filter to remove internal structure of a poly data? In-Reply-To: <57EE86D11538B44096C712532DBB6C5A0131C17E04C1@DKFZEX01.ad.dkfz-heidelberg.de> References: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> <57EE86D11538B44096C712532DBB6C5A0131C17E04C1@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: Ah, I thought your data was 3D, not 2D. The DSSF won't help in this case. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 8:26 AM, Kilgus, Thomas wrote: > Hi David, > > > > sounds great, but it doesn?t do anything on my data. Do you know how the > filter works? Attached is my code and a screenshot how my data looks like. > Any ideas? > > > > Regards, > > Thomas > > > > Code: > > > > std::string inputFilename = ?path/to/file?; > > std::string outputFilename = ?path/to/save?; > > vtkSmartPointer reader = > > vtkSmartPointer::New(); > > reader->SetFileName ( inputFilename.c_str() ); > > reader->Update(); > > > > vtkSmartPointer filter = > vtkSmartPointer::New(); > > filter->SetInputConnection(reader->GetOutputPort()); > > filter->Update(); > > > > vtkSmartPointer writer = > vtkSmartPointer::New(); > > writer->SetInputConnection(filter->GetOutputPort()); > > writer->SetFileName(outputFilename.c_str()); > > writer->Update(); > > writer->Write(); > > > > *Von:* David E DeMarle [mailto:dave.demarle at kitware.com] > *Gesendet:* Dienstag, 14. Juli 2015 13:37 > *An:* Kilgus, Thomas > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Filter to remove internal structure of a poly > data? > > > > Try vtkDataSetSurfaceFilter. It produces the external skin of any dataset > in the form of a polydata. > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > > On Tue, Jul 14, 2015 at 5:00 AM, Kilgus, Thomas < > t.kilgus at dkfz-heidelberg.de> wrote: > > Hi everyone, > > > > I am not sure how to call this, but I was wondering if there is any filter > (or combination) to remove internal structures of a PolyData? By internal I > mean stuff that is not visible to the camera, unless you make the surface > translucent. I know that there is a vtkPolyDataConnectivityFilter which > works for some uses cases, but my data is connected at some parts. I am not > even sure if this is possible, but the virtual camera could rotate around > the object and every cell which is not seen (hit by a ray) could be > deleted. Is there anything like this in VTK? > > > > Regards, > > Thomas > > > > Thomas Kilgus > > German Cancer Research Center (DKFZ) > > Div. Medical and Biological Informatics > > Junior group: Computer-assisted Interventions (E131) > > Im Neuenheimer Feld 280 > > 69120 Heidelberg, Germany > > Phone: +49(0) 6221-42-3545 > > > > > _______________________________________________ > 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 Tue Jul 14 08:39:28 2015 From: agatakrason at gmail.com (agatte) Date: Tue, 14 Jul 2015 05:39:28 -0700 (MST) Subject: [vtkusers] Fitting surface to the image In-Reply-To: References: <1436871194457-5732884.post@n5.nabble.com> Message-ID: OK. Thanks for response Cory. 2015-07-14 14:25 GMT+02:00 Cory Quammen-2 [via VTK] < ml-node+s1045678n5732886h15 at n5.nabble.com>: > Agata, > > Not really. You might have better luck with ITK (www.itk.org). There is a > mailing list for which you can sign up at > http://www.itk.org/ITK/help/mailing.html > > Cory > > On Tue, Jul 14, 2015 at 6:53 AM, agatte <[hidden email] > > wrote: > >> >> I have a question about fitting surface to the image. (I have a surface >> vtk >> polydata file and 3D image) >> Is there any method or solution to make it in VTK ? >> >> >> I would appreciate for any help. >> >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Fitting-surface-to-the-image-tp5732884.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/Fitting-surface-to-the-image-tp5732884p5732886.html > To unsubscribe from Fitting surface to the image, click here > > . > NAML > > -- View this message in context: http://vtk.1045678.n5.nabble.com/Fitting-surface-to-the-image-tp5732884p5732889.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.kilgus at Dkfz-Heidelberg.de Tue Jul 14 08:39:42 2015 From: t.kilgus at Dkfz-Heidelberg.de (Kilgus, Thomas) Date: Tue, 14 Jul 2015 14:39:42 +0200 Subject: [vtkusers] Filter to remove internal structure of a poly data? In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> <57EE86D11538B44096C712532DBB6C5A0131C17E04C1@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C17E04C8@DKFZEX01.ad.dkfz-heidelberg.de> No no, my data is 3D. The screenshot just contains cross sections to illustrate how the data looks ?inside?. Von: David E DeMarle [mailto:dave.demarle at kitware.com] Gesendet: Dienstag, 14. Juli 2015 14:35 An: Kilgus, Thomas Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data? Ah, I thought your data was 3D, not 2D. The DSSF won't help in this case. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 8:26 AM, Kilgus, Thomas > wrote: Hi David, sounds great, but it doesn?t do anything on my data. Do you know how the filter works? Attached is my code and a screenshot how my data looks like. Any ideas? Regards, Thomas Code: std::string inputFilename = ?path/to/file?; std::string outputFilename = ?path/to/save?; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName ( inputFilename.c_str() ); reader->Update(); vtkSmartPointer filter = vtkSmartPointer::New(); filter->SetInputConnection(reader->GetOutputPort()); filter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputConnection(filter->GetOutputPort()); writer->SetFileName(outputFilename.c_str()); writer->Update(); writer->Write(); Von: David E DeMarle [mailto:dave.demarle at kitware.com] Gesendet: Dienstag, 14. Juli 2015 13:37 An: Kilgus, Thomas Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data? Try vtkDataSetSurfaceFilter. It produces the external skin of any dataset in the form of a polydata. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 5:00 AM, Kilgus, Thomas > wrote: Hi everyone, I am not sure how to call this, but I was wondering if there is any filter (or combination) to remove internal structures of a PolyData? By internal I mean stuff that is not visible to the camera, unless you make the surface translucent. I know that there is a vtkPolyDataConnectivityFilter which works for some uses cases, but my data is connected at some parts. I am not even sure if this is possible, but the virtual camera could rotate around the object and every cell which is not seen (hit by a ray) could be deleted. Is there anything like this in VTK? Regards, Thomas Thomas Kilgus German Cancer Research Center (DKFZ) Div. Medical and Biological Informatics Junior group: Computer-assisted Interventions (E131) Im Neuenheimer Feld 280 69120 Heidelberg, Germany Phone: +49(0) 6221-42-3545 _______________________________________________ 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 dave.demarle at kitware.com Tue Jul 14 10:06:48 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 14 Jul 2015 10:06:48 -0400 Subject: [vtkusers] Filter to remove internal structure of a poly data? In-Reply-To: <57EE86D11538B44096C712532DBB6C5A0131C17E04C8@DKFZEX01.ad.dkfz-heidelberg.de> References: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> <57EE86D11538B44096C712532DBB6C5A0131C17E04C1@DKFZEX01.ad.dkfz-heidelberg.de> <57EE86D11538B44096C712532DBB6C5A0131C17E04C8@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: So what it is doing is passing the locally 2D primitives through, which is not what you want it to do. If this was a volumetric mesh it would give you the skin. You want something like vtkSelectEnclosedPoints. Unfortunately vtkSelectEnclosedPoints requires a surface to clip by, and that surface is exactly what you are trying to get. There might be something in VTK for this, but my quick searches haven't found it. sorry David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 8:39 AM, Kilgus, Thomas wrote: > No no, my data is 3D. The screenshot just contains cross sections to > illustrate how the data looks ?inside?. > > > > *Von:* David E DeMarle [mailto:dave.demarle at kitware.com] > *Gesendet:* Dienstag, 14. Juli 2015 14:35 > > *An:* Kilgus, Thomas > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Filter to remove internal structure of a poly > data? > > > > Ah, I thought your data was 3D, not 2D. The DSSF won't help in this case. > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > > On Tue, Jul 14, 2015 at 8:26 AM, Kilgus, Thomas < > t.kilgus at dkfz-heidelberg.de> wrote: > > Hi David, > > > > sounds great, but it doesn?t do anything on my data. Do you know how the > filter works? Attached is my code and a screenshot how my data looks like. > Any ideas? > > > > Regards, > > Thomas > > > > Code: > > > > std::string inputFilename = ?path/to/file?; > > std::string outputFilename = ?path/to/save?; > > vtkSmartPointer reader = > > vtkSmartPointer::New(); > > reader->SetFileName ( inputFilename.c_str() ); > > reader->Update(); > > > > vtkSmartPointer filter = > vtkSmartPointer::New(); > > filter->SetInputConnection(reader->GetOutputPort()); > > filter->Update(); > > > > vtkSmartPointer writer = > vtkSmartPointer::New(); > > writer->SetInputConnection(filter->GetOutputPort()); > > writer->SetFileName(outputFilename.c_str()); > > writer->Update(); > > writer->Write(); > > > > *Von:* David E DeMarle [mailto:dave.demarle at kitware.com] > *Gesendet:* Dienstag, 14. Juli 2015 13:37 > *An:* Kilgus, Thomas > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Filter to remove internal structure of a poly > data? > > > > Try vtkDataSetSurfaceFilter. It produces the external skin of any dataset > in the form of a polydata. > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > > On Tue, Jul 14, 2015 at 5:00 AM, Kilgus, Thomas < > t.kilgus at dkfz-heidelberg.de> wrote: > > Hi everyone, > > > > I am not sure how to call this, but I was wondering if there is any filter > (or combination) to remove internal structures of a PolyData? By internal I > mean stuff that is not visible to the camera, unless you make the surface > translucent. I know that there is a vtkPolyDataConnectivityFilter which > works for some uses cases, but my data is connected at some parts. I am not > even sure if this is possible, but the virtual camera could rotate around > the object and every cell which is not seen (hit by a ray) could be > deleted. Is there anything like this in VTK? > > > > Regards, > > Thomas > > > > Thomas Kilgus > > German Cancer Research Center (DKFZ) > > Div. Medical and Biological Informatics > > Junior group: Computer-assisted Interventions (E131) > > Im Neuenheimer Feld 280 > > 69120 Heidelberg, Germany > > Phone: +49(0) 6221-42-3545 > > > > > _______________________________________________ > 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 c.rapuano at gmail.com Tue Jul 14 10:13:53 2015 From: c.rapuano at gmail.com (audialc) Date: Tue, 14 Jul 2015 07:13:53 -0700 (MST) Subject: [vtkusers] vtkProjectedTexture example In-Reply-To: <57EE86D11538B44096C712532DBB6C5A0131C17E0450@DKFZEX01.ad.dkfz-heidelberg.de> References: <41A97F3464883247A39A022E96C3DD50924EC405@mail-server.ntb.ch> <1436811191010-5732867.post@n5.nabble.com> <57EE86D11538B44096C712532DBB6C5A0131C17E0450@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: <1436883233608-5732893.post@n5.nabble.com> Ok, thank you. I'll try your code! Thank you so much! -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkProjectedTexture-example-tp5723907p5732893.html Sent from the VTK - Users mailing list archive at Nabble.com. From github at stefanlau.com Tue Jul 14 10:20:01 2015 From: github at stefanlau.com (Stefan Lau) Date: Tue, 14 Jul 2015 16:20:01 +0200 Subject: [vtkusers] vtkGL2PSExporter in combination with QVTKRenderWindowInteractor In-Reply-To: References: <55914017.1010506@stefanlau.com> <559FE8EB.2060300@stefanlau.com> <55A22A89.7010709@stefanlau.com> Message-ID: <55A51A91.7010004@stefanlau.com> I finally located the issue by looking at the generated svg. The problem lies in the locale settings of the linux installation. When I use LC_NUMERIC=en_US.utf8 the generated svg looks correct. I don't know wether this is an issue that can be fixed in VTK or needs to be fixed in libgl2ps. All other image formats are affected as well. Should I create a Bugreport for this? Thanks for all the help by the way. - Stefan Am 13.07.2015 um 15:16 schrieb David Lonie: > This is very odd. I'm using an up-to-date arch linux with VTK built > from the current development branch. I just tested with today's code > and it's still working here. I also tried the vtk 6.1.0-8 package from > pacman and that works with your script, too. > > I'm not really sure what could be happening in your tests. Do the > other vector graphics formats (ps, eps, pdf) work? > > On Sun, Jul 12, 2015 at 4:51 AM, Stefan Lau > wrote: > > Allright, I tried with current development version, the issue is > still there. > > I also finally tried a different machine (with > different drivers and distro) and the issue is still there, so it > should not > only be an issue on my machine. > > One thing I noticed though: When trying it on a live Ubuntu, I had it > working once ;-). After installing it on hdd, it was in the broken > state again. > > What is your setup in terms of package versions etc.? I want > be able to get it to a working state, since I need the svgs for my > masters thesis. > > - Stefan > > > Am 10.07.2015 um 18:01 schrieb David Lonie: >> On Fri, Jul 10, 2015 at 11:46 AM, Stefan Lau >> > wrote: >> >> Allright after a short holiday, I had another few hours to >> debug the issue. But no success. >> >> Some other stuff that I tried (but now I'm out of ideas): >> * Installing everything inside a VirtualBox running Ubuntu >> 14.04 (using the Ubuntu-provided >> vtk packages, which are broken btw: >> https://bugs.launchpad.net/ubuntu/+source/vtk6/+bug/1354127) >> * Using VTK 6.2 (building my own version of VTK) >> * Using OpenGL software rendering (I thought that maybe it's >> a driver issue of the intel drivers) >> >> All yield the same corrupted result: The image that I sent in >> the last email. >> I haven't tried running it on a completely different machine, >> since I have none available ATM. >> Any ideas on how I could proceed? >> >> >> I'd try building the current development version and see if it >> persists. See the 'clone' section of >> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md >> for the information on how to get the sources. After downloading, >> the build process should be the same as 6.2. >> >> Dave > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From github at stefanlau.com Tue Jul 14 10:21:09 2015 From: github at stefanlau.com (Stefan Lau) Date: Tue, 14 Jul 2015 16:21:09 +0200 Subject: [vtkusers] vtkGL2PSExporter in combination with QVTKRenderWindowInteractor In-Reply-To: References: <55914017.1010506@stefanlau.com> <559FE8EB.2060300@stefanlau.com> <55A22A89.7010709@stefanlau.com> Message-ID: <55A51AD5.4050908@stefanlau.com> NB: You should be able to reproduce by using LC_NUMERIC=de_DE.utf8. - Stefan Am 13.07.2015 um 15:16 schrieb David Lonie: > This is very odd. I'm using an up-to-date arch linux with VTK built > from the current development branch. I just tested with today's code > and it's still working here. I also tried the vtk 6.1.0-8 package from > pacman and that works with your script, too. > > I'm not really sure what could be happening in your tests. Do the > other vector graphics formats (ps, eps, pdf) work? > > On Sun, Jul 12, 2015 at 4:51 AM, Stefan Lau > wrote: > > Allright, I tried with current development version, the issue is > still there. > > I also finally tried a different machine (with > different drivers and distro) and the issue is still there, so it > should not > only be an issue on my machine. > > One thing I noticed though: When trying it on a live Ubuntu, I had it > working once ;-). After installing it on hdd, it was in the broken > state again. > > What is your setup in terms of package versions etc.? I want > be able to get it to a working state, since I need the svgs for my > masters thesis. > > - Stefan > > > Am 10.07.2015 um 18:01 schrieb David Lonie: >> On Fri, Jul 10, 2015 at 11:46 AM, Stefan Lau >> > wrote: >> >> Allright after a short holiday, I had another few hours to >> debug the issue. But no success. >> >> Some other stuff that I tried (but now I'm out of ideas): >> * Installing everything inside a VirtualBox running Ubuntu >> 14.04 (using the Ubuntu-provided >> vtk packages, which are broken btw: >> https://bugs.launchpad.net/ubuntu/+source/vtk6/+bug/1354127) >> * Using VTK 6.2 (building my own version of VTK) >> * Using OpenGL software rendering (I thought that maybe it's >> a driver issue of the intel drivers) >> >> All yield the same corrupted result: The image that I sent in >> the last email. >> I haven't tried running it on a completely different machine, >> since I have none available ATM. >> Any ideas on how I could proceed? >> >> >> I'd try building the current development version and see if it >> persists. See the 'clone' section of >> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md >> for the information on how to get the sources. After downloading, >> the build process should be the same as 6.2. >> >> Dave > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Tue Jul 14 10:23:24 2015 From: david.lonie at kitware.com (David Lonie) Date: Tue, 14 Jul 2015 10:23:24 -0400 Subject: [vtkusers] vtkGL2PSExporter in combination with QVTKRenderWindowInteractor In-Reply-To: <55A51A91.7010004@stefanlau.com> References: <55914017.1010506@stefanlau.com> <559FE8EB.2060300@stefanlau.com> <55A22A89.7010709@stefanlau.com> <55A51A91.7010004@stefanlau.com> Message-ID: On Tue, Jul 14, 2015 at 10:20 AM, Stefan Lau wrote: > I finally located the issue by looking at the generated svg. > The problem lies in the locale settings of the linux installation. > When I use LC_NUMERIC=en_US.utf8 the generated svg looks > correct. I don't know wether this is an issue that can be fixed > in VTK or needs to be fixed in libgl2ps. > > All other image formats are affected as well. Should > I create a Bugreport for this? Thanks for all the help by the > way. > > Cool, glad you found it! Yes, please file a bug for this for reference. Not sure if this is something we can fix or if we'd need to push it upstream to GL2PS, but we can look into it when we revisit the exporter. Best, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephan.Franke at inpro.de Tue Jul 14 11:19:36 2015 From: Stephan.Franke at inpro.de (Stephan) Date: Tue, 14 Jul 2015 08:19:36 -0700 (MST) Subject: [vtkusers] vtk 6.1 TCL Wrapping problem In-Reply-To: <1436255906021-5732739.post@n5.nabble.com> References: <1436255906021-5732739.post@n5.nabble.com> Message-ID: <1436887176698-5732897.post@n5.nabble.com> Hallo again, I had fix the linking problem. Now I am in right position to create the vtkit.exe without problems. But when I execute the exe I get the message that the vtk.exe is not installed on the system ( I had to put it in the place where the vtkit.exe lies). That means, that the building of starkit did not function or vtk was not linked staticaly. I think that the second is the problem. So I checked to be true that the VTK_TCL_TK_STATIC flag was ON. It was set so that I thing that something else is missing for my vtk tcl wrapping build. What are the exact setting in cmake for vtk 6.x to build a static tcl/tk wrapping? Do I have to check some Modules or are the VTK_Group_tk and VTK_USE_TK flags are enough? Thank you very much for you help. Best regards, Stephan -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-6-1-TCL-Wrapping-problem-tp5732529p5732897.html Sent from the VTK - Users mailing list archive at Nabble.com. From t.kilgus at Dkfz-Heidelberg.de Tue Jul 14 11:41:29 2015 From: t.kilgus at Dkfz-Heidelberg.de (Kilgus, Thomas) Date: Tue, 14 Jul 2015 17:41:29 +0200 Subject: [vtkusers] Filter to remove internal structure of a poly data? In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5A0131C17E043A@DKFZEX01.ad.dkfz-heidelberg.de> <57EE86D11538B44096C712532DBB6C5A0131C17E04C1@DKFZEX01.ad.dkfz-heidelberg.de> <57EE86D11538B44096C712532DBB6C5A0131C17E04C8@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C17E050F@DKFZEX01.ad.dkfz-heidelberg.de> Ok, thank you very much! Von: David E DeMarle [mailto:dave.demarle at kitware.com] Gesendet: Dienstag, 14. Juli 2015 16:07 An: Kilgus, Thomas Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data? So what it is doing is passing the locally 2D primitives through, which is not what you want it to do. If this was a volumetric mesh it would give you the skin. You want something like vtkSelectEnclosedPoints. Unfortunately vtkSelectEnclosedPoints requires a surface to clip by, and that surface is exactly what you are trying to get. There might be something in VTK for this, but my quick searches haven't found it. sorry David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 8:39 AM, Kilgus, Thomas > wrote: No no, my data is 3D. The screenshot just contains cross sections to illustrate how the data looks ?inside?. Von: David E DeMarle [mailto:dave.demarle at kitware.com] Gesendet: Dienstag, 14. Juli 2015 14:35 An: Kilgus, Thomas Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data? Ah, I thought your data was 3D, not 2D. The DSSF won't help in this case. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 8:26 AM, Kilgus, Thomas > wrote: Hi David, sounds great, but it doesn?t do anything on my data. Do you know how the filter works? Attached is my code and a screenshot how my data looks like. Any ideas? Regards, Thomas Code: std::string inputFilename = ?path/to/file?; std::string outputFilename = ?path/to/save?; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName ( inputFilename.c_str() ); reader->Update(); vtkSmartPointer filter = vtkSmartPointer::New(); filter->SetInputConnection(reader->GetOutputPort()); filter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputConnection(filter->GetOutputPort()); writer->SetFileName(outputFilename.c_str()); writer->Update(); writer->Write(); Von: David E DeMarle [mailto:dave.demarle at kitware.com] Gesendet: Dienstag, 14. Juli 2015 13:37 An: Kilgus, Thomas Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Filter to remove internal structure of a poly data? Try vtkDataSetSurfaceFilter. It produces the external skin of any dataset in the form of a polydata. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jul 14, 2015 at 5:00 AM, Kilgus, Thomas > wrote: Hi everyone, I am not sure how to call this, but I was wondering if there is any filter (or combination) to remove internal structures of a PolyData? By internal I mean stuff that is not visible to the camera, unless you make the surface translucent. I know that there is a vtkPolyDataConnectivityFilter which works for some uses cases, but my data is connected at some parts. I am not even sure if this is possible, but the virtual camera could rotate around the object and every cell which is not seen (hit by a ray) could be deleted. Is there anything like this in VTK? Regards, Thomas Thomas Kilgus German Cancer Research Center (DKFZ) Div. Medical and Biological Informatics Junior group: Computer-assisted Interventions (E131) Im Neuenheimer Feld 280 69120 Heidelberg, Germany Phone: +49(0) 6221-42-3545 _______________________________________________ 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 Tue Jul 14 13:07:33 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Tue, 14 Jul 2015 10:07:33 -0700 Subject: [vtkusers] Fitting surface to the image In-Reply-To: References: <1436871194457-5732884.post@n5.nabble.com> Message-ID: Agata, are you trying to register the surface to the image or are they already registered? Siavash Sent from my iPhone > On Jul 14, 2015, at 5:39 AM, agatte wrote: > > OK. Thanks for response Cory. > > > > > 2015-07-14 14:25 GMT+02:00 Cory Quammen-2 [via VTK] <[hidden email]>: >> Agata, >> >> Not really. You might have better luck with ITK (www.itk.org). There is a mailing list for which you can sign up at http://www.itk.org/ITK/help/mailing.html >> >> Cory >> >>> On Tue, Jul 14, 2015 at 6:53 AM, agatte <[hidden email]> wrote: >>> >>> I have a question about fitting surface to the image. (I have a surface vtk >>> polydata file and 3D image) >>> Is there any method or solution to make it in VTK ? >>> >>> >>> I would appreciate for any help. >>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.com/Fitting-surface-to-the-image-tp5732884.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/Fitting-surface-to-the-image-tp5732884p5732886.html >> To unsubscribe from Fitting surface to the image, click here. >> NAML > > > View this message in context: Re: Fitting surface to the image > 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 agatakrason at gmail.com Tue Jul 14 13:59:35 2015 From: agatakrason at gmail.com (agatte) Date: Tue, 14 Jul 2015 10:59:35 -0700 (MST) Subject: [vtkusers] Fitting surface to the image In-Reply-To: References: <1436871194457-5732884.post@n5.nabble.com> Message-ID: They are already registered. 2015-07-14 19:08 GMT+02:00 Siavash Khallaghi [via VTK] < ml-node+s1045678n5732899h18 at n5.nabble.com>: > Agata, are you trying to register the surface to the image or are they > already registered? > > Siavash > > Sent from my iPhone > > On Jul 14, 2015, at 5:39 AM, agatte <[hidden email] > > wrote: > > OK. Thanks for response Cory. > > > > > 2015-07-14 14:25 GMT+02:00 Cory Quammen-2 [via VTK] <[hidden email] > >: > >> Agata, >> >> Not really. You might have better luck with ITK (www.itk.org). There is >> a mailing list for which you can sign up at >> http://www.itk.org/ITK/help/mailing.html >> >> Cory >> >> On Tue, Jul 14, 2015 at 6:53 AM, agatte <[hidden email] >> > wrote: >> >>> >>> I have a question about fitting surface to the image. (I have a surface >>> vtk >>> polydata file and 3D image) >>> Is there any method or solution to make it in VTK ? >>> >>> >>> I would appreciate for any help. >>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://vtk.1045678.n5.nabble.com/Fitting-surface-to-the-image-tp5732884.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/Fitting-surface-to-the-image-tp5732884p5732886.html >> To unsubscribe from Fitting surface to the image, click here. >> NAML >> >> > > > ------------------------------ > View this message in context: Re: Fitting surface to the image > > 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/Fitting-surface-to-the-image-tp5732884p5732899.html > To unsubscribe from Fitting surface to the image, click here > > . > NAML > > -- View this message in context: http://vtk.1045678.n5.nabble.com/Fitting-surface-to-the-image-tp5732884p5732900.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Tue Jul 14 15:20:08 2015 From: andy.bauer at kitware.com (Andy Bauer) Date: Tue, 14 Jul 2015 15:20:08 -0400 Subject: [vtkusers] [Paraview] Combining vtk and paraview python scripts In-Reply-To: <55A55C2C.2030107@nasa.gov> References: <55A55C2C.2030107@nasa.gov> Message-ID: ParaView's Python Programmable Filter and Python Programmable Source use VTK Python wrapping to do the work while making it available in Paraview. Check out http://www.paraview.org/Wiki/Python_Programmable_Filter. On Tue, Jul 14, 2015 at 2:59 PM, Jeff Becker wrote: > Hi. > > As a proof of concept, I have a vtk script that reads some binary data, > and produces a vti file. I then have a second script that I generated using > ParaView's tracing facility while viewing the data. Now I'd like to combine > them, so as to eliminate the intermediate file, i.e., go from binary data > directly to rendering. To be specific, my vtk script ends like this: > > steinbmag = steinbmag.reshape(nx,ny,nz).T > > vtkImporter = vtk.vtkImageImport() > vtkImporter.CopyImportVoidPointer(steinbmag, steinbmag.nbytes) > > vtkImporter.SetDataScalarTypeToFloat() > vtkImporter.SetNumberOfScalarComponents(1) > vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) > vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) > vtkImporter.SetScalarArrayName('B field magnitude') > > writer=vtk.vtkXMLImageDataWriter() > writer.SetFileName(out_fname) > writer.SetInputConnection(vtkImporter.GetOutputPort()) > writer.Write() > > and the ParaView script starts like this: > > from paraview.simple import * > > paraview.simple._DisableFirstRenderCameraReset() > > filepfx = '/nobackup/jcbecker/steinBmag_0' > infile = filepfx+'.vti' > # create a new 'XML Image Data Reader' > steinBmag_ = XMLImageDataReader(FileName=infile) > steinBmag_.CellArrayStatus = [] > steinBmag_.PointArrayStatus = ['B field magnitude'] > > # get animation scene > animationScene1 = GetAnimationScene() > > # update animation scene based on data timesteps > animationScene1.UpdateAnimationUsingDataTimeSteps() > > # get active view > renderView1 = GetActiveViewOrCreate('RenderView') > # uncomment following to set a specific view size > renderView1.ViewSize = [1090, 761] > > I'm looking at the VTK examples and pvpython documentation, but any help > is appreciated. > > Thanks. > > -jeff > _______________________________________________ > 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 jeffrey.c.becker at nasa.gov Tue Jul 14 14:59:56 2015 From: jeffrey.c.becker at nasa.gov (Jeff Becker) Date: Tue, 14 Jul 2015 11:59:56 -0700 Subject: [vtkusers] Combining vtk and paraview python scripts Message-ID: <55A55C2C.2030107@nasa.gov> Hi. As a proof of concept, I have a vtk script that reads some binary data, and produces a vti file. I then have a second script that I generated using ParaView's tracing facility while viewing the data. Now I'd like to combine them, so as to eliminate the intermediate file, i.e., go from binary data directly to rendering. To be specific, my vtk script ends like this: steinbmag = steinbmag.reshape(nx,ny,nz).T vtkImporter = vtk.vtkImageImport() vtkImporter.CopyImportVoidPointer(steinbmag, steinbmag.nbytes) vtkImporter.SetDataScalarTypeToFloat() vtkImporter.SetNumberOfScalarComponents(1) vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) vtkImporter.SetScalarArrayName('B field magnitude') writer=vtk.vtkXMLImageDataWriter() writer.SetFileName(out_fname) writer.SetInputConnection(vtkImporter.GetOutputPort()) writer.Write() and the ParaView script starts like this: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() filepfx = '/nobackup/jcbecker/steinBmag_0' infile = filepfx+'.vti' # create a new 'XML Image Data Reader' steinBmag_ = XMLImageDataReader(FileName=infile) steinBmag_.CellArrayStatus = [] steinBmag_.PointArrayStatus = ['B field magnitude'] # get animation scene animationScene1 = GetAnimationScene() # update animation scene based on data timesteps animationScene1.UpdateAnimationUsingDataTimeSteps() # get active view renderView1 = GetActiveViewOrCreate('RenderView') # uncomment following to set a specific view size renderView1.ViewSize = [1090, 761] I'm looking at the VTK examples and pvpython documentation, but any help is appreciated. Thanks. -jeff From andy.bauer at kitware.com Tue Jul 14 15:53:30 2015 From: andy.bauer at kitware.com (Andy Bauer) Date: Tue, 14 Jul 2015 15:53:30 -0400 Subject: [vtkusers] [Paraview] Combining vtk and paraview python scripts In-Reply-To: <55A56672.3040204@nasa.gov> References: <55A55C2C.2030107@nasa.gov> <55A56672.3040204@nasa.gov> Message-ID: All of that functionality is available through pvpython, or pvbatch in parallel. I'd suggest you look into using the GUI's Python trace functionality to help you make that script. pvpython can also be used as an interactive Python shell if you want. On Tue, Jul 14, 2015 at 3:43 PM, Jeff Becker wrote: > On 07/14/2015 12:20 PM, Andy Bauer wrote: > > ParaView's Python Programmable Filter and Python Programmable Source use > VTK Python wrapping to do the work while making it available in Paraview. > Check out http://www.paraview.org/Wiki/Python_Programmable_Filter. > > > Thanks. That's pretty neat, but what I'd really like is a standalone > script I can run in batch mode (no interaction) to generate one png file > per timestep for all the timesteps in the data set. Essentially I'd like a > way to construct a pipeline between the vtk.vtkImageImport() object and > the ParaView renderView1. > > -jeff > > > On Tue, Jul 14, 2015 at 2:59 PM, Jeff Becker > wrote: > >> Hi. >> >> As a proof of concept, I have a vtk script that reads some binary data, >> and produces a vti file. I then have a second script that I generated using >> ParaView's tracing facility while viewing the data. Now I'd like to combine >> them, so as to eliminate the intermediate file, i.e., go from binary data >> directly to rendering. To be specific, my vtk script ends like this: >> >> steinbmag = steinbmag.reshape(nx,ny,nz).T >> >> vtkImporter = vtk.vtkImageImport() >> vtkImporter.CopyImportVoidPointer(steinbmag, steinbmag.nbytes) >> >> vtkImporter.SetDataScalarTypeToFloat() >> vtkImporter.SetNumberOfScalarComponents(1) >> vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) >> vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) >> vtkImporter.SetScalarArrayName('B field magnitude') >> >> writer=vtk.vtkXMLImageDataWriter() >> writer.SetFileName(out_fname) >> writer.SetInputConnection(vtkImporter.GetOutputPort()) >> writer.Write() >> >> and the ParaView script starts like this: >> >> from paraview.simple import * >> >> paraview.simple._DisableFirstRenderCameraReset() >> >> filepfx = '/nobackup/jcbecker/steinBmag_0' >> infile = filepfx+'.vti' >> # create a new 'XML Image Data Reader' >> steinBmag_ = XMLImageDataReader(FileName=infile) >> steinBmag_.CellArrayStatus = [] >> steinBmag_.PointArrayStatus = ['B field magnitude'] >> >> # get animation scene >> animationScene1 = GetAnimationScene() >> >> # update animation scene based on data timesteps >> animationScene1.UpdateAnimationUsingDataTimeSteps() >> >> # get active view >> renderView1 = GetActiveViewOrCreate('RenderView') >> # uncomment following to set a specific view size >> renderView1.ViewSize = [1090, 761] >> >> I'm looking at the VTK examples and pvpython documentation, but any help >> is appreciated. >> >> Thanks. >> >> -jeff >> _______________________________________________ >> 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 jeffrey.c.becker at nasa.gov Tue Jul 14 15:43:46 2015 From: jeffrey.c.becker at nasa.gov (Jeff Becker) Date: Tue, 14 Jul 2015 12:43:46 -0700 Subject: [vtkusers] [Paraview] Combining vtk and paraview python scripts In-Reply-To: References: <55A55C2C.2030107@nasa.gov> Message-ID: <55A56672.3040204@nasa.gov> On 07/14/2015 12:20 PM, Andy Bauer wrote: > ParaView's Python Programmable Filter and Python Programmable Source > use VTK Python wrapping to do the work while making it available in > Paraview. Check out > http://www.paraview.org/Wiki/Python_Programmable_Filter. Thanks. That's pretty neat, but what I'd really like is a standalone script I can run in batch mode (no interaction) to generate one png file per timestep for all the timesteps in the data set. Essentially I'd like a way to construct a pipeline between the vtk.vtkImageImport() object and the ParaView renderView1. -jeff > > On Tue, Jul 14, 2015 at 2:59 PM, Jeff Becker > > wrote: > > Hi. > > As a proof of concept, I have a vtk script that reads some binary > data, and produces a vti file. I then have a second script that I > generated using ParaView's tracing facility while viewing the > data. Now I'd like to combine them, so as to eliminate the > intermediate file, i.e., go from binary data directly to > rendering. To be specific, my vtk script ends like this: > > steinbmag = steinbmag.reshape(nx,ny,nz).T > > vtkImporter = vtk.vtkImageImport() > vtkImporter.CopyImportVoidPointer(steinbmag, steinbmag.nbytes) > > vtkImporter.SetDataScalarTypeToFloat() > vtkImporter.SetNumberOfScalarComponents(1) > vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) > vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) > vtkImporter.SetScalarArrayName('B field magnitude') > > writer=vtk.vtkXMLImageDataWriter() > writer.SetFileName(out_fname) > writer.SetInputConnection(vtkImporter.GetOutputPort()) > writer.Write() > > and the ParaView script starts like this: > > from paraview.simple import * > > paraview.simple._DisableFirstRenderCameraReset() > > filepfx = '/nobackup/jcbecker/steinBmag_0' > infile = filepfx+'.vti' > # create a new 'XML Image Data Reader' > steinBmag_ = XMLImageDataReader(FileName=infile) > steinBmag_.CellArrayStatus = [] > steinBmag_.PointArrayStatus = ['B field magnitude'] > > # get animation scene > animationScene1 = GetAnimationScene() > > # update animation scene based on data timesteps > animationScene1.UpdateAnimationUsingDataTimeSteps() > > # get active view > renderView1 = GetActiveViewOrCreate('RenderView') > # uncomment following to set a specific view size > renderView1.ViewSize = [1090, 761] > > I'm looking at the VTK examples and pvpython documentation, but > any help is appreciated. > > Thanks. > > -jeff > _______________________________________________ > 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 patrick.oleary at kitware.com Tue Jul 14 16:29:06 2015 From: patrick.oleary at kitware.com (Patrick O'Leary) Date: Tue, 14 Jul 2015 14:29:06 -0600 Subject: [vtkusers] Extended Deadline: ISAV: In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization an SC15 Workshop Message-ID: Extended Deadline (Paper submission deadline: 16 August 2015; other deadlines: see below) ISAV: In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization an SC15 Workshop Monday afternoon 16 November 2015, Austin, TX, USA Event web page: http://vis.lbl.gov/Events/ISAV-2015/ == Scope == This workshop brings together researchers, developers and practitioners from industry, academia, and government laboratories who use in situ methods in extreme-scale, high performance computing. The goal is to present existing in-situ infrastructures, reference examples in a range of science and engineering applications, to discuss topics like opportunities presented by new architectures; existing infrastructure needs, requirements, and gaps; and experiences to foster and enable in situ analysis and visualization. The considerable interest in the HPC community regarding in situ analysis and visualization is due to several factors. First is an I/O cost savings, where data is analyzed/visualized while being generated, without first storing to a filesystem. Second is the potential for increased accuracy, where fine temporal sampling of transient analysis might expose some complex behavior missed in coarse temporal sampling. Third is the ability to use all available resources, CPU?s and accelerators, in the computation of analysis products. In Situ processing is still a relatively new idea, and up until recently, most implementations have been ad hoc, proof-of-concept prototypes. However, several in situ infrastructure implementations have emerged. ParaView and VisIt both provide tools for in situ analysis and visualization. ParaView Catalyst can be linked to a simulation, allowing the simulation to share data with Catalyst for visualization. Similar capabilities are available within VisIt with the libsim library. Both Catalyst (through Live) and libsim enable the opposite flow of information, sending data from the client to the simulation, enabling the possibility of simulation steering. ADIOS and GLEAN allow simulations to adopt in situ techniques by leveraging their advanced I/O infrastructures that enable co-analysis pipelines rather than changing the simulator. The non-intrusive integration provide resilience to third party library bugs and possible jitter in the simulation. Participation/Call for Papers We invite short (4-page) papers that identify opportunities, challenges and case studies/best practices for in situ analysis and visualization. These papers could propose actions, or provide position, or experience reports on in situ analysis and visualization. Areas of interest for ISAV, include, but are not limited to: * In situ infrastructures - Current Systems: production quality, research prototypes - Opportunities - Gaps * System resources, hardware, and emerging architectures - Enabling Hardware - Hardware and architectures that provide opportunities for In situ processing, such as burst buffers, staging computations on I/O nodes, sharing cores within a node for both simulation and in situ processing * Examples/Case studies - Best practices - Analysis: feature detection, statistical methods, temporal methods, geometric methods - Visualization: information visualization, scientific visualization, time-varying methods - Data reduction/compression * Simulation - Integration:data modeling, software-engineering - Resilience: error detection, fault recovery - Workflows for supporting complex in situ processing pipelines * Requirements - Preserve important elements - Significantly reduce the data size - Flexibility for post-processing exploration == Submitting Papers == Submissions are limited to 4 pages in the ACM format (see http://www.acm.org/sigs/publications/proceedings-templates). The 4-page limit includes figures, tables, and appendices, but does not include references, for which you may use up to one additional page. Please submit your paper via the ISAV 2015 EasyChair submission page at https://easychair.org/conferences/?conf=isav2015. == Timelines/Important Dates: == 16 August 2015 (was 1 August 2015) Paper submission deadline 16 September 2015 (was 1 September 2015) Author notification 30 September 2015 (was 15 September 2015) Camera ready copy due mid-October 2015 Final program posted to ISAV web page 16 November 2015 ISAV workshop == Organizers/Program Committee == Organizers E. Wes Bethel, ewbethel at lbl.gov, Lawrence Berkeley National Laboratory, USA Venkatram Vishwanath, venkat at anl.gov, Argonne National Laboratory, USA Gunther H. Weber, ghweber at lbl.gov, Lawrence Berkeley National Laboratory, USA Matthew Wolf, mwolf at cc.gatech.edu, Georgia Institute of Technology, USA Program Committee Utkarsh Ayachit, Kitware Inc., USA Earl P.N. Duque, Intelligent Light, USA Nicola Ferrier, Argonne National Laboratory, USA Burlen Loring, Lawrence Berkeley National Laboratory, USA Dmitriy Morozov, Lawrence Berkeley National Laboratory, USA Patrick O?Leary, Kitware Inc., USA Manish Parashar, Rutgers, USA Karsten Schwan, Georgia Institute of Technology, USA Alex Sim, Lawrence Berkeley National Laboratory, USA Brad Whitlock, Intelligent Light, USA Kesheng (John) Wu, Lawrence Berkeley National Laboratory, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From garyfallidis at gmail.com Tue Jul 14 19:13:23 2015 From: garyfallidis at gmail.com (Eleftherios Garyfallidis) Date: Tue, 14 Jul 2015 19:13:23 -0400 Subject: [vtkusers] Using standard icons with vtkButtonWidget look edgy and aliased. Message-ID: Hello all, I am using the button widget with the texture button representation in the following way: image1 = vtk.vtkPNGReader() image1.SetFileName('infinity.png') image1.Update() button_rep = vtk.vtkTexturedButtonRepresentation2D() button_rep.SetNumberOfStates(2) button_rep.SetButtonTexture(0, image1.GetOutput()) button_rep.SetButtonTexture(1, image1.GetOutput()) button = vtk.vtkButtonWidget() button.SetInteractor(iren) button.SetRepresentation(button_rep) .... The input file is a standard 32x32 PNG icon from icomoon. Currently I am getting this result. See for example the top right corner with the infinity symbol. https://dl.dropboxusercontent.com/u/2481924/Screenshot%20from%202015-07-14%2018%3A51%3A52.png You will notice that it looks edgy and not smooth. How can I improve the rendering of this icon? So that it looks smoother with less aliasing? What is provided by VTK for this purpose? Best regards, Eleftherios -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Tue Jul 14 20:43:02 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Tue, 14 Jul 2015 17:43:02 -0700 Subject: [vtkusers] Selection with vtkCompositePolyDataMapper2 mapper problem In-Reply-To: References: Message-ID: I attached data set written with vtkXMLMultiBlockDataWriter I failed to reproduce problem with ParaView myself. But its pipeline is different as well as mapper code seems different from vtk 6.1.0 and 6.2.0 I am trying to re-build vtk 6.2.0 with Opengl2 module enabled. Will update when done. On Tue, Jul 14, 2015 at 2:32 AM, Utkarsh Ayachit < utkarsh.ayachit at kitware.com> wrote: > Alex, > > Can you share the dataset (as a vtm perhaps)? I see if I can reproduce > this with ParaView. > > Utkarsh > > On Tue, Jul 14, 2015 at 12:56 AM Alex Malyushytskyy > wrote: > >> I tried to debug selection and found that in : >> >> vtkSelection* vtkHardwareSelector::GenerateSelection( unsigned int x1, >> unsigned int y1, >> unsigned int x2, unsigned int y2) >> >> GetPixelInformation(pos, 0); already returns PixelInformation.CompositeID >> for block which is outside selection frame as a valid >> >> This means that problem is either within CaptureBuffers() or >> GetPixelInformation() >> and possibly involves painter or mapper. >> I afraid I will have to give up on this unless I get any suggestion which >> may help me in finding bug location. >> >> >> On Mon, Jul 13, 2015 at 5:50 PM, Alex Malyushytskyy > > wrote: >> >>> Attempt to upgrade to vtk-6-2-0 did not fix the problem >>> >>> On Fri, Jul 10, 2015 at 10:26 PM, Alex Malyushytskyy < >>> alexmalvtk at gmail.com> wrote: >>> >>>> Using vtkHardwareSelector with vtkMultiBlockDataSet and vtkCompositePolyDataMapper2 >>>> sometimes is producing wrong results. >>>> I have a vtkMultiBlockDataSet with polydata (sometimes NULL) as blocks. >>>> On the screenshot you can see the simplest geometry which I can >>>> reproduce the problem on. Each rectangle there is a separate block. >>>> It also displays window frame which supposed to define selection. >>>> As you can see results (in red like colors) There is an extra block >>>> selected which is totally outside of the frame. >>>> >>>> Relative functions which do selection and extraction are available in >>>> the attachment. >>>> For some reason if I select a single component - basically by clicking >>>> without dragging selection frame, result is always correct. >>>> Result seems also depends on view angle. >>>> I tracked that wrong results appear after vtkConvertSelection::ToSelectionType >>>> in converted to vtkSelectionNode::BLOCKS >>>> vtkSelection. >>>> >>>> >>>> I would appreciate any help or ideas. >>>> I am using vtk-6-1-0. >>>> >>>> Regards, >>>> Alex >>>> >>>> >>>> >>>> >>> >> _______________________________________________ >> 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: test.zip Type: application/zip Size: 20871 bytes Desc: not available URL: From alexmalvtk at gmail.com Tue Jul 14 22:55:23 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Tue, 14 Jul 2015 19:55:23 -0700 Subject: [vtkusers] Selection with vtkCompositePolyDataMapper2 mapper problem In-Reply-To: References: Message-ID: I was unable to test selection with VTK built with OpenGL2 option. Application was built without errors, but displayed multiple problems. It was failing inside vtk during rendering multiblock ( negative index in the stl container ) dataset until I commented line after adding actor to renderer. renderer_->AddActor(actor_ ); // renderer_->RemoveCuller(renderer_->GetCullers()->GetLastItem()); And even after this model was stripped off half components. I guess I am stuck again. On Tue, Jul 14, 2015 at 5:43 PM, Alex Malyushytskyy wrote: > I attached data set written with vtkXMLMultiBlockDataWriter > I failed to reproduce problem with ParaView myself. > But its pipeline is different as well as mapper code seems different from > vtk 6.1.0 and 6.2.0 > > I am trying to re-build vtk 6.2.0 with Opengl2 module enabled. Will update > when done. > > On Tue, Jul 14, 2015 at 2:32 AM, Utkarsh Ayachit < > utkarsh.ayachit at kitware.com> wrote: > >> Alex, >> >> Can you share the dataset (as a vtm perhaps)? I see if I can reproduce >> this with ParaView. >> >> Utkarsh >> >> On Tue, Jul 14, 2015 at 12:56 AM Alex Malyushytskyy >> wrote: >> >>> I tried to debug selection and found that in : >>> >>> vtkSelection* vtkHardwareSelector::GenerateSelection( unsigned int x1, >>> unsigned int y1, >>> unsigned int x2, unsigned int y2) >>> >>> GetPixelInformation(pos, 0); already >>> returns PixelInformation.CompositeID for block which is outside selection >>> frame as a valid >>> >>> This means that problem is either within CaptureBuffers() or >>> GetPixelInformation() >>> and possibly involves painter or mapper. >>> I afraid I will have to give up on this unless I get any suggestion >>> which may help me in finding bug location. >>> >>> >>> On Mon, Jul 13, 2015 at 5:50 PM, Alex Malyushytskyy < >>> alexmalvtk at gmail.com> wrote: >>> >>>> Attempt to upgrade to vtk-6-2-0 did not fix the problem >>>> >>>> On Fri, Jul 10, 2015 at 10:26 PM, Alex Malyushytskyy < >>>> alexmalvtk at gmail.com> wrote: >>>> >>>>> Using vtkHardwareSelector with vtkMultiBlockDataSet and vtkCompositePolyDataMapper2 >>>>> sometimes is producing wrong results. >>>>> I have a vtkMultiBlockDataSet with polydata (sometimes NULL) as >>>>> blocks. >>>>> On the screenshot you can see the simplest geometry which I can >>>>> reproduce the problem on. Each rectangle there is a separate block. >>>>> It also displays window frame which supposed to define selection. >>>>> As you can see results (in red like colors) There is an extra block >>>>> selected which is totally outside of the frame. >>>>> >>>>> Relative functions which do selection and extraction are available in >>>>> the attachment. >>>>> For some reason if I select a single component - basically by clicking >>>>> without dragging selection frame, result is always correct. >>>>> Result seems also depends on view angle. >>>>> I tracked that wrong results appear after vtkConvertSelection::ToSelectionType >>>>> in converted to vtkSelectionNode::BLOCKS >>>>> vtkSelection. >>>>> >>>>> >>>>> I would appreciate any help or ideas. >>>>> I am using vtk-6-1-0. >>>>> >>>>> Regards, >>>>> Alex >>>>> >>>>> >>>>> >>>>> >>>> >>> _______________________________________________ >>> 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 oleg.krivosheev at xcision.com Wed Jul 15 01:01:03 2015 From: oleg.krivosheev at xcision.com (Oleg Krivosheev) Date: Wed, 15 Jul 2015 01:01:03 -0400 Subject: [vtkusers] Contour, ContourWidget and triangles filler Message-ID: Hi, All what I'm trying to do is to have editable contour in vtkContourWidget, with internal area filled with somewhat transparent color. What I managed to do is to make contour, put it into a widget, generate triangles strip from the contour via vtkTriangleFilter and draw it all together, Python code at the link http://codepad.org/VPOa13St Now questions. Is it a good way to proceed? Looks very cumbersome to me, but I'm new to VTK. Another big question is how to connect contour edit action (say, moving or adding point) with triangle strip update. Right now as soon as I move point, contour is updated but triangles filler is not Any help is greatly appreciated regards OK -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jul 15 08:54:39 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 15 Jul 2015 08:54:39 -0400 Subject: [vtkusers] Color Look up table not working for vtkDataSetMapper using vtkNetCDFCFReader In-Reply-To: References: Message-ID: Hi Manjunath, Sorry to take so long to get back to you. Change mapper.SetScalarModeToUsePointData() to mapper.SetScalarModeToUsePointFieldData() The difference is subtle. The first call says to use the currently "active" scalar array. VTK has the concept of active attributes, which means that you can set one array in the point data arrays to be the active scalars. This concept is being used less and less, but it is still around, so it's worth knowing about. The call you had says to color by this array, but apparently there is no active array in the output of the NetCDF reader. The call I am suggesting (and which I tested with a sample NetCDF file) says to use the array named by mapper.SelectColorArray(varName) for coloring. HTH, Cory On Thu, Jul 2, 2015 at 8:25 AM, Manjunath K E wrote: > Hi, > > I am working on ocean data visualization. I have data in netCdf format. > I have written a code to read netcdf file and assign color for the input. > Although, I am able to get grid display, but I am unable to get the > coloring on it. > > I have created lookup table for color mapping, but it is not working.. > Please help me. > Following is my code... > ======================================================== > from vtk import * > > reader = vtkNetCDFCFReader() > reader.SetFileName("3d.nc") > reader.SphericalCoordinatesOff() > #reader.SetOutputTypeToRectilinear() > reader.SetOutputType(6)#SetOutputTypeToRectilinear() > reader.SetReplaceFillValueWithNan(1) > reader.UpdateMetaData() > reader.Update() > reader.GetOutput().UpdateInformation() > output = reader.GetOutput() > > # find the range of the point scalars > a,b = reader.GetOutput().GetPointData().GetArray("SAL").GetRange() > nm = reader.GetOutput().GetPointData().GetArray("SAL").GetName() > > # show how to print a string in python, it is similar to C-style sprintf > print "Range of %s: %4.2f-%4.2f" %(nm,a,b) > > # transfer function (lookup table) for mapping point scalar data > # to colors (parent class is vtkScalarsToColors) > lut = vtk.vtkColorTransferFunction() > lut.AddRGBPoint(a, 0.0, 0.0, 1.0) > 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.SetAlpha(0.5) > > mapper = vtkDataSetMapper() > mapper.SetInputConnection(reader.GetOutputPort()) > mapper.SetScalarModeToUsePointData() > mapper.SetLookupTable(lut) > mapper.SetScalarRange(a,b) > mapper.SelectColorArray("SAL"); > > # the actor > myActor = vtkActor() > myActor.SetMapper( mapper ) > > # renderer and render window > ren = vtkRenderer() > ren.SetBackground(1, 1, 1) > renWin = vtk.vtkRenderWindow() > renWin.SetSize(512, 512) > renWin.AddRenderer( ren ) > > # render window interactor > iren = vtkRenderWindowInteractor() > iren.SetRenderWindow( renWin ) > > # add the actors to the renderer > ren.AddActor( myActor ) > > > # render > renWin.Render() > > # initialize and start the interactor > iren.Initialize() > iren.Start() > > ====================================================== > > > Thanks and Regards, > Manjunath > > > > > _______________________________________________ > 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 Jul 15 09:32:27 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 15 Jul 2015 09:32:27 -0400 Subject: [vtkusers] vtkContourWidget with vtkImageSlice In-Reply-To: <1436453324506-5732800.post@n5.nabble.com> References: <1436453324506-5732800.post@n5.nabble.com> Message-ID: Hi Jose, I suggest you post a small compilable example of code that shows what you have tried and perhaps some screenshots showing the problem. Cheers, Cory On Thu, Jul 9, 2015 at 10:48 AM, Jose Barreto wrote: > Hi, > I'm trying to connect vtkContourWidget in a vtkImageSlice, but I'm having > trouble first when I try to direct, vtkContourWidget appears incorrectly in > the plane (always behind the images). > > When I try to use vtkImagePointPlacer, which I believe is the correct > outside, the entrance to it is a VtkImageActor, and I can not draw this > kind > of vtkImageSlice object. I'm letting go something? Or is there some other > way to make that connection? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkContourWidget-with-vtkImageSlice-tp5732800.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 Jul 15 09:51:31 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 15 Jul 2015 09:51:31 -0400 Subject: [vtkusers] Change scalarbar labels In-Reply-To: References: Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Wed Jul 15 10:21:39 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Wed, 15 Jul 2015 07:21:39 -0700 (MST) Subject: [vtkusers] vtkContourWidget with vtkImageSlice In-Reply-To: References: <1436453324506-5732800.post@n5.nabble.com> Message-ID: <1436970099151-5732919.post@n5.nabble.com> Thanks Cory , I searched on Google and quite managed to connect the two objects, the point is that these results have described the images below .. ? What happens in the scene is as follows: the User moves the yellow line in the sagittal image (image over the display left), I show this picture in sagial view (monitor right over the picture), starting give it start creating vtkContourWidget object in this image. What I can not do at all, and move this object created. As u can see in the picture 3 he is recorded that Z regarding the image that was created in the axial. >From that point up (where he is until the top of the head) he will appear, I can not move it down, which is what I need. (Able to move it to any image). In image 4 I saved a vtp created the polydata and carry again, plus it comes with more points than I had done previously, and also do not understand why it. the code I use to save him ... vtkSmartPointer polyData = _vtktContourWindget()->GetContourRepresentation()->GetContourRepresentationAsPolyData(); vtkSmartPointer writer =vtkSmartPointer::New(); writer->SetFileName(clXUteis::ConverterStringParaChar(clXUteis::CapturaPasta(DadosPaciente::id, DadosPaciente::id2, 16, DadosSistema::caminho) + "\\ESTUDO\\" + DadosRequisicao::id_estudo + DadosRequisicao::id2_estudo + "poligonos.vtp")); writer->SetInputData(polyData); writer->Write(); To connect the two objects I just step to the vtkRenderWindowInteractor vtkContourWidget. To charge I do this ... The creation fo WindowsForms, I check in axial view if there is a polygon for that ID if so I carry .. GetVtkMaxilaMandibula()->GetContourWindget()->SetRepresentation(rep); GetVtkMaxilaMandibula()->GetContourWindget()->SetInteractor(interactor); GetVtkMaxilaMandibula()->GetContourWindget()->SetEnabled(true); GetVtkMaxilaMandibula()->GetContourWindget()->On(); if (File::Exists(clXUteis::CapturaPasta(DadosPaciente::id, DadosPaciente::id2, 16, DadosSistema::caminho) + "\\ESTUDO\\" + DadosRequisicao::id_estudo + DadosRequisicao::id2_estudo + "poligonos.vtp")) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName((clXUteis::ConverterStringParaChar(clXUteis::CapturaPasta(DadosPaciente::id, DadosPaciente::id2, 16, DadosSistema::caminho) + "\\ESTUDO\\" + DadosRequisicao::id_estudo + DadosRequisicao::id2_estudo + "poligonos.vtp"))); reader->Update(); GetVtkMaxilaMandibula()->GetContourWindget()->Initialize(reader->GetOutput()); } more then he comes this way, image 4, with more points ... -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkContourWidget-with-vtkImageSlice-tp5732800p5732919.html Sent from the VTK - Users mailing list archive at Nabble.com. From jose.de.paula at live.com Wed Jul 15 10:24:16 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Wed, 15 Jul 2015 07:24:16 -0700 (MST) Subject: [vtkusers] vtkContourWidget with vtkImageSlice In-Reply-To: References: <1436453324506-5732800.post@n5.nabble.com> Message-ID: <1436970256465-5732920.post@n5.nabble.com> Thanks Cory , I searched on Google and quite managed to connect the two objects, the point is that these results have described the images below .. ? What happens in the scene is as follows: the User moves the yellow line in the sagittal image (image over the display left), I show this picture in sagial view (monitor right over the picture), starting give it start creating vtkContourWidget object in this image. What I can not do at all, and move this object created. As u can see in the picture 3 he is recorded that Z regarding the image that was created in the axial. >From that point up (where he is until the top of the head) he will appear, I can not move it down, which is what I need. (Able to move it to any image). In image 4 I saved a vtp created the polydata and carry again, plus it comes with more points than I had done previously, and also do not understand why it. the code I use to save him ... vtkSmartPointer polyData = _vtktContourWindget()->GetContourRepresentation()->GetContourRepresentationAsPolyData(); vtkSmartPointer writer =vtkSmartPointer::New(); writer->SetFileName(clXUteis::ConverterStringParaChar(clXUteis::CapturaPasta(DadosPaciente::id, DadosPaciente::id2, 16, DadosSistema::caminho) + "\\ESTUDO\\" + DadosRequisicao::id_estudo + DadosRequisicao::id2_estudo + "poligonos.vtp")); writer->SetInputData(polyData); writer->Write(); To connect the two objects I just step to the vtkRenderWindowInteractor vtkContourWidget. To charge I do this ... The creation fo WindowsForms, I check in axial view if there is a polygon for that ID if so I carry .. GetVtkMaxilaMandibula()->GetContourWindget()->SetRepresentation(rep); GetVtkMaxilaMandibula()->GetContourWindget()->SetInteractor(interactor); GetVtkMaxilaMandibula()->GetContourWindget()->SetEnabled(true); GetVtkMaxilaMandibula()->GetContourWindget()->On(); if (File::Exists(clXUteis::CapturaPasta(DadosPaciente::id, DadosPaciente::id2, 16, DadosSistema::caminho) + "\\ESTUDO\\" + DadosRequisicao::id_estudo + DadosRequisicao::id2_estudo + "poligonos.vtp")) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName((clXUteis::ConverterStringParaChar(clXUteis::CapturaPasta(DadosPaciente::id, DadosPaciente::id2, 16, DadosSistema::caminho) + "\\ESTUDO\\" + DadosRequisicao::id_estudo + DadosRequisicao::id2_estudo + "poligonos.vtp"))); reader->Update(); GetVtkMaxilaMandibula()->GetContourWindget()->Initialize(reader->GetOutput()); } more then he comes this way, image 4, with more points ... -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkContourWidget-with-vtkImageSlice-tp5732800p5732920.html Sent from the VTK - Users mailing list archive at Nabble.com. From zarko at kg.ac.rs Wed Jul 15 11:34:18 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 15 Jul 2015 08:34:18 -0700 (MST) Subject: [vtkusers] GeyKeySym returns same value after releasyng KEY! Message-ID: <1436974458041-5732921.post@n5.nabble.com> I want to know when no key is pressed on keyboard. So i tried to do something like: if(interactor->GetKeySym() == null) { // do something } When button is pressed interactor->GetKeySym() returns string representing that key but even when released it keep returning same value. Why is that and do you have some better option to detect if key is not pressed without overriding onKeyPress and onKeyRelease functions. Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/GeyKeySym-returns-same-value-after-releasyng-KEY-tp5732921.html Sent from the VTK - Users mailing list archive at Nabble.com. From 15891495523 at 126.com Wed Jul 15 11:37:38 2015 From: 15891495523 at 126.com (zhq) Date: Wed, 15 Jul 2015 08:37:38 -0700 (MST) Subject: [vtkusers] A error happens when building VTK+Qt5 Message-ID: <1436974658339-5732922.post@n5.nabble.com> when I want to build the VTK, I set Module_vtkGUISupportQt=On, and Module_vtkGUISupportQtOpenGL=On, and the version of my QT is 5.1 and the VTK is 6.1. A error appears when building the VTK: error C2371: 'GLdouble' : redefinition; different basic types error C2371: 'GLdouble' : redefinition; different basic types What can I do ? Thank you in advance! ZhangQiang -- View this message in context: http://vtk.1045678.n5.nabble.com/A-error-happens-when-building-VTK-Qt5-tp5732922.html Sent from the VTK - Users mailing list archive at Nabble.com. From c.rapuano at gmail.com Wed Jul 15 12:42:50 2015 From: c.rapuano at gmail.com (audialc) Date: Wed, 15 Jul 2015 09:42:50 -0700 (MST) Subject: [vtkusers] Project texture from a light source Message-ID: <1436978570082-5732924.post@n5.nabble.com> Hi, I'm looking for a way to project a texture onto an arbitraty surface. What I would like to get is to simulate a projector that project an image onto an object. Here you can see an example ftp://ftp.sgi.com/sgi/opengl/contrib/mjk/tips/projtex/index.html I tried to use vtkProjectedTexture, but I didn't get what I want (I think that this class is not good for my purpose, but I'm not sure! Maybe I'm not using it in the right way...) Do you have any example, that it would be good for me? Any language is ok. Thank you in advance! -- View this message in context: http://vtk.1045678.n5.nabble.com/Project-texture-from-a-light-source-tp5732924.html Sent from the VTK - Users mailing list archive at Nabble.com. From metorm at outlook.com Thu Jul 16 01:59:46 2015 From: metorm at outlook.com (WeiRan) Date: Thu, 16 Jul 2015 05:59:46 +0000 Subject: [vtkusers] =?utf-8?q?How_voxeliz_a_triangle_mesh_which_is_NOT_wat?= =?utf-8?q?ertight?= Message-ID: Hello guys: I am a new user of vtk and I am tring to voxeliz a triangle mesh using vtk. I have already tried two ways to do it, but neither of them succeed. 1. Using vtkPolyDataToImageStencil I got the example run on my computer, but the speed was really slow, it took me several minutes to compute a 256 * 256 * 256 volume data. What is the problem? Should the process take so long ? What's worse, some of my surface to voxeliz is not watertight, which means I cannot use this route at all. 2. Then I found this mail in our mail list : http://public.kitware.com/pipermail/vtkusers/2002-April/011020.html I think rendering the mesh is a good idea, but I can only get 2D data , ie , a screen shot of the window. Is there anyway to obtain 3D data of the window , or should I move the camera to show the cross section of the mesh and screen shot the window again and again ? In the bottom of the above mail , David said that I can also use vtkCutter to get section of the volume data , which is faster ? Perhaps this is an small problem for advanced users, but it is driving me crazy, please help me ! Wei Ran, metorm at outlook.com Wei Ran, metorm at outlook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharmaatul11 at gmail.com Thu Jul 16 02:58:00 2015 From: sharmaatul11 at gmail.com (luta) Date: Wed, 15 Jul 2015 23:58:00 -0700 (MST) Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: References: Message-ID: <1437029880754-5732927.post@n5.nabble.com> Hi David, Hope you must be doing great. I am working on an augmented reality project for medical application which involves surgical instruments tracking in 3D. For that we recently bought NDI polaris spectra and trying to use this with VTK. I downloaded your code for using NDI polaris from https://github.com/dgobbi/AIGS. I compiled it in visual studio 2010. Then I made a simple VTK project with CMake and included the headers and libraries from the compiled AIGS to the VTK project. The program is able to show me the version of NDI, however, I am not able to initialize and start tracking. I am sending you the code and the error what I get. Your help will be highly appreciated. #include #include #include #include #include #include #include #include #include "vtkNDITracker.h" #include #include "ndicapi.h" using namespace std; class Starttracker_aks:public vtkNDITracker { vtkNDITracker* newtracker; int x; int tool; const char *filename; int tool1; const char *filename1; int tool2; const char *filename2; int beepn; public: void asignvalues(){ newtracker = vtkNDITracker::New(); tool=1;tool1=2;tool2=3; filename= "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700338.rom"; filename1= "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700339.rom"; filename2= "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700449.rom"; string versionname; int serialname; newtracker->SetSerialDevice("COM5:"); newtracker->LoadVirtualSROM(tool,filename); newtracker->LoadVirtualSROM(tool1,filename1); newtracker->LoadVirtualSROM(tool2,filename2); newtracker->Probe(); Command("INIT:"); versionname=newtracker->GetVersion(); cout << newtracker->GetVersion(); int t1= GetToolFromHandle(tool); int t2= GetToolFromHandle(tool1); int t3= GetToolFromHandle(tool2); cout << "\n Tools active:\t" << t1 << "\t" << t2 << "\t" << t3 <<"\n"; } }; int main(int, char *[]) { Starttracker_aks statr; statr.asignvalues(); return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/SynchroGrab4D-vtk-Polaris-tracking-tp4600704p5732927.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Jul 16 09:49:14 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 16 Jul 2015 09:49:14 -0400 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1436832635014-5732876.post@n5.nabble.com> References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> Message-ID: On Mon, Jul 13, 2015 at 8:10 PM, Neel007 wrote: > Dear Cory, > > I was following the second-step you mentioned: "Alternatively, you could > *create a 3D image from your input 2D image*s, then use *vtkThreshold to > create an unstructured grid of just the white parts of the 3D image*. To > convert the resulting hexahedral elements in the *unstructured grid to > tetrahedra, use vtkDataSetTriangleFilter*." I am able to complete the first > step successfully the second one partially. I have included the code & the > output window, if you can have a look and give me some input It will be > very > much appreciated. Thank you for your time. > > > */create a 3D image from your input 2D images...(Working Fine as I have > visualized it similar as Matlab)/* > > // Start by loading some data. > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileNameSliceOffset(1); > reader->SetFileNameSliceSpacing(1); > > > reader->SetFilePattern("C:\\Users\\Neel\\Desktop\\VTK_try\\test_images\\2.%d.bspline.tif"); > reader->SetDataExtent(0, 63, 0, 63, 1, 551); > > reader->SetOrientationType(3); > reader->Update(); > > > */vtkThreshold to create an unstructured grid of just the white parts of > the > 3D image/* > Great, I'm glad it works. TIFF files can be difficult to work with, so I'm glad whatever is writing your TIFF files does so in a format that is readable by VTK. > As you have suggested to use vtkThreshold but the input data being binary > "Image Thresholding" operation is not applicable. vtkThreshold should work directly with output from the vtkTIFFReader, as in vtkSmartPointer threshold = vtkSmartPointer::New(); threshold->SetInputConnection(reader->GetOutputPort()); threshold->ThresholdByUpper(1); See if you can get this to work. If not, let me know. One thing to know is that vtkThreshold will give you a "blocky" mesh - it extracts whole voxels from the image. vtkClipVolume will give you a surface slightly smoother surface because it performs interpolation along voxel edges. See attached images showing the difference between the two. > Thus, I tried to convert > the 3D volume of *.tif stack of images to vtkImageData and trying to use > vtkClipVolume to create an unstructured grid using the white pixels. Here > I'm facing an issue: vtkImageData pixel values of the Binary Image > resulting > -5.4861292803319049e+303 ; Instead of 0 & 1; Any suggestion if I am > missing > something here. The code snippet & the output-window: > > // Create an image data > vtkSmartPointer imageData = > vtkSmartPointer::New(); > //vtkImageData *imageData=0; > imageData->AllocateScalars(VTK_DOUBLE,1); > imageData =reader->GetOutput() ; > You don't need to create a new vtkImageData object here. In fact, you are creating one, then setting the pointer to a different vtkImageData object, so you aren't even using the newly created vtkImageData. Instead, you can just create a vtkImageData object pointer and assign it to the output of the reader, .e.g, reader->Update(); // make sure to do this somewhere before getting the output vtkImageData* imageData = reader->GetOutput(); int* dims = imageData->GetDimensions(); > // int dims[3]; // can't do this > > std::cout << "Dims: " << " x: " << dims[0] << " y: " << dims[1] << " z: " > << dims[2] << std::endl; > > std::cout << "Number of points: " << imageData->GetNumberOfPoints() << > std::endl; > std::cout << "Number of cells: " << imageData->GetNumberOfCells() << > std::endl; > int extent[6]; > imageData->GetExtent(extent) ; > > > > vtkIdType numberOfPointArrays = > imageData->GetPointData()->GetNumberOfArrays(); > std::cout << "Number of PointData arrays: " << numberOfPointArrays << > std::endl; > > cout<< "Number of Scalar Components: > "<GetNumberOfScalarComponents()< > for(vtkIdType i = 0; i < numberOfPointArrays; i++) > { > // The following two lines are equivalent > > //arrayNames.push_back(polydata->GetPointData()->GetArray(i)->GetName()); > //arrayNames.push_back(polydata->GetPointData()->GetArrayName(i)); > int dataTypeID = imageData->GetPointData()->GetArray(i)->GetDataType(); > std::cout << "Array " << i << ": " << > reader->GetOutput()->GetPointData()->GetArrayName(i) > << " (type: " << dataTypeID << ")" << std::endl; > > } > > vtkSmartPointer vol = > vtkSmartPointer::New(); > > vol->SetInputData(imageData); > double tryval=-5.4861292803319049e+303;//* */Not sure which value > I should > for clipping/* > vol->SetValue(tryval); > vol->Update(); > > *For few slices (50) vtkClipVolume is working but for entire series it > throwing memory exception. I think I might need to use some other > functionalities. Please give me some suggestion.* > If you can run your program through a debugger, it should show you where it is failing. Please try that and send us a stack trace if you need additional help. Best regards, Cory -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ThresholdImageData.png Type: image/png Size: 6201 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ClipImageData.png Type: image/png Size: 16688 bytes Desc: not available URL: From cory.quammen at kitware.com Thu Jul 16 10:41:10 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 16 Jul 2015 10:41:10 -0400 Subject: [vtkusers] Contour, ContourWidget and triangles filler In-Reply-To: References: Message-ID: Hi Oleg, Welcome to VTK! Thanks for providing the code sample. You must be using VTK 5-something? In 6 and above, your SetInput() calls need to be changed to SetInputData(). Also, as a general note about using VTK, you can use algorithm2.SetInputConnection(algorithm1.GetOutputPort()) to create pipelines rather than pass vtkPolyData objects around. This is usually preferable as any changes to your upstream algorithms will propagate down to the renderer automatically. That might save you some code. Otherwise your example is pretty nice and compact in my opinion. To update the surface triangles, you need to set up an observer on the contourWidget's InteractionEvent. You can do this with contourWidget.AddObserver('InteractionEvent', my_callback) where my_callback is defined with def my_callback(contourWidget, unused): global contourWidget, mapper cd = contourWidget.GetRepresentation().GetContourRepresentationAsPolyData() td = gen_triangles(cd) mapper.SetInputData(td) Note that I've made the mapper global so you can access it in the callback. The first argument is the contour widget and the second is just the event type, which you don't need in this callback. By the way, you will likely get better results for the surface if you use the following definition of gen_triangles: def gen_triangles(cd): clsdPoly = vtk.vtkPolyData() clsdPoly.Allocate() clsdPoly.SetPoints(cd.GetPoints()) numPts = cd.GetNumberOfPoints() idList = vtk.vtkIdList() idList.SetNumberOfIds(numPts) [idList.SetId(i, i) for i in xrange(numPts)] clsdPoly.InsertNextCell(vtk.VTK_POLYGON, idList) triangles = vtk.vtkTriangleFilter() triangles.SetInputData(clsdPoly) triangles.Update() return triangles.GetOutput() This creates a VTK polygon cell which works better with the vtkTriangleFilter than the line cells from the contour widget representation. Hope that helps, Cory On Wed, Jul 15, 2015 at 1:01 AM, Oleg Krivosheev < oleg.krivosheev at xcision.com> wrote: > Hi, All > > what I'm trying to do is to have editable contour in vtkContourWidget, > with internal > area filled with somewhat transparent color. What I managed to do is to > make contour, > put it into a widget, generate triangles strip from the contour via > vtkTriangleFilter and > draw it all together, Python code at the link > > http://codepad.org/VPOa13St > > Now questions. Is it a good way to proceed? Looks very cumbersome to me, > but I'm new to VTK. > > Another big question is how to connect contour edit action (say, moving or > adding point) > with triangle strip update. Right now as soon as I move point, contour is > updated > but triangles filler is not > > Any help is greatly appreciated > > regards > > OK > > > _______________________________________________ > 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 david.gobbi at gmail.com Thu Jul 16 10:54:36 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 16 Jul 2015 08:54:36 -0600 Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: <1437029880754-5732927.post@n5.nabble.com> References: <1437029880754-5732927.post@n5.nabble.com> Message-ID: Hi Luta, For the vtkNDITracker, the ports start at index "0" and the first three ports (0, 1, 2) are reserved for active tools. So you need to load the sroms into ports (3, 4, 5). Here are some other comments: 1) In your code, your class is a subclass of vtkNDITracker, but it also has a vtkNDITracker that is a member. This is wrong, because it creates two instances of vtkNDITracker ("this" and "nditracker" are both instances of vtkNDITracker). I suggest you do not subclass vtkNDITracker. 2) Instead of calling Command("INIT:"), call newtracker->StartTracking(). The StartTracking() method will do the initialization. - David On Thu, Jul 16, 2015 at 12:58 AM, luta wrote: > Hi David, > Hope you must be doing great. > I am working on an augmented reality project for medical application which > involves surgical instruments tracking in 3D. > For that we recently bought NDI polaris spectra and trying to use this with > VTK. > I downloaded your code for using NDI polaris from > https://github.com/dgobbi/AIGS. > I compiled it in visual studio 2010. > Then I made a simple VTK project with CMake and included the headers and > libraries from the compiled AIGS to the VTK project. The program is able to > show me the version of NDI, however, I am not able to initialize and start > tracking. I am sending you the code and the error what I get. Your help > will > be highly appreciated. > > #include > #include > #include > #include > #include > #include > #include > #include > #include "vtkNDITracker.h" > #include > #include "ndicapi.h" > using namespace std; > > > class Starttracker_aks:public vtkNDITracker { > > vtkNDITracker* newtracker; > int x; > int tool; > const char *filename; > > int tool1; > const char *filename1; > > int tool2; > const char *filename2; > > int beepn; > > public: > void asignvalues(){ > newtracker > = vtkNDITracker::New(); > tool=1;tool1=2;tool2=3; > filename= > "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700338.rom"; > filename1= > "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700339.rom"; > filename2= > "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700449.rom"; > string versionname; > int serialname; > newtracker->SetSerialDevice("COM5:"); > newtracker->LoadVirtualSROM(tool,filename); > newtracker->LoadVirtualSROM(tool1,filename1); > newtracker->LoadVirtualSROM(tool2,filename2); > newtracker->Probe(); > Command("INIT:"); > versionname=newtracker->GetVersion(); > > cout << newtracker->GetVersion(); > > int t1= GetToolFromHandle(tool); > int t2= GetToolFromHandle(tool1); > int t3= GetToolFromHandle(tool2); > cout << "\n Tools active:\t" << t1 << "\t" << t2 << "\t" << t3 <<"\n"; > > } > }; > int main(int, char *[]) > { > Starttracker_aks statr; > statr.asignvalues(); > return EXIT_SUCCESS; > } > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Jul 16 11:11:11 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 16 Jul 2015 11:11:11 -0400 Subject: [vtkusers] A question about displaying Image using VTK In-Reply-To: <201507101117411951732@126.com> References: <2015070922510984090213@126.com> <201507101117411951732@126.com> Message-ID: Hi, Thank you for including your code. That makes it much easier to help. In your code, your opacity function has value 1200 at data value 0. The opacities between data value 0 and data value 1200 are linear interpolated, and I think having that high opacity at data value 0 made most of the opacities > 1.0 for values between 0 and 1200. Try changing this line opacityTransferFunction->AddPoint(0,1200); to opacityTransferFunction->AddPoint(0,0); This should solve your problem. It does on tests on my system. Best regards, Cory On Fri, Jul 10, 2015 at 2:55 AM, 15891495523 at 126.com <15891495523 at 126.com> wrote: > Dear Cory > > I am sorry, but those code doesn't work. > > And the complete code is : > void main() > { > > vtkSmartPointer reader = vtkSmartPointer::New(); > > reader->SetDirectoryName("G:\\Perfusion Project\\Perfusion_MIP\\MIP\\TimePhase\\Time2"); > reader->SetDataByteOrderToBigEndian(); > reader->Update(); > > > > vtkSmartPointer shift = vtkSmartPointer::New(); > shift->SetInputConnection(reader->GetOutputPort()); > shift->SetOutputScalarTypeToUnsignedShort(); > shift->Update(); > > > vtkSmartPointer reslice = vtkSmartPointer::New(); > reslice->SetInputData(shift->GetOutput()); > reslice->SetOutputDimensionality(3); > reslice->Update(); > > vtkSmartPointer image = vtkSmartPointer::New(); > image=reslice->GetOutput(); > > > vtkSmartPointer writer = vtkSmartPointer::New(); > writer->SetInputData(image); > writer->SetFileName("C:\\Users\\zhq\\Desktop\\VolumeData.vtk"); > writer->Update(); > > vtkSmartPointer ren = vtkSmartPointer::New(); > > vtkSmartPointer renWin = vtkSmartPointer::New(); > > vtkSmartPointer iren = vtkSmartPointer::New(); > > vtkSmartPointer style = vtkSmartPointer::New(); > > renWin->AddRenderer(ren); > renWin->SetInteractor(iren); > iren->SetInteractorStyle(style); > > > vtkSmartPointer opacityTransferFunction = vtkSmartPointer::New(); > opacityTransferFunction->AddPoint(0,1200); > opacityTransferFunction->AddPoint(1200,0.4); > opacityTransferFunction->AddPoint(2000,0.2); > > > /*vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); > colorTransferFunction->AddRGBPoint(0,0,0.5,0); > colorTransferFunction->AddRGBPoint(60,1,0,0); > colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8);*/ > > > vtkSmartPointer colorTransferFunction = vtkSmartPointer::New(); > colorTransferFunction->AddRGBPoint(0,0,0.5,0); > colorTransferFunction->AddRGBPoint(60,1,0,0); > colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); > colorTransferFunction->SetScalarOpacityFunction(opacityTransferFunction); > colorTransferFunction->EnableOpacityMappingOn(); > > > vtkSmartPointer volumeProperty = vtkSmartPointer::New(); > volumeProperty->SetColor(colorTransferFunction); > volumeProperty->SetScalarOpacity(opacityTransferFunction); > volumeProperty->ShadeOn(); > volumeProperty->SetInterpolationTypeToLinear(); > volumeProperty->SetAmbient(0.2); > > > vtkSmartPointer mipRayCastFunction = vtkSmartPointer::New(); > > vtkSmartPointer compositeFunction = vtkSmartPointer::New(); > > vtkSmartPointer volumeMapper = vtkSmartPointer::New(); > > volumeMapper->SetVolumeRayCastFunction(compositeFunction); > volumeMapper->SetInputData(image); > > vtkSmartPointer volume = vtkSmartPointer::New(); > volume->SetMapper(volumeMapper); > volume->SetProperty(volumeProperty); > > ren->AddVolume(volume); > ren->SetBackground(1,1,1); > renWin->Render(); > iren->Initialize(); > iren->Start(); > } > > Thank you very much! > > ZhangQiang > > ------------------------------ > > > *From:* Cory Quammen > *Date:* 2015-07-10 00:42 > *To:* 15891495523 at 126.com > *CC:* vtkusers > *Subject:* Re: [vtkusers] A question about displaying Image using VTK > Instead of using a vtkColorTransferFunction, try using > a vtkDiscretizableColorTransferFunction and setting the opacity function > via SetScalarOpacityFunction(), e.g. > > vtkSmartPointer > colorTransferFunction = > vtkSmartPointer::New(); > colorTransferFunction->AddRGBPoint(0,0,0.5,0); > colorTransferFunction->AddRGBPoint(60,1,0,0); > colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); > colorTransferFunction->SetScalarOpacityFunction(opacityTransferFunction); > > then enable opacity mapping with > > colorTransferFunction->EnableOpacityMappingOn(); > > HTH, > Cory > > On Thu, Jul 9, 2015 at 9:51 AM, 15891495523 at 126.com <15891495523 at 126.com> > wrote: > >> Dear all >> >> I feel confused when display a CT image using VTK. How can I make >> those black and gray part in the following picture invisible ? >> The key part of my code is : >> >> vtkSmartPointer opacityTransferFunction = >> vtkSmartPointer::New(); >> opacityTransferFunction->AddPoint(0,1200); >> opacityTransferFunction->AddPoint(1200,0.4); >> opacityTransferFunction->AddPoint(2000,0.2); >> >> vtkSmartPointer colorTransferFunction = >> vtkSmartPointer::New(); >> colorTransferFunction->AddRGBPoint(0,0,0.5,0); >> colorTransferFunction->AddRGBPoint(60,1,0,0); >> colorTransferFunction->AddRGBPoint(255,0.8,0.8,0.8); >> >> >> Thank you in advanced! >> >> ZhangQiang >> >> >> ------------------------------ >> >> >> _______________________________________________ >> 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. > [image: ????] ?????????????????????????????????????????? > ?? *1* ??? > InsertPic_.jpg(99K) ???? > > ???? > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InsertPic_(07-10-14-55-37).jpg Type: image/jpeg Size: 22021 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InsertPic_(07-10(07-10-14-55-37).jpg Type: image/jpeg Size: 100667 bytes Desc: not available URL: From olivameline at gmail.com Thu Jul 16 11:38:25 2015 From: olivameline at gmail.com (Olivier Ameline) Date: Thu, 16 Jul 2015 08:38:25 -0700 (MST) Subject: [vtkusers] problem with stereo rendering Message-ID: <1437061105394-5732934.post@n5.nabble.com> Hello everyone, I am trying to draw an helix in a QVTKWidget with stereoscopic 3D. I'm equiped with a Nvidia Quadro graphic card with 3D glasses and 3D Asus monitor, and the stereo works well in other programs. Here is a part of my code : // Add the graph in the view view->GetScene()->AddItem(chart.GetPointer()); // Add a plot to the graph plot->SetInputData(table.GetPointer()); plot->GetPen()->SetColorF(0.0, 0.0, 0.0, 0.5); chart->AddPlot(plot.GetPointer()); chart->RecalculateBounds(); // Stereo rendering view->GetRenderer()->ResetCamera(); view->GetRenderWindow()->StereoCapableWindowOn(); view->GetRenderWindow()->SetStereoRender(1); view->GetRenderWindow()->SetStereoTypeToAnaglyph(); view->GetRenderWindow()->StereoUpdate(); // Put the view in the QVTKWidget view->SetInteractor(ui->vueCourbe->GetInteractor()); ui->vueCourbe->SetRenderWindow(view->GetRenderWindow()); ------------------------------------------------------------------------------------------- When I compile, the helix is displayed without any stereo. I don't know what is wrong. Thanks for your help Olivier. -- View this message in context: http://vtk.1045678.n5.nabble.com/problem-with-stereo-rendering-tp5732934.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Jul 16 13:36:59 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 16 Jul 2015 13:36:59 -0400 Subject: [vtkusers] problem with stereo rendering In-Reply-To: <1437061105394-5732934.post@n5.nabble.com> References: <1437061105394-5732934.post@n5.nabble.com> Message-ID: Olivier, Try calling view->GetRenderWindow()->SetStereoTypeToCrystalEyes(); view->GetRenderWindow()->StereoRenderOn(); instead of view->GetRenderWindow()->SetStereoTypeToAnaglyph(); This has worked on a system similar to yours. HTH, Cory On Thu, Jul 16, 2015 at 11:38 AM, Olivier Ameline wrote: > Hello everyone, > > I am trying to draw an helix in a QVTKWidget with stereoscopic 3D. > I'm equiped with a Nvidia Quadro graphic card with 3D glasses and 3D Asus > monitor, and the stereo works well in other programs. > > Here is a part of my code : > > // Add the graph in the view > > view->GetScene()->AddItem(chart.GetPointer()); > > // Add a plot to the graph > > plot->SetInputData(table.GetPointer()); > plot->GetPen()->SetColorF(0.0, 0.0, 0.0, 0.5); > chart->AddPlot(plot.GetPointer()); > chart->RecalculateBounds(); > > // Stereo rendering > > view->GetRenderer()->ResetCamera(); > view->GetRenderWindow()->StereoCapableWindowOn(); > view->GetRenderWindow()->SetStereoRender(1); > view->GetRenderWindow()->SetStereoTypeToAnaglyph(); > view->GetRenderWindow()->StereoUpdate(); > > // Put the view in the QVTKWidget > > view->SetInteractor(ui->vueCourbe->GetInteractor()); > ui->vueCourbe->SetRenderWindow(view->GetRenderWindow()); > > > ------------------------------------------------------------------------------------------- > > When I compile, the helix is displayed without any stereo. > I don't know what is wrong. > > > Thanks for your help > > Olivier. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/problem-with-stereo-rendering-tp5732934.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 oleg.krivosheev at xcision.com Thu Jul 16 14:56:44 2015 From: oleg.krivosheev at xcision.com (Oleg Krivosheev) Date: Thu, 16 Jul 2015 14:56:44 -0400 Subject: [vtkusers] Contour, ContourWidget and triangles filler In-Reply-To: References: Message-ID: Hi, Cory thank you for the reply > You must be using VTK 5-something? yes, it is 5.10 > Otherwise your example is pretty nice and compact in my opinion. thank you. General question, before I start implementing your suggestions, is it a right approach? Basically, we draw contour on top of the image. Now we want contour to have semi-transparent fill, and keep it up with, say, moved point or added point. Is it a good idea to do it with triangle strip? Maybe it is already done, and I'm reinventing the wheel, or there is an obvious and simpler way to do so thank you Oleg On Thu, Jul 16, 2015 at 10:41 AM, Cory Quammen wrote: > Hi Oleg, > > Welcome to VTK! > > Thanks for providing the code sample. You must be using VTK 5-something? > In 6 and above, your SetInput() calls need to be changed to SetInputData(). > Also, as a general note about using VTK, you can use > > algorithm2.SetInputConnection(algorithm1.GetOutputPort()) > > to create pipelines rather than pass vtkPolyData objects around. This is > usually preferable as any changes to your upstream algorithms will > propagate down to the renderer automatically. That might save you some code. > > Otherwise your example is pretty nice and compact in my opinion. > > To update the surface triangles, you need to set up an observer on the > contourWidget's InteractionEvent. You can do this with > > contourWidget.AddObserver('InteractionEvent', my_callback) > > where my_callback is defined with > > def my_callback(contourWidget, unused): > global contourWidget, mapper > > cd = > contourWidget.GetRepresentation().GetContourRepresentationAsPolyData() > > td = gen_triangles(cd) > mapper.SetInputData(td) > > Note that I've made the mapper global so you can access it in the > callback. The first argument is the contour widget and the second is just > the event type, which you don't need in this callback. > > By the way, you will likely get better results for the surface if you use > the following definition of gen_triangles: > > def gen_triangles(cd): > clsdPoly = vtk.vtkPolyData() > clsdPoly.Allocate() > clsdPoly.SetPoints(cd.GetPoints()) > > numPts = cd.GetNumberOfPoints() > idList = vtk.vtkIdList() > idList.SetNumberOfIds(numPts) > [idList.SetId(i, i) for i in xrange(numPts)] > > clsdPoly.InsertNextCell(vtk.VTK_POLYGON, idList) > > triangles = vtk.vtkTriangleFilter() > triangles.SetInputData(clsdPoly) > triangles.Update() > > return triangles.GetOutput() > > This creates a VTK polygon cell which works better with the > vtkTriangleFilter than the line cells from the contour widget > representation. > > Hope that helps, > Cory > > On Wed, Jul 15, 2015 at 1:01 AM, Oleg Krivosheev < > oleg.krivosheev at xcision.com> wrote: > >> Hi, All >> >> what I'm trying to do is to have editable contour in vtkContourWidget, >> with internal >> area filled with somewhat transparent color. What I managed to do is to >> make contour, >> put it into a widget, generate triangles strip from the contour via >> vtkTriangleFilter and >> draw it all together, Python code at the link >> >> http://codepad.org/VPOa13St >> >> Now questions. Is it a good way to proceed? Looks very cumbersome to me, >> but I'm new to VTK. >> >> Another big question is how to connect contour edit action (say, moving >> or adding point) >> with triangle strip update. Right now as soon as I move point, contour is >> updated >> but triangles filler is not >> >> Any help is greatly appreciated >> >> regards >> >> OK >> >> >> _______________________________________________ >> 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 Thu Jul 16 15:28:32 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 16 Jul 2015 15:28:32 -0400 Subject: [vtkusers] Contour, ContourWidget and triangles filler In-Reply-To: References: Message-ID: Oleg, Yes, I think this is approach is fine. I'm not familiar with another way to do what you are doing. Best regards, Cory On Thu, Jul 16, 2015 at 2:56 PM, Oleg Krivosheev < oleg.krivosheev at xcision.com> wrote: > Hi, Cory > > thank you for the reply > > > You must be using VTK 5-something? > > yes, it is 5.10 > > > Otherwise your example is pretty nice and compact in my opinion. > > thank you. General question, before I start implementing your suggestions, > is it a right approach? Basically, we draw contour on top of the image. Now > we want contour to have semi-transparent fill, and keep it up with, say, > moved point or added point. Is it a good idea to do it with triangle strip? > Maybe it is already done, and I'm reinventing the wheel, or there is an > obvious and simpler way to do so > > thank you > > Oleg > > On Thu, Jul 16, 2015 at 10:41 AM, Cory Quammen > wrote: > >> Hi Oleg, >> >> Welcome to VTK! >> >> Thanks for providing the code sample. You must be using VTK 5-something? >> In 6 and above, your SetInput() calls need to be changed to SetInputData(). >> Also, as a general note about using VTK, you can use >> >> algorithm2.SetInputConnection(algorithm1.GetOutputPort()) >> >> to create pipelines rather than pass vtkPolyData objects around. This is >> usually preferable as any changes to your upstream algorithms will >> propagate down to the renderer automatically. That might save you some code. >> >> Otherwise your example is pretty nice and compact in my opinion. >> >> To update the surface triangles, you need to set up an observer on the >> contourWidget's InteractionEvent. You can do this with >> >> contourWidget.AddObserver('InteractionEvent', my_callback) >> >> where my_callback is defined with >> >> def my_callback(contourWidget, unused): >> global contourWidget, mapper >> >> cd = >> contourWidget.GetRepresentation().GetContourRepresentationAsPolyData() >> >> td = gen_triangles(cd) >> mapper.SetInputData(td) >> >> Note that I've made the mapper global so you can access it in the >> callback. The first argument is the contour widget and the second is just >> the event type, which you don't need in this callback. >> >> By the way, you will likely get better results for the surface if you use >> the following definition of gen_triangles: >> >> def gen_triangles(cd): >> clsdPoly = vtk.vtkPolyData() >> clsdPoly.Allocate() >> clsdPoly.SetPoints(cd.GetPoints()) >> >> numPts = cd.GetNumberOfPoints() >> idList = vtk.vtkIdList() >> idList.SetNumberOfIds(numPts) >> [idList.SetId(i, i) for i in xrange(numPts)] >> >> clsdPoly.InsertNextCell(vtk.VTK_POLYGON, idList) >> >> triangles = vtk.vtkTriangleFilter() >> triangles.SetInputData(clsdPoly) >> triangles.Update() >> >> return triangles.GetOutput() >> >> This creates a VTK polygon cell which works better with the >> vtkTriangleFilter than the line cells from the contour widget >> representation. >> >> Hope that helps, >> Cory >> >> On Wed, Jul 15, 2015 at 1:01 AM, Oleg Krivosheev < >> oleg.krivosheev at xcision.com> wrote: >> >>> Hi, All >>> >>> what I'm trying to do is to have editable contour in vtkContourWidget, >>> with internal >>> area filled with somewhat transparent color. What I managed to do is to >>> make contour, >>> put it into a widget, generate triangles strip from the contour via >>> vtkTriangleFilter and >>> draw it all together, Python code at the link >>> >>> http://codepad.org/VPOa13St >>> >>> Now questions. Is it a good way to proceed? Looks very cumbersome to me, >>> but I'm new to VTK. >>> >>> Another big question is how to connect contour edit action (say, moving >>> or adding point) >>> with triangle strip update. Right now as soon as I move point, contour >>> is updated >>> but triangles filler is not >>> >>> Any help is greatly appreciated >>> >>> regards >>> >>> OK >>> >>> >>> _______________________________________________ >>> 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 ke.manjunath at gmail.com Fri Jul 17 01:36:18 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Fri, 17 Jul 2015 11:06:18 +0530 Subject: [vtkusers] How to convert (cast) "vtkExtractRectilinearGrid" data type to "vtkRectilinearGrid" type. Message-ID: Hi, I am Manjunath, working on ocean visualization. I have generated certain volume of interest (VOI) using vtkExtractRectilinearGrid type. Now I would like to render vtkExtractRectilinearGrid as "vtkRectilinearGrid" type. I would like to know how to convert "vtkExtractRectilinearGrid" data type to "vtkRectilinearGrid" type. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivameline at gmail.com Fri Jul 17 03:28:56 2015 From: olivameline at gmail.com (Olivier Ameline) Date: Fri, 17 Jul 2015 00:28:56 -0700 (MST) Subject: [vtkusers] problem with stereo rendering In-Reply-To: References: <1437061105394-5732934.post@n5.nabble.com> Message-ID: <1437118136057-5732941.post@n5.nabble.com> Hello Cory, Thanks for your reply. I have tryied SetStereoTypeToCrystalEyes() (and all other stereo types) but the result is the same : the helix is displayed, but there is no stereo. May it be because of the classes of my variables ? For instance, "chart" is a vtkNew. Here is a part of my .h (class definition) : ----------- private: vtkNew table; vtkNew arrX; vtkNew arrY; vtkNew arrZ; vtkNew view; vtkNew chart; vtkNew plot; ----------- Olivier -- View this message in context: http://vtk.1045678.n5.nabble.com/problem-with-stereo-rendering-tp5732934p5732941.html Sent from the VTK - Users mailing list archive at Nabble.com. From simon.esneault at gmail.com Fri Jul 17 04:43:11 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 17 Jul 2015 10:43:11 +0200 Subject: [vtkusers] GPU volume rendering failure on Intel HD XXXX/Iris, Windows and recent drivers Message-ID: Hi All, We're experiencing GPU volume rendering failure on a lot (maybe all ?) Intel HD windows system with up to date drivers. This is reproducible in Paraview or with the GPURenderDemo example from VTK, just load a volume and try to render the volume... Here is a result image from paraview on a Dell Latitude E7450 (Intel HD 5500 inside), with GPU rendering [1] and the same volume with CPU VR rendering [2]. Interestingly, the volume rendering used to work with drivers older or equal to the version 10.18.10.3496 [3]. As a work around, we ask our customers to downgrade their driver version to this one, and they're enjoying smooth GPU rendering. But this driver is quite old and does not support recent chipset... I've built and tested the GPURenderDemo with the brand new OpenGL2 backend on an affected machine and of course it does work out of the box (congratulations for this amazing work !). But our application is FDA/CE marked and we need to wait that this new backend is completely ready for prime time. So for now, we have to stick with VTK 6.1 ... Anyone has any clue ? They're some warning that pop up from paraview related to the extension "gl_version_1_2" that could not be loaded, not sure if that could be related ? Following this thread [4] and the fix proposed, I've tried to replace /*****************/ extensions->LoadExtension("GL_VERSION_1_2") /*****************/ by /*****************/ extensions->LoadExtension("GL_EXT_texture3D"); extensions->LoadExtension( "GL_ARB_texture_non_power_of_two" ); /*****************/ in the vtkOpenGLGPUVolumeRayCastMapper.cxx, The warning disappears but there is still no volume rendering (tested with GPURenderDemo). Maybe it needs some others extensions ? Should I fill a bug in paraview, vtk ? Are there any plan to maintain and maybe fix this for the old backend ? Thanks, -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ [1] http://picpaste.com/pics/Paraview-4-3-1-GPU-VR_fail.1437122217.PNG [2] http://picpaste.com/pics/Paraview-4-3-1-CPU-VR_win.1437122267.PNG [3] https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23339 [4] http://public.kitware.com/pipermail/vtkusers/2014-April/083584.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Jul 17 06:41:40 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 17 Jul 2015 06:41:40 -0400 Subject: [vtkusers] problem with stereo rendering In-Reply-To: <1437118136057-5732941.post@n5.nabble.com> References: <1437061105394-5732934.post@n5.nabble.com> <1437118136057-5732941.post@n5.nabble.com> Message-ID: Olivier, Indeed, that is likely the reason. I do not believe the vtkContextView renders different images for left and right eye in stereo. It is meant for 2D plotting. vtkRenderView should work in stereo, but your helix would need to be defined as a vtkPolyData. HTH, Cory On Fri, Jul 17, 2015 at 3:28 AM, Olivier Ameline wrote: > Hello Cory, > > Thanks for your reply. > > I have tryied SetStereoTypeToCrystalEyes() (and all other stereo types) but > the result is the same : the helix is displayed, but there is no stereo. > > May it be because of the classes of my variables ? > For instance, "chart" is a vtkNew. > > Here is a part of my .h (class definition) : > > ----------- > private: > > vtkNew table; > vtkNew arrX; > vtkNew arrY; > vtkNew arrZ; > vtkNew view; > vtkNew chart; > vtkNew plot; > ----------- > > Olivier > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/problem-with-stereo-rendering-tp5732934p5732941.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 Fri Jul 17 06:45:51 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 17 Jul 2015 06:45:51 -0400 Subject: [vtkusers] How to convert (cast) "vtkExtractRectilinearGrid" data type to "vtkRectilinearGrid" type. In-Reply-To: References: Message-ID: Manjunath, vtkExtractRectilinearGrid is a vtkAlgorithm subclass - it read's data and produces data - while vtkRectilinearGrid is a subclass of vtkDataObject - it stores data. No conversion between the two is possible. What you need to do is call vtkExtractRectilinearGrid::GetOutput() to get the vtkRectilinearGrid. Make sure to call vtkExtractRectilinearGrid::Update() before you call GetOutput() so that the output data is up-to-date. Best regards, Cory On Fri, Jul 17, 2015 at 1:36 AM, Manjunath K E wrote: > Hi, > > I am Manjunath, working on ocean visualization. > I have generated certain volume of interest (VOI) using > vtkExtractRectilinearGrid type. Now I would like to render > vtkExtractRectilinearGrid as "vtkRectilinearGrid" type. > > I would like to know how to convert "vtkExtractRectilinearGrid" data type > to "vtkRectilinearGrid" type. > > 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 > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoldino at gmail.com Fri Jul 17 06:56:44 2015 From: smoldino at gmail.com (Paolo Grossi) Date: Fri, 17 Jul 2015 11:56:44 +0100 Subject: [vtkusers] Can't generate executable file from Cone.cxx example Message-ID: Greetings to the whole community of VTK, I'm a newbie user! After the installation of VTK on my PC (Ubuntu 14.04.2), I was trying to run the example linked here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone During the installation I selected the "BUILD EXAMPLE" option. I also unselected the "BUILD SHARED LIBS" option, because I can't proceed with the installation if I had selected it. My steps were: 1) created the file Cone.cxx into the directory "$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CmakeFiles/Cone.dir" with the text: #include #include #include #include #include #include #include #include int main(int, char *[]) { //Create a cone vtkSmartPointer coneSource = vtkSmartPointer::New(); coneSource->Update(); //Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(coneSource->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); //Create a renderer, render window, and interactor vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); //Add the actors to the scene renderer->AddActor(actor); renderer->SetBackground(.3, .2, .1); // Background color dark red //Render and interact renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } 2) created the file CMakeLists.txt into the same directory above with the text: cmake_minimum_required(VERSION 2.8) project(Cone) set(VTK_DIR $HOME/build-VTK) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(Cone Cone.cxx) if(VTK_LIBRARIES) target_link_libraries(Cone ${VTK_LIBRARIES}) else() target_link_libraries(Cone vtkHybrid vtkWidgets) endif() 3) typed the command "ccmake ." into the same directory above, pressed the C button and the G button 4) typed the command "make" into the same directory above, receiving the error explained below: $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:19:27: error: vtkConeSource.h: No such file or directory $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:20:31: error: vtkPolyDataMapper.h: No such file or directory $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:21:29: error: vtkRenderWindow.h: No such file or directory $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:22:23: error: vtkCamera.h: No such file or directory $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:23:22: error: vtkActor.h: No such file or directory $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:24:25: error: vtkRenderer.h: No such file or directory $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx: In function ?int main()?: $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: error: ?vtkConeSource? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: error: ?cone? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: error: ?vtkConeSource? is not a class or namespace $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: error: ?vtkPolyDataMapper? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: error: ?coneMapper? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: error: ?vtkPolyDataMapper? is not a class or namespace $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: error: ?vtkActor? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: error: ?coneActor? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: error: ?vtkActor? is not a class or namespace $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: error: ?vtkRenderer? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: error: ?ren1? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: error: ?vtkRenderer? is not a class or namespace $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: error: ?vtkRenderWindow? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: error: ?renWin? was not declared in this scope $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: error: ?vtkRenderWindow? is not a class or namespace make[2]: *** [CMakeFiles/Cone.dir/Cone.cxx.o] Error 1 make[1]: *** [CMakeFiles/Cone.dir/all] Error 2 make: *** [all] Error 2 I have really no idea about the solution of this problem. Sorry for my incompetence! I'm looking forward to hear you. Thanks, Paolo Grossi. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Jul 17 08:01:11 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 17 Jul 2015 08:01:11 -0400 Subject: [vtkusers] Can't generate executable file from Cone.cxx example In-Reply-To: References: Message-ID: Paolo, Did you get an error when configuring with ccmake? It looks like the VTK include directories are not being set properly. I would also recommend putting the example code and CMakeLists.txt file in a directory outside your VTK build directory. I'm not sure that this is causing the problem, but it is good practice to build dependent projects outside the VTK build directory. Also, in your CMakeLists.txt file, I think you can access your HOME environment variable with $ENV{HOME} not $HOME Thanks, Cory On Fri, Jul 17, 2015 at 6:56 AM, Paolo Grossi wrote: > Greetings to the whole community of VTK, > I'm a newbie user! > > After the installation of VTK on my PC (Ubuntu 14.04.2), I was trying to > run the example linked here: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone > During the installation I selected the "BUILD EXAMPLE" option. > I also unselected the "BUILD SHARED LIBS" option, because I can't proceed > with the installation if I had selected it. > > My steps were: > 1) created the file Cone.cxx into the directory > "$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CmakeFiles/Cone.dir" with the > text: > > #include > #include > #include > #include > #include > #include > #include > #include > > int main(int, char *[]) > { > //Create a cone > vtkSmartPointer coneSource = > vtkSmartPointer::New(); > coneSource->Update(); > > //Create a mapper and actor > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(coneSource->GetOutputPort()); > > vtkSmartPointer actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > > //Create a renderer, render window, and interactor > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > //Add the actors to the scene > renderer->AddActor(actor); > renderer->SetBackground(.3, .2, .1); // Background color dark red > > //Render and interact > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > 2) created the file CMakeLists.txt into the same directory above with the > text: > > cmake_minimum_required(VERSION 2.8) > project(Cone) > set(VTK_DIR $HOME/build-VTK) > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > add_executable(Cone Cone.cxx) > if(VTK_LIBRARIES) > target_link_libraries(Cone ${VTK_LIBRARIES}) > else() > target_link_libraries(Cone vtkHybrid vtkWidgets) > endif() > > 3) typed the command "ccmake ." into the same directory above, pressed the > C button and the G button > > 4) typed the command "make" into the same directory above, receiving the > error explained below: > > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:19:27: > error: vtkConeSource.h: No such file or directory > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:20:31: > error: vtkPolyDataMapper.h: No such file or directory > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:21:29: > error: vtkRenderWindow.h: No such file or directory > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:22:23: > error: vtkCamera.h: No such file or directory > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:23:22: > error: vtkActor.h: No such file or directory > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:24:25: > error: vtkRenderer.h: No such file or directory > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx: > In function ?int main()?: > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: > error: ?vtkConeSource? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: > error: ?cone? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: > error: ?vtkConeSource? is not a class or namespace > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: > error: ?vtkPolyDataMapper? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: > error: ?coneMapper? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: > error: ?vtkPolyDataMapper? is not a class or namespace > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: > error: ?vtkActor? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: > error: ?coneActor? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: > error: ?vtkActor? is not a class or namespace > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: > error: ?vtkRenderer? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: > error: ?ren1? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: > error: ?vtkRenderer? is not a class or namespace > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: > error: ?vtkRenderWindow? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: > error: ?renWin? was not declared in this scope > $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: > error: ?vtkRenderWindow? is not a class or namespace > make[2]: *** [CMakeFiles/Cone.dir/Cone.cxx.o] Error 1 > make[1]: *** [CMakeFiles/Cone.dir/all] Error 2 > make: *** [all] Error 2 > > I have really no idea about the solution of this problem. > Sorry for my incompetence! > I'm looking forward to hear you. > > Thanks, > Paolo Grossi. > > _______________________________________________ > 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 smoldino at gmail.com Fri Jul 17 08:11:54 2015 From: smoldino at gmail.com (Paolo Grossi) Date: Fri, 17 Jul 2015 13:11:54 +0100 Subject: [vtkusers] Can't generate executable file from Cone.cxx example In-Reply-To: References: Message-ID: Thanks Cory for your quick answer. I didn't receive an error during the configuration with ccmake. I tried to build the example outside the main directory and to correct the CMakeLists.txt, but the result is always the same. Regards, Paolo Grossi. On 17 July 2015 at 13:01, Cory Quammen wrote: > Paolo, > > Did you get an error when configuring with ccmake? It looks like the VTK > include directories are not being set properly. > > I would also recommend putting the example code and CMakeLists.txt file in > a directory outside your VTK build directory. I'm not sure that this is > causing the problem, but it is good practice to build dependent projects > outside the VTK build directory. > > Also, in your CMakeLists.txt file, I think you can access your HOME > environment variable with > > $ENV{HOME} > > not > > $HOME > > Thanks, > Cory > > On Fri, Jul 17, 2015 at 6:56 AM, Paolo Grossi wrote: > >> Greetings to the whole community of VTK, >> I'm a newbie user! >> >> After the installation of VTK on my PC (Ubuntu 14.04.2), I was trying to >> run the example linked here: >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone >> During the installation I selected the "BUILD EXAMPLE" option. >> I also unselected the "BUILD SHARED LIBS" option, because I can't proceed >> with the installation if I had selected it. >> >> My steps were: >> 1) created the file Cone.cxx into the directory >> "$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CmakeFiles/Cone.dir" with the >> text: >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> int main(int, char *[]) >> { >> //Create a cone >> vtkSmartPointer coneSource = >> vtkSmartPointer::New(); >> coneSource->Update(); >> >> //Create a mapper and actor >> vtkSmartPointer mapper = >> vtkSmartPointer::New(); >> mapper->SetInputConnection(coneSource->GetOutputPort()); >> >> vtkSmartPointer actor = vtkSmartPointer::New(); >> actor->SetMapper(mapper); >> >> //Create a renderer, render window, and interactor >> vtkSmartPointer renderer = >> vtkSmartPointer::New(); >> vtkSmartPointer renderWindow = >> vtkSmartPointer::New(); >> renderWindow->AddRenderer(renderer); >> vtkSmartPointer renderWindowInteractor = >> vtkSmartPointer::New(); >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> //Add the actors to the scene >> renderer->AddActor(actor); >> renderer->SetBackground(.3, .2, .1); // Background color dark red >> >> //Render and interact >> renderWindow->Render(); >> renderWindowInteractor->Start(); >> >> return EXIT_SUCCESS; >> } >> >> 2) created the file CMakeLists.txt into the same directory above with the >> text: >> >> cmake_minimum_required(VERSION 2.8) >> project(Cone) >> set(VTK_DIR $HOME/build-VTK) >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> add_executable(Cone Cone.cxx) >> if(VTK_LIBRARIES) >> target_link_libraries(Cone ${VTK_LIBRARIES}) >> else() >> target_link_libraries(Cone vtkHybrid vtkWidgets) >> endif() >> >> 3) typed the command "ccmake ." into the same directory above, pressed >> the C button and the G button >> >> 4) typed the command "make" into the same directory above, receiving the >> error explained below: >> >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:19:27: >> error: vtkConeSource.h: No such file or directory >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:20:31: >> error: vtkPolyDataMapper.h: No such file or directory >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:21:29: >> error: vtkRenderWindow.h: No such file or directory >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:22:23: >> error: vtkCamera.h: No such file or directory >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:23:22: >> error: vtkActor.h: No such file or directory >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:24:25: >> error: vtkRenderer.h: No such file or directory >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx: >> In function ?int main()?: >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >> error: ?vtkConeSource? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >> error: ?cone? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >> error: ?vtkConeSource? is not a class or namespace >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >> error: ?vtkPolyDataMapper? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >> error: ?coneMapper? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >> error: ?vtkPolyDataMapper? is not a class or namespace >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >> error: ?vtkActor? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >> error: ?coneActor? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >> error: ?vtkActor? is not a class or namespace >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >> error: ?vtkRenderer? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >> error: ?ren1? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >> error: ?vtkRenderer? is not a class or namespace >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >> error: ?vtkRenderWindow? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >> error: ?renWin? was not declared in this scope >> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >> error: ?vtkRenderWindow? is not a class or namespace >> make[2]: *** [CMakeFiles/Cone.dir/Cone.cxx.o] Error 1 >> make[1]: *** [CMakeFiles/Cone.dir/all] Error 2 >> make: *** [all] Error 2 >> >> I have really no idea about the solution of this problem. >> Sorry for my incompetence! >> I'm looking forward to hear you. >> >> Thanks, >> Paolo Grossi. >> >> _______________________________________________ >> 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 Fri Jul 17 08:40:53 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 17 Jul 2015 08:40:53 -0400 Subject: [vtkusers] Can't generate executable file from Cone.cxx example In-Reply-To: References: Message-ID: Hmm, I would try to remove the line set(VTK_DIR $HOME/build-VTK) and set that manually though ccmake and see if that works. Cory On Fri, Jul 17, 2015 at 8:11 AM, Paolo Grossi wrote: > Thanks Cory for your quick answer. > I didn't receive an error during the configuration with ccmake. > I tried to build the example outside the main directory and to correct the > CMakeLists.txt, but the result is always the same. > > Regards, > Paolo Grossi. > > On 17 July 2015 at 13:01, Cory Quammen wrote: > >> Paolo, >> >> Did you get an error when configuring with ccmake? It looks like the VTK >> include directories are not being set properly. >> >> I would also recommend putting the example code and CMakeLists.txt file >> in a directory outside your VTK build directory. I'm not sure that this is >> causing the problem, but it is good practice to build dependent projects >> outside the VTK build directory. >> >> Also, in your CMakeLists.txt file, I think you can access your HOME >> environment variable with >> >> $ENV{HOME} >> >> not >> >> $HOME >> >> Thanks, >> Cory >> >> On Fri, Jul 17, 2015 at 6:56 AM, Paolo Grossi wrote: >> >>> Greetings to the whole community of VTK, >>> I'm a newbie user! >>> >>> After the installation of VTK on my PC (Ubuntu 14.04.2), I was trying to >>> run the example linked here: >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone >>> During the installation I selected the "BUILD EXAMPLE" option. >>> I also unselected the "BUILD SHARED LIBS" option, because I can't >>> proceed with the installation if I had selected it. >>> >>> My steps were: >>> 1) created the file Cone.cxx into the directory >>> "$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CmakeFiles/Cone.dir" with the >>> text: >>> >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> >>> int main(int, char *[]) >>> { >>> //Create a cone >>> vtkSmartPointer coneSource = >>> vtkSmartPointer::New(); >>> coneSource->Update(); >>> >>> //Create a mapper and actor >>> vtkSmartPointer mapper = >>> vtkSmartPointer::New(); >>> mapper->SetInputConnection(coneSource->GetOutputPort()); >>> >>> vtkSmartPointer actor = vtkSmartPointer::New(); >>> actor->SetMapper(mapper); >>> >>> //Create a renderer, render window, and interactor >>> vtkSmartPointer renderer = >>> vtkSmartPointer::New(); >>> vtkSmartPointer renderWindow = >>> vtkSmartPointer::New(); >>> renderWindow->AddRenderer(renderer); >>> vtkSmartPointer renderWindowInteractor = >>> vtkSmartPointer::New(); >>> renderWindowInteractor->SetRenderWindow(renderWindow); >>> >>> //Add the actors to the scene >>> renderer->AddActor(actor); >>> renderer->SetBackground(.3, .2, .1); // Background color dark red >>> >>> //Render and interact >>> renderWindow->Render(); >>> renderWindowInteractor->Start(); >>> >>> return EXIT_SUCCESS; >>> } >>> >>> 2) created the file CMakeLists.txt into the same directory above with >>> the text: >>> >>> cmake_minimum_required(VERSION 2.8) >>> project(Cone) >>> set(VTK_DIR $HOME/build-VTK) >>> find_package(VTK REQUIRED) >>> include(${VTK_USE_FILE}) >>> add_executable(Cone Cone.cxx) >>> if(VTK_LIBRARIES) >>> target_link_libraries(Cone ${VTK_LIBRARIES}) >>> else() >>> target_link_libraries(Cone vtkHybrid vtkWidgets) >>> endif() >>> >>> 3) typed the command "ccmake ." into the same directory above, pressed >>> the C button and the G button >>> >>> 4) typed the command "make" into the same directory above, receiving the >>> error explained below: >>> >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:19:27: >>> error: vtkConeSource.h: No such file or directory >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:20:31: >>> error: vtkPolyDataMapper.h: No such file or directory >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:21:29: >>> error: vtkRenderWindow.h: No such file or directory >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:22:23: >>> error: vtkCamera.h: No such file or directory >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:23:22: >>> error: vtkActor.h: No such file or directory >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:24:25: >>> error: vtkRenderer.h: No such file or directory >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx: >>> In function ?int main()?: >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >>> error: ?vtkConeSource? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >>> error: ?cone? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >>> error: ?vtkConeSource? is not a class or namespace >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >>> error: ?vtkPolyDataMapper? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >>> error: ?coneMapper? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >>> error: ?vtkPolyDataMapper? is not a class or namespace >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >>> error: ?vtkActor? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >>> error: ?coneActor? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >>> error: ?vtkActor? is not a class or namespace >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >>> error: ?vtkRenderer? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >>> error: ?ren1? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >>> error: ?vtkRenderer? is not a class or namespace >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >>> error: ?vtkRenderWindow? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >>> error: ?renWin? was not declared in this scope >>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >>> error: ?vtkRenderWindow? is not a class or namespace >>> make[2]: *** [CMakeFiles/Cone.dir/Cone.cxx.o] Error 1 >>> make[1]: *** [CMakeFiles/Cone.dir/all] Error 2 >>> make: *** [all] Error 2 >>> >>> I have really no idea about the solution of this problem. >>> Sorry for my incompetence! >>> I'm looking forward to hear you. >>> >>> Thanks, >>> Paolo Grossi. >>> >>> _______________________________________________ >>> 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 dave.demarle at kitware.com Fri Jul 17 08:52:02 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 17 Jul 2015 08:52:02 -0400 Subject: [vtkusers] Intel Developer Forum, software-defined visualization, San Francisco August 18-20 Message-ID: Greetings lists, The vis and rendering folks at Intel will be showing off the things they've been working on and are bringing to VTK, ParaView and the rest. See the attached flyer for registration promo-codes if you plan to attend the conference. Hope to see you there. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IDF_wPromoCodes.pdf Type: application/pdf Size: 71463 bytes Desc: not available URL: From smoldino at gmail.com Fri Jul 17 09:25:59 2015 From: smoldino at gmail.com (Paolo Grossi) Date: Fri, 17 Jul 2015 14:25:59 +0100 Subject: [vtkusers] Can't generate executable file from Cone.cxx example In-Reply-To: References: Message-ID: Thanks Cory. Unfortunately, even this solution didn't work. Always the same error as the first message. Regards, Paolo Grossi. On 17 July 2015 at 13:40, Cory Quammen wrote: > Hmm, I would try to remove the line > > set(VTK_DIR $HOME/build-VTK) > > and set that manually though ccmake and see if that works. > > Cory > > On Fri, Jul 17, 2015 at 8:11 AM, Paolo Grossi wrote: > >> Thanks Cory for your quick answer. >> I didn't receive an error during the configuration with ccmake. >> I tried to build the example outside the main directory and to correct >> the CMakeLists.txt, but the result is always the same. >> >> Regards, >> Paolo Grossi. >> >> On 17 July 2015 at 13:01, Cory Quammen wrote: >> >>> Paolo, >>> >>> Did you get an error when configuring with ccmake? It looks like the VTK >>> include directories are not being set properly. >>> >>> I would also recommend putting the example code and CMakeLists.txt file >>> in a directory outside your VTK build directory. I'm not sure that this is >>> causing the problem, but it is good practice to build dependent projects >>> outside the VTK build directory. >>> >>> Also, in your CMakeLists.txt file, I think you can access your HOME >>> environment variable with >>> >>> $ENV{HOME} >>> >>> not >>> >>> $HOME >>> >>> Thanks, >>> Cory >>> >>> On Fri, Jul 17, 2015 at 6:56 AM, Paolo Grossi >>> wrote: >>> >>>> Greetings to the whole community of VTK, >>>> I'm a newbie user! >>>> >>>> After the installation of VTK on my PC (Ubuntu 14.04.2), I was trying >>>> to run the example linked here: >>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone >>>> During the installation I selected the "BUILD EXAMPLE" option. >>>> I also unselected the "BUILD SHARED LIBS" option, because I can't >>>> proceed with the installation if I had selected it. >>>> >>>> My steps were: >>>> 1) created the file Cone.cxx into the directory >>>> "$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CmakeFiles/Cone.dir" with the >>>> text: >>>> >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> >>>> int main(int, char *[]) >>>> { >>>> //Create a cone >>>> vtkSmartPointer coneSource = >>>> vtkSmartPointer::New(); >>>> coneSource->Update(); >>>> >>>> //Create a mapper and actor >>>> vtkSmartPointer mapper = >>>> vtkSmartPointer::New(); >>>> mapper->SetInputConnection(coneSource->GetOutputPort()); >>>> >>>> vtkSmartPointer actor = vtkSmartPointer::New(); >>>> actor->SetMapper(mapper); >>>> >>>> //Create a renderer, render window, and interactor >>>> vtkSmartPointer renderer = >>>> vtkSmartPointer::New(); >>>> vtkSmartPointer renderWindow = >>>> vtkSmartPointer::New(); >>>> renderWindow->AddRenderer(renderer); >>>> vtkSmartPointer renderWindowInteractor = >>>> vtkSmartPointer::New(); >>>> renderWindowInteractor->SetRenderWindow(renderWindow); >>>> >>>> //Add the actors to the scene >>>> renderer->AddActor(actor); >>>> renderer->SetBackground(.3, .2, .1); // Background color dark red >>>> >>>> //Render and interact >>>> renderWindow->Render(); >>>> renderWindowInteractor->Start(); >>>> >>>> return EXIT_SUCCESS; >>>> } >>>> >>>> 2) created the file CMakeLists.txt into the same directory above with >>>> the text: >>>> >>>> cmake_minimum_required(VERSION 2.8) >>>> project(Cone) >>>> set(VTK_DIR $HOME/build-VTK) >>>> find_package(VTK REQUIRED) >>>> include(${VTK_USE_FILE}) >>>> add_executable(Cone Cone.cxx) >>>> if(VTK_LIBRARIES) >>>> target_link_libraries(Cone ${VTK_LIBRARIES}) >>>> else() >>>> target_link_libraries(Cone vtkHybrid vtkWidgets) >>>> endif() >>>> >>>> 3) typed the command "ccmake ." into the same directory above, pressed >>>> the C button and the G button >>>> >>>> 4) typed the command "make" into the same directory above, receiving >>>> the error explained below: >>>> >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:19:27: >>>> error: vtkConeSource.h: No such file or directory >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:20:31: >>>> error: vtkPolyDataMapper.h: No such file or directory >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:21:29: >>>> error: vtkRenderWindow.h: No such file or directory >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:22:23: >>>> error: vtkCamera.h: No such file or directory >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:23:22: >>>> error: vtkActor.h: No such file or directory >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:24:25: >>>> error: vtkRenderer.h: No such file or directory >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx: >>>> In function ?int main()?: >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >>>> error: ?vtkConeSource? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >>>> error: ?cone? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: >>>> error: ?vtkConeSource? is not a class or namespace >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >>>> error: ?vtkPolyDataMapper? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >>>> error: ?coneMapper? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: >>>> error: ?vtkPolyDataMapper? is not a class or namespace >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >>>> error: ?vtkActor? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >>>> error: ?coneActor? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: >>>> error: ?vtkActor? is not a class or namespace >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >>>> error: ?vtkRenderer? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >>>> error: ?ren1? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: >>>> error: ?vtkRenderer? is not a class or namespace >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >>>> error: ?vtkRenderWindow? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >>>> error: ?renWin? was not declared in this scope >>>> $HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: >>>> error: ?vtkRenderWindow? is not a class or namespace >>>> make[2]: *** [CMakeFiles/Cone.dir/Cone.cxx.o] Error 1 >>>> make[1]: *** [CMakeFiles/Cone.dir/all] Error 2 >>>> make: *** [all] Error 2 >>>> >>>> I have really no idea about the solution of this problem. >>>> Sorry for my incompetence! >>>> I'm looking forward to hear you. >>>> >>>> Thanks, >>>> Paolo Grossi. >>>> >>>> _______________________________________________ >>>> 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 aashish.chaudhary at kitware.com Fri Jul 17 10:22:14 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 17 Jul 2015 10:22:14 -0400 Subject: [vtkusers] [Paraview] GPU volume rendering failure on Intel HD XXXX/Iris, Windows and recent drivers In-Reply-To: References: Message-ID: Dear Simon, On Fri, Jul 17, 2015 at 4:43 AM, Simon ESNEAULT wrote: > Hi All, > > We're experiencing GPU volume rendering failure on a lot (maybe all ?) > Intel HD windows system with up to date drivers. > > This is reproducible in Paraview or with the GPURenderDemo example from > VTK, just load a volume and try to render the volume... Here is a result > image from paraview on a Dell Latitude E7450 (Intel HD 5500 inside), with > GPU rendering [1] and the same volume with CPU VR rendering [2]. > Interestingly, the volume rendering used to work with drivers older or > equal to the version 10.18.10.3496 [3]. As a work around, we ask our > customers to downgrade their driver version to this one, and they're > enjoying smooth GPU rendering. But this driver is quite old and does not > support recent chipset... > > I've built and tested the GPURenderDemo with the brand new OpenGL2 backend > on an affected machine and of course it does work out of the box > (congratulations for this amazing work !). > Great! > But our application is FDA/CE marked and we need to wait that this new > backend is completely ready for prime time. So for now, we have to stick > with VTK 6.1 ... > Most of the tests are passing for OpenGL2 ( https://open.cdash.org/index.php?project=VTK) on most of the dashboards (various configurations etc) but it is a moving target just like VTK itself is a moving target. I guess you are waiting for a VTK release that defaults to OpenGL2 as oppose to OpenGL? > > Anyone has any clue ? They're some warning that pop up from paraview > related to the extension "gl_version_1_2" that could not be loaded, not > sure if that could be related ? Following this thread [4] and the fix > proposed, I've tried to replace > /*****************/ > extensions->LoadExtension("GL_VERSION_1_2") > /*****************/ > by > /*****************/ > extensions->LoadExtension("GL_EXT_texture3D"); > extensions->LoadExtension( "GL_ARB_texture_non_power_of_two" ); > /*****************/ > in the vtkOpenGLGPUVolumeRayCastMapper.cxx, The warning disappears but > there is still no volume rendering (tested with GPURenderDemo). Maybe it > needs some others extensions ? > Yes, there is a patch and I can send it to you. I have to talk to folks here if we can fix the old mapper with those changes but as of now it is not in the plan. > > Should I fill a bug in paraview, vtk ? Are there any plan to maintain and > maybe fix this for the old backend ? > - Aashish > > Thanks, > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > [1] http://picpaste.com/pics/Paraview-4-3-1-GPU-VR_fail.1437122217.PNG > [2] http://picpaste.com/pics/Paraview-4-3-1-CPU-VR_win.1437122267.PNG > [3] https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23339 > [4] http://public.kitware.com/pipermail/vtkusers/2014-April/083584.html > > _______________________________________________ > 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Jul 17 11:34:42 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 17 Jul 2015 11:34:42 -0400 Subject: [vtkusers] How to convert (cast) "vtkExtractRectilinearGrid" data type to "vtkRectilinearGrid" type. In-Reply-To: References: Message-ID: Great, thanks for letting us know. Cory On Fri, Jul 17, 2015 at 11:04 AM, Manjunath K E wrote: > thank u Cory... that worked > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > > On Fri, Jul 17, 2015 at 4:15 PM, Cory Quammen > wrote: > >> Manjunath, >> >> vtkExtractRectilinearGrid is a vtkAlgorithm subclass - it read's data and >> produces data - while vtkRectilinearGrid is a subclass of vtkDataObject - >> it stores data. No conversion between the two is possible. >> >> What you need to do is call vtkExtractRectilinearGrid::GetOutput() to get >> the vtkRectilinearGrid. Make sure to call vtkExtractRectilinearGrid::Update() >> before you call GetOutput() so that the output data is up-to-date. >> >> Best regards, >> Cory >> >> On Fri, Jul 17, 2015 at 1:36 AM, Manjunath K E >> wrote: >> >>> Hi, >>> >>> I am Manjunath, working on ocean visualization. >>> I have generated certain volume of interest (VOI) using >>> vtkExtractRectilinearGrid type. Now I would like to render >>> vtkExtractRectilinearGrid as "vtkRectilinearGrid" type. >>> >>> I would like to know how to convert "vtkExtractRectilinearGrid" data >>> type to "vtkRectilinearGrid" type. >>> >>> 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 >>> >>> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Fri Jul 17 11:34:43 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 17 Jul 2015 17:34:43 +0200 Subject: [vtkusers] [Paraview] GPU volume rendering failure on Intel HD XXXX/Iris, Windows and recent drivers In-Reply-To: References: Message-ID: Dear Aashish, Thank you very much for you answer. Yes you are right, we are waiting for a new VTK release that defaults to the new OpenGL2 backend, for safety and because a change of VTK version requires a lot of extra work with our current framework... But the green dashboard indeed looks really promising, and we will probably make the move as soon as it's ready ! Meanwhile, I would be really glad if you could send me the patch that solves this issue with the old backend, or guide me through the needed modification to make it work. Thanks again Simon 2015-07-17 16:22 GMT+02:00 Aashish Chaudhary : > Dear Simon, > > On Fri, Jul 17, 2015 at 4:43 AM, Simon ESNEAULT > wrote: > >> Hi All, >> >> We're experiencing GPU volume rendering failure on a lot (maybe all ?) >> Intel HD windows system with up to date drivers. >> >> This is reproducible in Paraview or with the GPURenderDemo example from >> VTK, just load a volume and try to render the volume... Here is a result >> image from paraview on a Dell Latitude E7450 (Intel HD 5500 inside), with >> GPU rendering [1] and the same volume with CPU VR rendering [2]. >> Interestingly, the volume rendering used to work with drivers older or >> equal to the version 10.18.10.3496 [3]. As a work around, we ask our >> customers to downgrade their driver version to this one, and they're >> enjoying smooth GPU rendering. But this driver is quite old and does not >> support recent chipset... >> >> I've built and tested the GPURenderDemo with the brand new OpenGL2 >> backend on an affected machine and of course it does work out of the box >> (congratulations for this amazing work !). >> > Great! > > >> But our application is FDA/CE marked and we need to wait that this new >> backend is completely ready for prime time. So for now, we have to stick >> with VTK 6.1 ... >> > > Most of the tests are passing for OpenGL2 ( > https://open.cdash.org/index.php?project=VTK) on most of the dashboards > (various configurations etc) but it is a moving target just like VTK itself > is a moving target. I guess you are waiting for a VTK release that defaults > to OpenGL2 as oppose to OpenGL? > >> >> Anyone has any clue ? They're some warning that pop up from paraview >> related to the extension "gl_version_1_2" that could not be loaded, not >> sure if that could be related ? Following this thread [4] and the fix >> proposed, I've tried to replace >> /*****************/ >> extensions->LoadExtension("GL_VERSION_1_2") >> /*****************/ >> by >> /*****************/ >> extensions->LoadExtension("GL_EXT_texture3D"); >> extensions->LoadExtension( "GL_ARB_texture_non_power_of_two" ); >> /*****************/ >> in the vtkOpenGLGPUVolumeRayCastMapper.cxx, The warning disappears but >> there is still no volume rendering (tested with GPURenderDemo). Maybe it >> needs some others extensions ? >> > > Yes, there is a patch and I can send it to you. I have to talk to folks > here if we can fix the old mapper with those changes but as of now it is > not in the plan. > > >> >> Should I fill a bug in paraview, vtk ? Are there any plan to maintain and >> maybe fix this for the old backend ? >> > > - Aashish > > >> >> Thanks, >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> [1] http://picpaste.com/pics/Paraview-4-3-1-GPU-VR_fail.1437122217.PNG >> [2] http://picpaste.com/pics/Paraview-4-3-1-CPU-VR_win.1437122267.PNG >> [3] https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23339 >> [4] http://public.kitware.com/pipermail/vtkusers/2014-April/083584.html >> >> _______________________________________________ >> 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 >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivameline at gmail.com Fri Jul 17 12:17:30 2015 From: olivameline at gmail.com (Olivier Ameline) Date: Fri, 17 Jul 2015 09:17:30 -0700 (MST) Subject: [vtkusers] problem with stereo rendering In-Reply-To: References: <1437061105394-5732934.post@n5.nabble.com> <1437118136057-5732941.post@n5.nabble.com> Message-ID: <1437149850277-5732960.post@n5.nabble.com> Thanks a lot Cory, I've created my helix as a polydata and it now works well. Olivier. -- View this message in context: http://vtk.1045678.n5.nabble.com/problem-with-stereo-rendering-tp5732934p5732960.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Jul 17 12:35:07 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 17 Jul 2015 12:35:07 -0400 Subject: [vtkusers] problem with stereo rendering In-Reply-To: <1437149850277-5732960.post@n5.nabble.com> References: <1437061105394-5732934.post@n5.nabble.com> <1437118136057-5732941.post@n5.nabble.com> <1437149850277-5732960.post@n5.nabble.com> Message-ID: Great! Thanks for letting us know. Cory On Fri, Jul 17, 2015 at 12:17 PM, Olivier Ameline wrote: > Thanks a lot Cory, I've created my helix as a polydata and it now works > well. > > Olivier. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/problem-with-stereo-rendering-tp5732934p5732960.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 benoit.rosa at kuleuven.be Fri Jul 17 13:00:26 2015 From: benoit.rosa at kuleuven.be (Benoit Rosa) Date: Fri, 17 Jul 2015 19:00:26 +0200 Subject: [vtkusers] Build error with 3d Connexion device Message-ID: <55A934AA.7000306@kuleuven.be> Hi all, I try to make a 3DConnexion space navigator work with VTK+Qt on Linux. I Basically followed the steps given here : http://www.vtk.org/Wiki/VTK/3DConnexion_Devices_Support (by the way, the link to the CMakeLists.txt file is wrong). I use VTK 6.2 (also tried with version 6.3) and Qt 5, on ubuntu 12.04 with cmake. I will make a long post (sorry) explaining all the different hassles that I had, because there are many. I tried to look a lot on the internet for possible resolution, but without much luck. Everything goes fine on the driver side, I can run examples and happily see the cube moving on the screen. Installation of the SDK goes well, and I can also run xapp without any problem. Hassle begins with the Cmake. I can run ccmake and turn on the VTK_USE_TDx to ON, but have no variable named VTK_TDX_INCLUDE_PATH or VTK_TDX_OBJECT_PATH. WHen I try to run directly cmake and define those variables, cmake fires a warning saying that they are not used by the project. Anyway, configuration goes through so let's try to build ... And here comes a lot of "Undefined reference to MagellanX" errors. I managed to go through those by editing Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/link.txt and adding -lxdrvlib to the linker dependencies, but this is getting nasty already ... But fixing the link, we can go further. Now at link of ../../lib/libvtkGUISupportQt-6.2.so, I get the following : CMakeFiles/vtkGUISupportQt.dir/QVTKApplication.cxx.o: In function `QVTKApplication::setDevice(vtkTDxDevice*)': [home]/VTK-6.2.0/GUISupport/Qt/QVTKApplication.cxx:58: undefined reference to `QVTKApplication::CreateDevice(vtkTDxDevice*)' This error is particularly weird, since CreateDevice is a signal defined in QVTKApplication.h, I don't really get why it appears. Moreover, the QObject::connect on line 28 of the same file connects SIGNAL(CreateDevice(vtkTDxDevice *) , so the undefined reference error should already fire at that moment ? If anybody has some clues for my problem, that would be great. I tried to hack in here and there, and I manage to get the thing finally compiling, but get then runtime errors about missing slot QVTKApplication::setDevice, so I guess I should compile correctly without hacking in before continuing. Thanks for your help ! Benoit -- Benoit Rosa, Postdoctoral researcher, PhD KU Leuven, Department of Mechanical Engineering, division PMA Celestijnenlaan 300, box 2420 3001 Leuven Email : benoit.rosa at kuleuven.be Phone : +32 16 37 79 00 -- From berk.geveci at kitware.com Fri Jul 17 14:38:58 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 17 Jul 2015 14:38:58 -0400 Subject: [vtkusers] Open Position Research Programmer Message-ID: Hi folks, This is from our friends at the UIUC Parallel Programming Laboratory: Now accepting applications for Visiting Research Programmer Close date: Monday, August 3, 2015 (extended) The primary functions of the position are to extend the OpenAtom software and to develop the Argo exascale operating system prototype. Working with the senior research programmer and research staff, the visiting research programmer will help improve Charm++ functionalities as necessary for these and other projects as well as write software for parallel supercomputers and clusters. See full description at: http://charm.cs.illinois.edu/career Best, -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Fri Jul 17 19:59:03 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 17 Jul 2015 19:59:03 -0400 Subject: [vtkusers] CFP: SC '15 Scientific Visualization Showcase - deadline near Message-ID: Hi folks, Just a reminder that the deadline for the Scientific Visualization Showcase is near. Best, -berk On Tue, May 26, 2015 at 8:18 AM, Berk Geveci wrote: > Hi folks, > > The Call for Participation for the SC '15 Scientific Visualization > Showcase is out. This is a great opportunity for the community to highlight > the wonderful visualization work going on. Please consider submitting an > entry (or more). > > http://sc15.supercomputing.org/program/scientific-visualization-showcase > > SC15?s Visualization and Data Analytics Showcase Program provides a forum > for the year's most instrumental movies in HPC. Six finalists will compete > for the Best Visualization Award, and each finalist will present his or her > movie during a dedicated session at SC15 in a 15-minute presentation. > Movies are judged based on how their movie illuminates science, by the > quality of the movie, and for innovations in the process used for creating > the movie. > > Best, > -berk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharmaatul11 at gmail.com Sat Jul 18 00:56:54 2015 From: sharmaatul11 at gmail.com (luta) Date: Fri, 17 Jul 2015 21:56:54 -0700 (MST) Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: References: <1437029880754-5732927.post@n5.nabble.com> Message-ID: <1437195414794-5732969.post@n5.nabble.com> Dear David, Thank you so much for your help. I followed your instructions and got some success in moving ahead. However, I am NOT able to get the 3D position of the markers. I get the values +00 or some random values when I apply the command "Command("3D:011")" . I was expecting it to be x,y,z coordinate value with the error value. Following is the current status of the code and the results. Our team and I really appreciate your kind help. #include #include #include #include #include #include #include #include #include "vtkNDITracker.h" #include #include "ndicapi.h" #include "vtkMatrix4x4.h" #include "vtkTrackerTool.h" using namespace std; class Starttracker_aks { vtkNDITracker* newtracker; int x; int tool; const char *filename; public: void asignvalues() { // setting up the tracker newtracker = vtkNDITracker::New(); tool=3; filename= "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700340Probe.rom"; string versionname; int serialname; newtracker->SetSerialDevice("COM5:"); newtracker->Probe(); // get the values from the tracker cout <<"GetSerialPort:\t "<< newtracker->GetSerialPort() << "\n"; cout <<"GetSerialDevice:\t "<< newtracker->GetSerialDevice() << "\n"; cout <<"GetBaudRate:\t "<< newtracker->GetBaudRate() << "\n"; // load tools newtracker->LoadVirtualSROM(tool,filename); // check status of the tracker int statust= newtracker->IsTracking() ; newtracker->Command("BEEP:1"); *// start tracking and activate the tool handles* *newtracker->StartTracking(); newtracker->Update(); cout <<"updaterate rate:\t "<< newtracker->GetInternalUpdateRate() << "\n"; // get the 3D positions of the tool for(int k=1;k<3;k++) { cout << "3D coordinates:\t" << newtracker->Command("3D:011")<< "\n"; }* // get world calibration matrix: cout << "GetWorldCalibrationMatrix:\t"<< "\n"; vtkMatrix4x4* matrixw=newtracker->GetWorldCalibrationMatrix(); for(int i =0 ; i<4;i++) { for(int j =0 ; j<4;j++){ cout << matrixw->GetElement(i,j) << "\t" ; } cout << "\n"; } // Check the current status of the tracke and tool versionname=GetVersion(); vtkTrackerTool* gettool; gettool=newtracker->GetTool(tool); cout <<"Is the tracker Missing:\t "<< gettool->IsMissing() << "\n"; cout <<"gettool variable:\t "<< gettool << "\n"; cout <<"Version:\t "<< newtracker->GetVersion() << "\n"; statust= newtracker->IsTracking() ; cout <<"current running Status:\t "<< statust << "\n"; double updaterate= newtracker->GetInternalUpdateRate(); cout <<"current updaterate Status:\t "<< updaterate << "\n"; cout <<"ECHO:\t "<< newtracker->Command("ECHO:Tracker Running") << "\n"; } }; int main(int, char *[]) { // ndicapi* yourdevice; Starttracker_aks statr; statr.asignvalues(); return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/SynchroGrab4D-vtk-Polaris-tracking-tp4600704p5732969.html Sent from the VTK - Users mailing list archive at Nabble.com. From quentan at gmail.com Sat Jul 18 06:08:34 2015 From: quentan at gmail.com (Quentan Qi) Date: Sat, 18 Jul 2015 11:08:34 +0100 Subject: [vtkusers] 3D numpy array to vtkDataSet Message-ID: <6276B1E8-FC45-4D0B-BF81-4CD0E7C84BFF@gmail.com> Hi there, I am going to read a set of discrete 3D points (float value, not int value) and show both the points and the fitting surface via VTK?s implicit functions, say vtkImplicitVolume or vtkImplicitDataSet. It works fine of the numpy arrary to vtkImageData conversion in the following code, but is out of my mind how to convert it to vtkDataSet, which is my requirement. ```Python # Convert numpy array to VTK array (vtkFloatArray) vtk_data_array = numpy_support.numpy_to_vtk( num_array=ndarray.transpose(2, 1, 0).ravel(), # ndarray contains the fitting result from the points. It is a 3D array deep=True, array_type=vtk.VTK_FLOAT) # Convert the VTK array to vtkImageData img_vtk = vtk.vtkImageData() img_vtk.SetDimensions(ndarray.shape) img_vtk.SetSpacing(spacing[::-1]) img_vtk.GetPointData().SetScalars(vtk_data_array) # ? implicit_volume = vtk.vtkImplicitVolume() # I want a vtkImplicitDataSet, whose input is a vtkDataSet implicit_volume.SetVolume(img_vtk) ``` Because vtkImageData scales all points to positive integer values so that the rendering result mismatches the original points, I deem vtkDataSet or its subclass can do it. Anybody knows how to convert? Cheers, Quentan -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Jul 18 08:57:45 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 18 Jul 2015 06:57:45 -0600 Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: <1437195414794-5732969.post@n5.nabble.com> References: <1437029880754-5732927.post@n5.nabble.com> <1437195414794-5732969.post@n5.nabble.com> Message-ID: Hi Atul, Get the tool positions from the vtkTrackerTool objects. For example: for (int k = 0; k < 10000; k++) { vtkTransform *toolTransform = gettool->GetTransform(); double position[3] = { 0.0, 0.0, 0.0 }; toolTransform->TransformPoint(position, position); if (gettool->IsMissing()) { cout << "MISSING" << endl; } else { cout << position[0] << " " << position[1] << " " << position[2] << endl; } ::Sleep(200); // wait for 200 milliseconds before trying again } On Fri, Jul 17, 2015 at 10:56 PM, luta wrote: > Dear David, > Thank you so much for your help. I followed your instructions and got some > success in moving ahead. However, I am NOT able to get the 3D position of > the markers. I get the values +00 or some random values when I apply the > command "Command("3D:011")" . I was expecting it to be x,y,z coordinate > value with the error value. Following is the current status of the code and > the results. Our team and I really appreciate your kind help. > > #include > #include > #include > #include > #include > #include > #include > #include > #include "vtkNDITracker.h" > #include > #include "ndicapi.h" > #include "vtkMatrix4x4.h" > #include "vtkTrackerTool.h" > using namespace std; > > class Starttracker_aks > { > vtkNDITracker* newtracker; > int x; > int tool; > const char *filename; > public: > void asignvalues() > { // setting up the tracker > newtracker > = vtkNDITracker::New(); > tool=3; > filename= > > "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700340Probe.rom"; > string versionname; > int serialname; > newtracker->SetSerialDevice("COM5:"); > newtracker->Probe(); > // get the values from the tracker > cout <<"GetSerialPort:\t "<< newtracker->GetSerialPort() > << "\n"; > cout <<"GetSerialDevice:\t "<< > newtracker->GetSerialDevice() << "\n"; > cout <<"GetBaudRate:\t "<< newtracker->GetBaudRate() << > "\n"; > // load tools > newtracker->LoadVirtualSROM(tool,filename); > // check status of the tracker > int statust= newtracker->IsTracking() ; > newtracker->Command("BEEP:1"); > *// start tracking and activate the tool handles* > *newtracker->StartTracking(); > newtracker->Update(); > cout <<"updaterate rate:\t "<< > newtracker->GetInternalUpdateRate() << > "\n"; > // get the 3D positions of the tool > for(int k=1;k<3;k++) > { > cout << "3D coordinates:\t" << > newtracker->Command("3D:011")<< "\n"; > }* > // get world calibration matrix: > cout << "GetWorldCalibrationMatrix:\t"<< "\n"; > vtkMatrix4x4* > matrixw=newtracker->GetWorldCalibrationMatrix(); > for(int i =0 ; i<4;i++) { > for(int j =0 ; j<4;j++){ > cout << matrixw->GetElement(i,j) << "\t" ; > } > cout << "\n"; > } > // Check the current status of the tracke and tool > versionname=GetVersion(); > > vtkTrackerTool* gettool; > gettool=newtracker->GetTool(tool); > > cout <<"Is the tracker Missing:\t "<< gettool->IsMissing() > << "\n"; > cout <<"gettool variable:\t "<< gettool << "\n"; > cout <<"Version:\t "<< newtracker->GetVersion() << "\n"; > statust= newtracker->IsTracking() ; > cout <<"current running Status:\t "<< statust << "\n"; > double updaterate= newtracker->GetInternalUpdateRate(); > cout <<"current updaterate Status:\t "<< updaterate << > "\n"; > cout <<"ECHO:\t "<< newtracker->Command("ECHO:Tracker > Running") << "\n"; > } > }; > > int main(int, char *[]) > { // ndicapi* yourdevice; > Starttracker_aks statr; > statr.asignvalues(); > return EXIT_SUCCESS; > } > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/SynchroGrab4D-vtk-Polaris-tracking-tp4600704p5732969.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 cory.quammen at kitware.com Sat Jul 18 10:09:06 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Sat, 18 Jul 2015 10:09:06 -0400 Subject: [vtkusers] 3D numpy array to vtkDataSet In-Reply-To: <6276B1E8-FC45-4D0B-BF81-4CD0E7C84BFF@gmail.com> References: <6276B1E8-FC45-4D0B-BF81-4CD0E7C84BFF@gmail.com> Message-ID: Quentan, vtkImageData is in fact a subclass of vtkDataSet, so no conversion is needed. You said, "vtkImageData scales all points to positive integer values", but this should not be the case. Something strange is going on. Could you expand the code above into a complete example that can be run through vtkpython? That will make it easier to take a look. In particular, please add a part that shows the vtkImageData are being scaled to positive integers. It's fine if you fill the array with random values. Thanks, Cory On Sat, Jul 18, 2015 at 6:08 AM, Quentan Qi wrote: > Hi there, > > I am going to read a set of discrete 3D points (float value, not int > value) and show both the points and the fitting surface via VTK?s implicit > functions, say vtkImplicitVolume or vtkImplicitDataSet. > > It works fine of the numpy arrary to vtkImageData conversion in the > following code, but is out of my mind how to convert it to vtkDataSet, > which is my requirement. > > ```Python > # Convert numpy array to VTK array (vtkFloatArray) > vtk_data_array = numpy_support.numpy_to_vtk( > num_array=ndarray.transpose(2, 1, 0).ravel(), # ndarray contains > the fitting result from the points. It is a 3D array > deep=True, > array_type=vtk.VTK_FLOAT) > > # Convert the VTK array to vtkImageData > img_vtk = vtk.vtkImageData() > img_vtk.SetDimensions(ndarray.shape) > img_vtk.SetSpacing(spacing[::-1]) > img_vtk.GetPointData().SetScalars(vtk_data_array) > > # ? > implicit_volume = vtk.vtkImplicitVolume() # I want a > vtkImplicitDataSet, whose input is a vtkDataSet > implicit_volume.SetVolume(img_vtk) > ``` > > Because vtkImageData scales all points to positive integer values so that > the rendering result mismatches the original points, I deem vtkDataSet or > its subclass can do it. Anybody knows how to convert? > > Cheers, > Quentan > > _______________________________________________ > 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 berk.geveci at kitware.com Sat Jul 18 20:17:25 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Sat, 18 Jul 2015 20:17:25 -0400 Subject: [vtkusers] [Paraview] Combining vtk and paraview python scripts In-Reply-To: <55A56672.3040204@nasa.gov> References: <55A55C2C.2030107@nasa.gov> <55A56672.3040204@nasa.gov> Message-ID: To elaborate on what Andy said, you can stick your entire VTK script in side the programmable source. Which you can use in batch mode as well. If you want to keep your VTK script as a reusable code, I recommend making it a module that you import from the programmable source. Best, -berk On Tue, Jul 14, 2015 at 3:43 PM, Jeff Becker wrote: > On 07/14/2015 12:20 PM, Andy Bauer wrote: > > ParaView's Python Programmable Filter and Python Programmable Source use > VTK Python wrapping to do the work while making it available in Paraview. > Check out http://www.paraview.org/Wiki/Python_Programmable_Filter. > > > Thanks. That's pretty neat, but what I'd really like is a standalone > script I can run in batch mode (no interaction) to generate one png file > per timestep for all the timesteps in the data set. Essentially I'd like a > way to construct a pipeline between the vtk.vtkImageImport() object and > the ParaView renderView1. > > -jeff > > > On Tue, Jul 14, 2015 at 2:59 PM, Jeff Becker > wrote: > >> Hi. >> >> As a proof of concept, I have a vtk script that reads some binary data, >> and produces a vti file. I then have a second script that I generated using >> ParaView's tracing facility while viewing the data. Now I'd like to combine >> them, so as to eliminate the intermediate file, i.e., go from binary data >> directly to rendering. To be specific, my vtk script ends like this: >> >> steinbmag = steinbmag.reshape(nx,ny,nz).T >> >> vtkImporter = vtk.vtkImageImport() >> vtkImporter.CopyImportVoidPointer(steinbmag, steinbmag.nbytes) >> >> vtkImporter.SetDataScalarTypeToFloat() >> vtkImporter.SetNumberOfScalarComponents(1) >> vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) >> vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) >> vtkImporter.SetScalarArrayName('B field magnitude') >> >> writer=vtk.vtkXMLImageDataWriter() >> writer.SetFileName(out_fname) >> writer.SetInputConnection(vtkImporter.GetOutputPort()) >> writer.Write() >> >> and the ParaView script starts like this: >> >> from paraview.simple import * >> >> paraview.simple._DisableFirstRenderCameraReset() >> >> filepfx = '/nobackup/jcbecker/steinBmag_0' >> infile = filepfx+'.vti' >> # create a new 'XML Image Data Reader' >> steinBmag_ = XMLImageDataReader(FileName=infile) >> steinBmag_.CellArrayStatus = [] >> steinBmag_.PointArrayStatus = ['B field magnitude'] >> >> # get animation scene >> animationScene1 = GetAnimationScene() >> >> # update animation scene based on data timesteps >> animationScene1.UpdateAnimationUsingDataTimeSteps() >> >> # get active view >> renderView1 = GetActiveViewOrCreate('RenderView') >> # uncomment following to set a specific view size >> renderView1.ViewSize = [1090, 761] >> >> I'm looking at the VTK examples and pvpython documentation, but any help >> is appreciated. >> >> Thanks. >> >> -jeff >> _______________________________________________ >> 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 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 quentan at gmail.com Sun Jul 19 13:40:42 2015 From: quentan at gmail.com (Quentan Qi) Date: Sun, 19 Jul 2015 18:40:42 +0100 Subject: [vtkusers] 3D numpy array to vtkDataSet In-Reply-To: References: <6276B1E8-FC45-4D0B-BF81-4CD0E7C84BFF@gmail.com> Message-ID: Dear Cory, I may fail to explain my problem, so I made an example to show what I want to express, as you suggested. https://github.com/quentan/Test_ImageData This example generates a quadric with its implicit form: F(x,y,z) = a0*x^2 + a1*y^2 + a2*z^2 + a3*x*y + a4*y*z + a5*x*z + a6*x + a7*y + a8*z + a9 The left viewport renders the quadric with vtkQuadric, which works perfectly. The right viewport renders the same quadric with a meshgrid generated with numpy. The meshgrid is converted to vtkFloatArray then to vtkImageData. Its shape is right, but locates at wrong position, which seems like it was scaled to some positive values. Note the small perpendicular coordinate lines in the corner. I guess the issue raises around line 120 - 123. If any other wrongs happen, point it for me, please. Cheers, Quentan > On 18 Jul 2015, at 15:09, Cory Quammen wrote: > > Quentan, > > vtkImageData is in fact a subclass of vtkDataSet, so no conversion is needed. You said, "vtkImageData scales all points to positive integer values", but this should not be the case. Something strange is going on. > > Could you expand the code above into a complete example that can be run through vtkpython? That will make it easier to take a look. In particular, please add a part that shows the vtkImageData are being scaled to positive integers. It's fine if you fill the array with random values. > > Thanks, > Cory > > > On Sat, Jul 18, 2015 at 6:08 AM, Quentan Qi > wrote: > Hi there, > > I am going to read a set of discrete 3D points (float value, not int value) and show both the points and the fitting surface via VTK?s implicit functions, say vtkImplicitVolume or vtkImplicitDataSet. > > It works fine of the numpy arrary to vtkImageData conversion in the following code, but is out of my mind how to convert it to vtkDataSet, which is my requirement. > > ```Python > # Convert numpy array to VTK array (vtkFloatArray) > vtk_data_array = numpy_support.numpy_to_vtk( > num_array=ndarray.transpose(2, 1, 0).ravel(), # ndarray contains the fitting result from the points. It is a 3D array > deep=True, > array_type=vtk.VTK_FLOAT) > > # Convert the VTK array to vtkImageData > img_vtk = vtk.vtkImageData() > img_vtk.SetDimensions(ndarray.shape) > img_vtk.SetSpacing(spacing[::-1]) > img_vtk.GetPointData().SetScalars(vtk_data_array) > > # ? > implicit_volume = vtk.vtkImplicitVolume() # I want a vtkImplicitDataSet, whose input is a vtkDataSet > implicit_volume.SetVolume(img_vtk) > ``` > > Because vtkImageData scales all points to positive integer values so that the rendering result mismatches the original points, I deem vtkDataSet or its subclass can do it. Anybody knows how to convert? > > Cheers, > Quentan > > _______________________________________________ > 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 Mon Jul 20 00:14:40 2015 From: sharmaatul11 at gmail.com (luta) Date: Sun, 19 Jul 2015 21:14:40 -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: <1437365680327-5732975.post@n5.nabble.com> Dear David, Thanks a lot for your kind help. I am able to find the co-ordinates and orientation of the tool. I am posting my complete code in this thread in case anyone need it. Thanks again for your help Regards, Atul #include "vtkNDITracker.h" #include #include "vtkTrackerTool.h" #include "vtkTransform.h" using namespace std; class Starttracker_aks { vtkNDITracker* newtracker; int tool; const char *filename; public: void asignvalues() { // setting up the tracker newtracker = vtkNDITracker::New(); // instantiate a new tracker tool=3; // 0,1,2 if active tools.. // 3,4,5.. are for passive tools newtracker->SetSerialDevice("COM5:"); // COM port identified at the device manager // load tools filename= "C:\\ATUL_WORKS\\SOFTWARES\\vtkptog\\Cone\\Cone_Aks\\ToolKit\\8700340Probe.rom"; // srom file for the probe tool newtracker->LoadVirtualSROM(tool,filename); // check status of the tracker int statust= newtracker->IsTracking() ; // tracker is not running now. // beep once newtracker->Command("BEEP:1"); // start tracking and activate the tool handles newtracker->StartTracking(); // tracker starts . newtracker->Update(); // tool activation . vtkTrackerTool* gettool; gettool=newtracker->GetTool(tool); // get the tool with it's tool number for (int k = 0; k <20; k++) { vtkTransform *toolTransform = gettool->GetTransform(); // get the transform of the tool with respect to the tracker reference frame // output the transform value (3D position and orientation) double position[3] = { 0.0, 0.0, 0.0 }; toolTransform->TransformPoint(position, position); // Get position double position1[3]; toolTransform->GetPosition(position1);// Get position double orientation[3]; toolTransform->GetOrientation(orientation);// Get orientation if (gettool->IsOutOfView())//(gettool->IsMissing()) // check if the tool is out of view { cout << "MISSING" << endl; } else { cout << "Position:\t"<< position[0] << "\t" << position[1] << "\t" << position[2] << endl; // position output cout << "Position:\t" << position1[0] << "\t" << position1[1] << "\t" << position1[2] <<"\n"; // position output cout << "Orientation:\t" << orientation[0] << "\t" << orientation[1] << "\t" << orientation[2] <<"\n"; // orientation output } ::Sleep(200); // wait for 200 milliseconds before trying again newtracker->Update();// find the new location } statust= newtracker->IsTracking() ;// check if the tracker still running cout <<"current running Status:\t "<< statust << "\n"; } }; int main(int, char *[]) { Starttracker_aks statr; statr.asignvalues(); return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/SynchroGrab4D-vtk-Polaris-tracking-tp4600704p5732975.html Sent from the VTK - Users mailing list archive at Nabble.com. From simon.esneault at gmail.com Mon Jul 20 05:02:27 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 20 Jul 2015 11:02:27 +0200 Subject: [vtkusers] [vtk-developers] [Paraview] GPU volume rendering failure on Intel HD XXXX/Iris, Windows and recent drivers In-Reply-To: References: Message-ID: Hi Aashish, Thanks for the patchs. However, I've tried them but without success, the GPU rendering won't show up on an Intel HD chipset using the GPURenderDemo (the same exe/dll works fine on a machine with an NVidia/Ati card). The warning disappeared though ... The proposed patchs seems to affect only the TextureMapper 3D, shouldn't there be modification to the vtkOpenGLGPUVolumeRayCastMapper::LoadExtensions method as well? I've tried to uncomment all added lines in the GL_VERSION_1_2_DEPRECATED part of vtkgl.cxx, build correctly everything, and on the problematic machine the checkIfNull() fail for all the lines, the program prints out : Function pointer vtkgl::ColorTable is invalid Function pointer vtkgl::.. is invalid For every one of them. Also the vtkgl.cxx file is generated by the vtkParseOGLExt exe, shouldn't there be modification in the headers glext.h/glxext.h/wglext.h instead ? Maybe this is causing some troubles elsewhere... If you have some other magical trick to solve this, I would be glad to hear about it! Also I can provide more informations if you want Thank You Simon 2015-07-17 17:48 GMT+02:00 Aashish Chaudhary : > Hi Andras, > > Please find the patchs attached. If you run into issues let me know. I > should mention that apply these patches at your discretion as I have not > done enough testing to ensure the quality of the patches but the test > passed last time I applied them. > > > > On Fri, Jul 17, 2015 at 11:40 AM, Andras Lasso wrote: > >> Please share the patch publicly, we would need it for some of our >> projects, too. Thank you! >> >> >> >> Andras >> >> >> >> *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On >> Behalf Of *Simon ESNEAULT >> *Sent:* Friday, July 17, 2015 11:35 AM >> *To:* Aashish Chaudhary >> *Cc:* VTK Developers; vtkusers at vtk.org; ParaView list >> *Subject:* Re: [vtk-developers] [Paraview] GPU volume rendering failure >> on Intel HD XXXX/Iris, Windows and recent drivers >> >> >> >> Dear Aashish, >> >> >> >> Thank you very much for you answer. >> >> Yes you are right, we are waiting for a new VTK release that defaults to >> the new OpenGL2 backend, for safety and because a change of VTK version >> requires a lot of extra work with our current framework... But the green >> dashboard indeed looks really promising, and we will probably make the move >> as soon as it's ready ! >> >> Meanwhile, I would be really glad if you could send me the patch that >> solves this issue with the old backend, or guide me through the needed >> modification to make it work. >> >> Thanks again >> >> Simon >> >> >> >> 2015-07-17 16:22 GMT+02:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >> Dear Simon, >> >> >> >> On Fri, Jul 17, 2015 at 4:43 AM, Simon ESNEAULT >> wrote: >> >> Hi All, >> >> We're experiencing GPU volume rendering failure on a lot (maybe all ?) >> Intel HD windows system with up to date drivers. >> >> >> This is reproducible in Paraview or with the GPURenderDemo example from >> VTK, just load a volume and try to render the volume... Here is a result >> image from paraview on a Dell Latitude E7450 (Intel HD 5500 inside), with >> GPU rendering [1] and the same volume with CPU VR rendering [2]. >> Interestingly, the volume rendering used to work with drivers older or >> equal to the version 10.18.10.3496 [3]. As a work around, we ask our >> customers to downgrade their driver version to this one, and they're >> enjoying smooth GPU rendering. But this driver is quite old and does not >> support recent chipset... >> >> I've built and tested the GPURenderDemo with the brand new OpenGL2 >> backend on an affected machine and of course it does work out of the box >> (congratulations for this amazing work !). >> >> Great! >> >> >> >> But our application is FDA/CE marked and we need to wait that this new >> backend is completely ready for prime time. So for now, we have to stick >> with VTK 6.1 ... >> >> >> >> Most of the tests are passing for OpenGL2 ( >> https://open.cdash.org/index.php?project=VTK) on most of the dashboards >> (various configurations etc) but it is a moving target just like VTK itself >> is a moving target. I guess you are waiting for a VTK release that defaults >> to OpenGL2 as oppose to OpenGL? >> >> >> Anyone has any clue ? They're some warning that pop up from paraview >> related to the extension "gl_version_1_2" that could not be loaded, not >> sure if that could be related ? Following this thread [4] and the fix >> proposed, I've tried to replace >> >> /*****************/ >> >> extensions->LoadExtension("GL_VERSION_1_2") >> >> /*****************/ >> >> by >> >> /*****************/ >> >> extensions->LoadExtension("GL_EXT_texture3D"); >> extensions->LoadExtension( "GL_ARB_texture_non_power_of_two" ); >> >> /*****************/ >> >> in the vtkOpenGLGPUVolumeRayCastMapper.cxx, The warning disappears but >> there is still no volume rendering (tested with GPURenderDemo). Maybe it >> needs some others extensions ? >> >> >> >> Yes, there is a patch and I can send it to you. I have to talk to folks >> here if we can fix the old mapper with those changes but as of now it is >> not in the plan. >> >> >> >> >> Should I fill a bug in paraview, vtk ? Are there any plan to maintain and >> maybe fix this for the old backend ? >> >> >> >> - Aashish >> >> >> >> >> Thanks, >> -- >> >> ------------------------------------------------------------------ >> Simon Esneault >> >> Rennes, France >> ------------------------------------------------------------------ >> >> >> [1] http://picpaste.com/pics/Paraview-4-3-1-GPU-VR_fail.1437122217.PNG >> >> [2] http://picpaste.com/pics/Paraview-4-3-1-CPU-VR_win.1437122267.PNG >> >> [3] https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23339 >> [4] http://public.kitware.com/pipermail/vtkusers/2014-April/083584.html >> >> >> _______________________________________________ >> 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 >> >> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> >> >> >> >> >> -- >> >> ------------------------------------------------------------------ >> Simon Esneault >> >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From benoit.rosa at kuleuven.be Mon Jul 20 05:11:25 2015 From: benoit.rosa at kuleuven.be (Benoit Rosa) Date: Mon, 20 Jul 2015 11:11:25 +0200 Subject: [vtkusers] 3DConnexion, regression with VTK6 (was: Build error with 3d Connexion device) In-Reply-To: <55A934AA.7000306@kuleuven.be> References: <55A934AA.7000306@kuleuven.be> Message-ID: <55ACBB3D.7070003@kuleuven.be> Hi all, Following up on the previously reported problem, I just tried to build everything with VTK 5 (VTK 5.10.1 tarball source available on the VTK downloads page). The result is that it works perfectly. I checked again, and in VTK6 the cmake does not make use of the VTK_TDX_INCLUDE_PATH and VTK_TDX_OBJECT_PATH variables, and as such does not find the 3DConnexion library at link, even if it is inside the LD_LIBRARY_PATH. The problem is the same with the 6.1 and 6.2 tarballs from the website, as well as with a fresh checkout from the git repository. I always get a lot of "undefined reference to MagellanX" errors while building : http://pastebin.com/MstU9PbN It seems like a regression to me, since I can't build any VTK 6 version with TDx support. I had a look at the source files that VTK6 can't build with TDx support, and they are mostly similar to VTK5 implementations, so I don't think any problem comes from there. It really looks like there is a problem in the build process that has been introduced with VTK6. I will now forward the following of the discussion to the vtk-developers mailing list, I just posted it on the users list as a pointer, in case somebody encounters the same problem as I do. Best, Benoit On 17/07/15 19:00, Benoit Rosa wrote: > Hi all, > > I try to make a 3DConnexion space navigator work with VTK+Qt on Linux. > I Basically followed the steps given here : > http://www.vtk.org/Wiki/VTK/3DConnexion_Devices_Support (by the way, > the link to the CMakeLists.txt file is wrong). > > I use VTK 6.2 (also tried with version 6.3) and Qt 5, on ubuntu 12.04 > with cmake. > > I will make a long post (sorry) explaining all the different hassles > that I had, because there are many. I tried to look a lot on the > internet for possible resolution, but without much luck. > > Everything goes fine on the driver side, I can run examples and > happily see the cube moving on the screen. Installation of the SDK > goes well, and I can also run xapp without any problem. > > Hassle begins with the Cmake. I can run ccmake and turn on the > VTK_USE_TDx to ON, but have no variable named VTK_TDX_INCLUDE_PATH or > VTK_TDX_OBJECT_PATH. WHen I try to run directly cmake and define those > variables, cmake fires a warning saying that they are not used by the > project. > > Anyway, configuration goes through so let's try to build ... And here > comes a lot of "Undefined reference to MagellanX" errors. I managed to > go through those by editing > Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/link.txt and adding > -lxdrvlib to the linker dependencies, but this is getting nasty > already ... But fixing the link, we can go further. > > Now at link of ../../lib/libvtkGUISupportQt-6.2.so, I get the following : > > CMakeFiles/vtkGUISupportQt.dir/QVTKApplication.cxx.o: In function > `QVTKApplication::setDevice(vtkTDxDevice*)': > [home]/VTK-6.2.0/GUISupport/Qt/QVTKApplication.cxx:58: undefined > reference to `QVTKApplication::CreateDevice(vtkTDxDevice*)' > > This error is particularly weird, since CreateDevice is a signal > defined in QVTKApplication.h, I don't really get why it appears. > Moreover, the QObject::connect on line 28 of the same file connects > SIGNAL(CreateDevice(vtkTDxDevice *) , so the undefined reference error > should already fire at that moment ? > > If anybody has some clues for my problem, that would be great. I tried > to hack in here and there, and I manage to get the thing finally > compiling, but get then runtime errors about missing slot > QVTKApplication::setDevice, so I guess I should compile correctly > without hacking in before continuing. > > Thanks for your help ! > Benoit > -- Benoit Rosa, Postdoctoral researcher, PhD KU Leuven, Department of Mechanical Engineering, division PMA Celestijnenlaan 300, box 2420 3001 Leuven Email :benoit.rosa at kuleuven.be Phone : +32 16 37 79 00 -- From sur.chiranjib at gmail.com Mon Jul 20 05:48:05 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Mon, 20 Jul 2015 15:18:05 +0530 Subject: [vtkusers] some queries with vtkcellarrays Message-ID: 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 << ","<GetNumberOfCells() << ":" << count << std::endl; -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Jul 20 09:21:53 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 20 Jul 2015 09:21:53 -0400 Subject: [vtkusers] [vtk-developers] [Paraview] GPU volume rendering failure on Intel HD XXXX/Iris, Windows and recent drivers In-Reply-To: References: Message-ID: Hi Simon, On Mon, Jul 20, 2015 at 5:02 AM, Simon ESNEAULT wrote: > Hi Aashish, > > Thanks for the patchs. > However, I've tried them but without success, the GPU rendering won't show > up on an Intel HD chipset using the GPURenderDemo (the same exe/dll works > fine on a machine with an NVidia/Ati card). The warning disappeared though > ... > The old mapper had issues on some of the ATI cards (specifically on Mac) and Intel chipset as well. So I am not surprised that it didn't work. > The proposed patchs seems to affect only the TextureMapper 3D, shouldn't > there be modification to > the vtkOpenGLGPUVolumeRayCastMapper::LoadExtensions method as well? > That method calls the vtkGL method I believe which I took care of it. I will have a second look at it today. > > I've tried to uncomment all added lines in the GL_VERSION_1_2_DEPRECATED > part of vtkgl.cxx, build correctly everything, and on the problematic > machine the checkIfNull() fail for all the lines, the program prints out : > Function pointer vtkgl::ColorTable is invalid > Function pointer vtkgl::.. is invalid > For every one of them. > > Also the vtkgl.cxx file is generated by the vtkParseOGLExt exe, shouldn't > there be modification in the headers glext.h/glxext.h/wglext.h instead ? > Maybe this is causing some troubles elsewhere... > Yes and No. Basically what happened was that newer drivers stopped reporting *1_2* variables and that's why you are running into issues. Since the newer backend uses GLEW, all of this mostly works correctly. > > If you have some other magical trick to solve this, I would be glad to > hear about it! Also I can provide more informations if you want > I will have a look at it but even if we can fix all the extension issue, things may not work on Intel. - Aashish > > Thank You > Simon > > > 2015-07-17 17:48 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Hi Andras, >> >> Please find the patchs attached. If you run into issues let me know. I >> should mention that apply these patches at your discretion as I have not >> done enough testing to ensure the quality of the patches but the test >> passed last time I applied them. >> >> >> >> On Fri, Jul 17, 2015 at 11:40 AM, Andras Lasso wrote: >> >>> Please share the patch publicly, we would need it for some of our >>> projects, too. Thank you! >>> >>> >>> >>> Andras >>> >>> >>> >>> *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On >>> Behalf Of *Simon ESNEAULT >>> *Sent:* Friday, July 17, 2015 11:35 AM >>> *To:* Aashish Chaudhary >>> *Cc:* VTK Developers; vtkusers at vtk.org; ParaView list >>> *Subject:* Re: [vtk-developers] [Paraview] GPU volume rendering failure >>> on Intel HD XXXX/Iris, Windows and recent drivers >>> >>> >>> >>> Dear Aashish, >>> >>> >>> >>> Thank you very much for you answer. >>> >>> Yes you are right, we are waiting for a new VTK release that defaults to >>> the new OpenGL2 backend, for safety and because a change of VTK version >>> requires a lot of extra work with our current framework... But the green >>> dashboard indeed looks really promising, and we will probably make the move >>> as soon as it's ready ! >>> >>> Meanwhile, I would be really glad if you could send me the patch that >>> solves this issue with the old backend, or guide me through the needed >>> modification to make it work. >>> >>> Thanks again >>> >>> Simon >>> >>> >>> >>> 2015-07-17 16:22 GMT+02:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>> Dear Simon, >>> >>> >>> >>> On Fri, Jul 17, 2015 at 4:43 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>> Hi All, >>> >>> We're experiencing GPU volume rendering failure on a lot (maybe all ?) >>> Intel HD windows system with up to date drivers. >>> >>> >>> This is reproducible in Paraview or with the GPURenderDemo example from >>> VTK, just load a volume and try to render the volume... Here is a result >>> image from paraview on a Dell Latitude E7450 (Intel HD 5500 inside), with >>> GPU rendering [1] and the same volume with CPU VR rendering [2]. >>> Interestingly, the volume rendering used to work with drivers older or >>> equal to the version 10.18.10.3496 [3]. As a work around, we ask our >>> customers to downgrade their driver version to this one, and they're >>> enjoying smooth GPU rendering. But this driver is quite old and does not >>> support recent chipset... >>> >>> I've built and tested the GPURenderDemo with the brand new OpenGL2 >>> backend on an affected machine and of course it does work out of the box >>> (congratulations for this amazing work !). >>> >>> Great! >>> >>> >>> >>> But our application is FDA/CE marked and we need to wait that this new >>> backend is completely ready for prime time. So for now, we have to stick >>> with VTK 6.1 ... >>> >>> >>> >>> Most of the tests are passing for OpenGL2 ( >>> https://open.cdash.org/index.php?project=VTK) on most of the dashboards >>> (various configurations etc) but it is a moving target just like VTK itself >>> is a moving target. I guess you are waiting for a VTK release that defaults >>> to OpenGL2 as oppose to OpenGL? >>> >>> >>> Anyone has any clue ? They're some warning that pop up from paraview >>> related to the extension "gl_version_1_2" that could not be loaded, not >>> sure if that could be related ? Following this thread [4] and the fix >>> proposed, I've tried to replace >>> >>> /*****************/ >>> >>> extensions->LoadExtension("GL_VERSION_1_2") >>> >>> /*****************/ >>> >>> by >>> >>> /*****************/ >>> >>> extensions->LoadExtension("GL_EXT_texture3D"); >>> extensions->LoadExtension( "GL_ARB_texture_non_power_of_two" ); >>> >>> /*****************/ >>> >>> in the vtkOpenGLGPUVolumeRayCastMapper.cxx, The warning disappears but >>> there is still no volume rendering (tested with GPURenderDemo). Maybe it >>> needs some others extensions ? >>> >>> >>> >>> Yes, there is a patch and I can send it to you. I have to talk to folks >>> here if we can fix the old mapper with those changes but as of now it is >>> not in the plan. >>> >>> >>> >>> >>> Should I fill a bug in paraview, vtk ? Are there any plan to maintain >>> and maybe fix this for the old backend ? >>> >>> >>> >>> - Aashish >>> >>> >>> >>> >>> Thanks, >>> -- >>> >>> ------------------------------------------------------------------ >>> Simon Esneault >>> >>> Rennes, France >>> ------------------------------------------------------------------ >>> >>> >>> [1] http://picpaste.com/pics/Paraview-4-3-1-GPU-VR_fail.1437122217.PNG >>> >>> [2] http://picpaste.com/pics/Paraview-4-3-1-CPU-VR_win.1437122267.PNG >>> >>> [3] https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23339 >>> [4] http://public.kitware.com/pipermail/vtkusers/2014-April/083584.html >>> >>> >>> _______________________________________________ >>> 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 >>> >>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >>> >>> >>> >>> >>> -- >>> >>> ------------------------------------------------------------------ >>> Simon Esneault >>> >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Mon Jul 20 10:11:57 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 20 Jul 2015 16:11:57 +0200 Subject: [vtkusers] [vtk-developers] [Paraview] GPU volume rendering failure on Intel HD XXXX/Iris, Windows and recent drivers In-Reply-To: References: Message-ID: Hi Aashish, Thanks you very much for looking into this issue. Our customers (and I believe the community since the issue is visible in paraview) would really benefit from such a fix. Quite a lot of new computers just have an intel chipset nowadays. This of course until the new OpenGL2 backend is ready ! Please let me know if there is anything I can do to help. Thanks a lot Simon 2015-07-20 15:21 GMT+02:00 Aashish Chaudhary : > Hi Simon, > > On Mon, Jul 20, 2015 at 5:02 AM, Simon ESNEAULT > wrote: > >> Hi Aashish, >> >> Thanks for the patchs. >> However, I've tried them but without success, the GPU rendering won't >> show up on an Intel HD chipset using the GPURenderDemo (the same exe/dll >> works fine on a machine with an NVidia/Ati card). The warning disappeared >> though ... >> > > The old mapper had issues on some of the ATI cards (specifically on Mac) > and Intel chipset as well. So I am not surprised that it didn't work. > > >> The proposed patchs seems to affect only the TextureMapper 3D, shouldn't >> there be modification to >> the vtkOpenGLGPUVolumeRayCastMapper::LoadExtensions method as well? >> > > That method calls the vtkGL method I believe which I took care of it. I > will have a second look at it today. > >> >> I've tried to uncomment all added lines in the GL_VERSION_1_2_DEPRECATED >> part of vtkgl.cxx, build correctly everything, and on the problematic >> machine the checkIfNull() fail for all the lines, the program prints out : >> Function pointer vtkgl::ColorTable is invalid >> Function pointer vtkgl::.. is invalid >> For every one of them. >> >> Also the vtkgl.cxx file is generated by the vtkParseOGLExt exe, shouldn't >> there be modification in the headers glext.h/glxext.h/wglext.h instead ? >> Maybe this is causing some troubles elsewhere... >> > > Yes and No. Basically what happened was that newer drivers stopped > reporting *1_2* variables and that's why you are running into issues. Since > the newer backend uses GLEW, all of this mostly works correctly. > >> >> If you have some other magical trick to solve this, I would be glad to >> hear about it! Also I can provide more informations if you want >> > > I will have a look at it but even if we can fix all the extension issue, > things may not work on Intel. > > - Aashish > >> >> Thank You >> Simon >> >> >> 2015-07-17 17:48 GMT+02:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> Hi Andras, >>> >>> Please find the patchs attached. If you run into issues let me know. I >>> should mention that apply these patches at your discretion as I have not >>> done enough testing to ensure the quality of the patches but the test >>> passed last time I applied them. >>> >>> >>> >>> On Fri, Jul 17, 2015 at 11:40 AM, Andras Lasso wrote: >>> >>>> Please share the patch publicly, we would need it for some of our >>>> projects, too. Thank you! >>>> >>>> >>>> >>>> Andras >>>> >>>> >>>> >>>> *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On >>>> Behalf Of *Simon ESNEAULT >>>> *Sent:* Friday, July 17, 2015 11:35 AM >>>> *To:* Aashish Chaudhary >>>> *Cc:* VTK Developers; vtkusers at vtk.org; ParaView list >>>> *Subject:* Re: [vtk-developers] [Paraview] GPU volume rendering >>>> failure on Intel HD XXXX/Iris, Windows and recent drivers >>>> >>>> >>>> >>>> Dear Aashish, >>>> >>>> >>>> >>>> Thank you very much for you answer. >>>> >>>> Yes you are right, we are waiting for a new VTK release that defaults >>>> to the new OpenGL2 backend, for safety and because a change of VTK version >>>> requires a lot of extra work with our current framework... But the green >>>> dashboard indeed looks really promising, and we will probably make the move >>>> as soon as it's ready ! >>>> >>>> Meanwhile, I would be really glad if you could send me the patch that >>>> solves this issue with the old backend, or guide me through the needed >>>> modification to make it work. >>>> >>>> Thanks again >>>> >>>> Simon >>>> >>>> >>>> >>>> 2015-07-17 16:22 GMT+02:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>> Dear Simon, >>>> >>>> >>>> >>>> On Fri, Jul 17, 2015 at 4:43 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>> Hi All, >>>> >>>> We're experiencing GPU volume rendering failure on a lot (maybe all ?) >>>> Intel HD windows system with up to date drivers. >>>> >>>> >>>> This is reproducible in Paraview or with the GPURenderDemo example from >>>> VTK, just load a volume and try to render the volume... Here is a result >>>> image from paraview on a Dell Latitude E7450 (Intel HD 5500 inside), with >>>> GPU rendering [1] and the same volume with CPU VR rendering [2]. >>>> Interestingly, the volume rendering used to work with drivers older or >>>> equal to the version 10.18.10.3496 [3]. As a work around, we ask our >>>> customers to downgrade their driver version to this one, and they're >>>> enjoying smooth GPU rendering. But this driver is quite old and does not >>>> support recent chipset... >>>> >>>> I've built and tested the GPURenderDemo with the brand new OpenGL2 >>>> backend on an affected machine and of course it does work out of the box >>>> (congratulations for this amazing work !). >>>> >>>> Great! >>>> >>>> >>>> >>>> But our application is FDA/CE marked and we need to wait that this >>>> new backend is completely ready for prime time. So for now, we have to >>>> stick with VTK 6.1 ... >>>> >>>> >>>> >>>> Most of the tests are passing for OpenGL2 ( >>>> https://open.cdash.org/index.php?project=VTK) on most of the >>>> dashboards (various configurations etc) but it is a moving target just like >>>> VTK itself is a moving target. I guess you are waiting for a VTK release >>>> that defaults to OpenGL2 as oppose to OpenGL? >>>> >>>> >>>> Anyone has any clue ? They're some warning that pop up from paraview >>>> related to the extension "gl_version_1_2" that could not be loaded, not >>>> sure if that could be related ? Following this thread [4] and the fix >>>> proposed, I've tried to replace >>>> >>>> /*****************/ >>>> >>>> extensions->LoadExtension("GL_VERSION_1_2") >>>> >>>> /*****************/ >>>> >>>> by >>>> >>>> /*****************/ >>>> >>>> extensions->LoadExtension("GL_EXT_texture3D"); >>>> extensions->LoadExtension( "GL_ARB_texture_non_power_of_two" ); >>>> >>>> /*****************/ >>>> >>>> in the vtkOpenGLGPUVolumeRayCastMapper.cxx, The warning disappears but >>>> there is still no volume rendering (tested with GPURenderDemo). Maybe it >>>> needs some others extensions ? >>>> >>>> >>>> >>>> Yes, there is a patch and I can send it to you. I have to talk to folks >>>> here if we can fix the old mapper with those changes but as of now it is >>>> not in the plan. >>>> >>>> >>>> >>>> >>>> Should I fill a bug in paraview, vtk ? Are there any plan to maintain >>>> and maybe fix this for the old backend ? >>>> >>>> >>>> >>>> - Aashish >>>> >>>> >>>> >>>> >>>> Thanks, >>>> -- >>>> >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>>> >>>> [1] http://picpaste.com/pics/Paraview-4-3-1-GPU-VR_fail.1437122217.PNG >>>> >>>> [2] http://picpaste.com/pics/Paraview-4-3-1-CPU-VR_win.1437122267.PNG >>>> >>>> [3] https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23339 >>>> [4] http://public.kitware.com/pipermail/vtkusers/2014-April/083584.html >>>> >>>> >>>> _______________________________________________ >>>> 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 >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Jul 20 10:14:33 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 20 Jul 2015 10:14:33 -0400 Subject: [vtkusers] [vtk-developers] [Paraview] GPU volume rendering failure on Intel HD XXXX/Iris, Windows and recent drivers In-Reply-To: References: Message-ID: The OpenGL2 mapper works on most of the intel chipset. I cannot promise that we can get the old mapper working on Intel cards unless it can be fixed by telling it that all the extensions are there. - Aashish On Mon, Jul 20, 2015 at 10:11 AM, Simon ESNEAULT wrote: > Hi Aashish, > > Thanks you very much for looking into this issue. Our customers (and I > believe the community since the issue is visible in paraview) would really > benefit from such a fix. Quite a lot of new computers just have an intel > chipset nowadays. > This of course until the new OpenGL2 backend is ready ! > > Please let me know if there is anything I can do to help. > > Thanks a lot > Simon > > 2015-07-20 15:21 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Hi Simon, >> >> On Mon, Jul 20, 2015 at 5:02 AM, Simon ESNEAULT > > wrote: >> >>> Hi Aashish, >>> >>> Thanks for the patchs. >>> However, I've tried them but without success, the GPU rendering won't >>> show up on an Intel HD chipset using the GPURenderDemo (the same exe/dll >>> works fine on a machine with an NVidia/Ati card). The warning disappeared >>> though ... >>> >> >> The old mapper had issues on some of the ATI cards (specifically on Mac) >> and Intel chipset as well. So I am not surprised that it didn't work. >> >> >>> The proposed patchs seems to affect only the TextureMapper 3D, shouldn't >>> there be modification to >>> the vtkOpenGLGPUVolumeRayCastMapper::LoadExtensions method as well? >>> >> >> That method calls the vtkGL method I believe which I took care of it. I >> will have a second look at it today. >> >>> >>> I've tried to uncomment all added lines in the GL_VERSION_1_2_DEPRECATED >>> part of vtkgl.cxx, build correctly everything, and on the problematic >>> machine the checkIfNull() fail for all the lines, the program prints out : >>> Function pointer vtkgl::ColorTable is invalid >>> Function pointer vtkgl::.. is invalid >>> For every one of them. >>> >>> Also the vtkgl.cxx file is generated by the vtkParseOGLExt exe, >>> shouldn't there be modification in the headers glext.h/glxext.h/wglext.h >>> instead ? Maybe this is causing some troubles elsewhere... >>> >> >> Yes and No. Basically what happened was that newer drivers stopped >> reporting *1_2* variables and that's why you are running into issues. Since >> the newer backend uses GLEW, all of this mostly works correctly. >> >>> >>> If you have some other magical trick to solve this, I would be glad to >>> hear about it! Also I can provide more informations if you want >>> >> >> I will have a look at it but even if we can fix all the extension issue, >> things may not work on Intel. >> >> - Aashish >> >>> >>> Thank You >>> Simon >>> >>> >>> 2015-07-17 17:48 GMT+02:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> Hi Andras, >>>> >>>> Please find the patchs attached. If you run into issues let me know. I >>>> should mention that apply these patches at your discretion as I have not >>>> done enough testing to ensure the quality of the patches but the test >>>> passed last time I applied them. >>>> >>>> >>>> >>>> On Fri, Jul 17, 2015 at 11:40 AM, Andras Lasso >>>> wrote: >>>> >>>>> Please share the patch publicly, we would need it for some of our >>>>> projects, too. Thank you! >>>>> >>>>> >>>>> >>>>> Andras >>>>> >>>>> >>>>> >>>>> *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On >>>>> Behalf Of *Simon ESNEAULT >>>>> *Sent:* Friday, July 17, 2015 11:35 AM >>>>> *To:* Aashish Chaudhary >>>>> *Cc:* VTK Developers; vtkusers at vtk.org; ParaView list >>>>> *Subject:* Re: [vtk-developers] [Paraview] GPU volume rendering >>>>> failure on Intel HD XXXX/Iris, Windows and recent drivers >>>>> >>>>> >>>>> >>>>> Dear Aashish, >>>>> >>>>> >>>>> >>>>> Thank you very much for you answer. >>>>> >>>>> Yes you are right, we are waiting for a new VTK release that defaults >>>>> to the new OpenGL2 backend, for safety and because a change of VTK version >>>>> requires a lot of extra work with our current framework... But the green >>>>> dashboard indeed looks really promising, and we will probably make the move >>>>> as soon as it's ready ! >>>>> >>>>> Meanwhile, I would be really glad if you could send me the patch that >>>>> solves this issue with the old backend, or guide me through the needed >>>>> modification to make it work. >>>>> >>>>> Thanks again >>>>> >>>>> Simon >>>>> >>>>> >>>>> >>>>> 2015-07-17 16:22 GMT+02:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>> Dear Simon, >>>>> >>>>> >>>>> >>>>> On Fri, Jul 17, 2015 at 4:43 AM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>> Hi All, >>>>> >>>>> We're experiencing GPU volume rendering failure on a lot (maybe all ?) >>>>> Intel HD windows system with up to date drivers. >>>>> >>>>> >>>>> This is reproducible in Paraview or with the GPURenderDemo example >>>>> from VTK, just load a volume and try to render the volume... Here is a >>>>> result image from paraview on a Dell Latitude E7450 (Intel HD 5500 inside), >>>>> with GPU rendering [1] and the same volume with CPU VR rendering [2]. >>>>> Interestingly, the volume rendering used to work with drivers older or >>>>> equal to the version 10.18.10.3496 [3]. As a work around, we ask our >>>>> customers to downgrade their driver version to this one, and they're >>>>> enjoying smooth GPU rendering. But this driver is quite old and does not >>>>> support recent chipset... >>>>> >>>>> I've built and tested the GPURenderDemo with the brand new OpenGL2 >>>>> backend on an affected machine and of course it does work out of the box >>>>> (congratulations for this amazing work !). >>>>> >>>>> Great! >>>>> >>>>> >>>>> >>>>> But our application is FDA/CE marked and we need to wait that this >>>>> new backend is completely ready for prime time. So for now, we have to >>>>> stick with VTK 6.1 ... >>>>> >>>>> >>>>> >>>>> Most of the tests are passing for OpenGL2 ( >>>>> https://open.cdash.org/index.php?project=VTK) on most of the >>>>> dashboards (various configurations etc) but it is a moving target just like >>>>> VTK itself is a moving target. I guess you are waiting for a VTK release >>>>> that defaults to OpenGL2 as oppose to OpenGL? >>>>> >>>>> >>>>> Anyone has any clue ? They're some warning that pop up from paraview >>>>> related to the extension "gl_version_1_2" that could not be loaded, not >>>>> sure if that could be related ? Following this thread [4] and the fix >>>>> proposed, I've tried to replace >>>>> >>>>> /*****************/ >>>>> >>>>> extensions->LoadExtension("GL_VERSION_1_2") >>>>> >>>>> /*****************/ >>>>> >>>>> by >>>>> >>>>> /*****************/ >>>>> >>>>> extensions->LoadExtension("GL_EXT_texture3D"); >>>>> extensions->LoadExtension( "GL_ARB_texture_non_power_of_two" ); >>>>> >>>>> /*****************/ >>>>> >>>>> in the vtkOpenGLGPUVolumeRayCastMapper.cxx, The warning disappears but >>>>> there is still no volume rendering (tested with GPURenderDemo). Maybe it >>>>> needs some others extensions ? >>>>> >>>>> >>>>> >>>>> Yes, there is a patch and I can send it to you. I have to talk to >>>>> folks here if we can fix the old mapper with those changes but as of now it >>>>> is not in the plan. >>>>> >>>>> >>>>> >>>>> >>>>> Should I fill a bug in paraview, vtk ? Are there any plan to maintain >>>>> and maybe fix this for the old backend ? >>>>> >>>>> >>>>> >>>>> - Aashish >>>>> >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> -- >>>>> >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>>> >>>>> [1] http://picpaste.com/pics/Paraview-4-3-1-GPU-VR_fail.1437122217.PNG >>>>> >>>>> [2] http://picpaste.com/pics/Paraview-4-3-1-CPU-VR_win.1437122267.PNG >>>>> >>>>> [3] https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23339 >>>>> [4] >>>>> http://public.kitware.com/pipermail/vtkusers/2014-April/083584.html >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemla21 at gmail.com Mon Jul 20 10:40:50 2015 From: hemla21 at gmail.com (Hedieh Ebrahimi) Date: Mon, 20 Jul 2015 16:40:50 +0200 Subject: [vtkusers] Area of Intersection between a volume and a surface Message-ID: Dear all, I have a question. I am trying to calculate the intersection area between a hexahedron volume and a triangle surface. I came across the Python Bindings for VTK. I am wondering if there is any way to get the cross section between a hexahedron volume and a triangle surface. Second is there any way to calculate this cross-sectional area? I would really appreciate if you could please refer me to any classes or sample code to do this? Thank you very much in Advance for your help. Best Regards, Hedieh -------------- next part -------------- An HTML attachment was scrubbed... URL: From draktharrblorf at gmail.com Mon Jul 20 13:20:12 2015 From: draktharrblorf at gmail.com (Drak) Date: Mon, 20 Jul 2015 10:20:12 -0700 (MST) Subject: [vtkusers] Multiple actors, multiple renderers bug Message-ID: <1437412812795-5732994.post@n5.nabble.com> Hello, I'm having weird bugs with vtk and I would like to know if there is any workaround. Basically, what I'm trying to do is this. I have 2 actors (A and B) and 2 renderers (C and D). On the renderer C, I add both actors A and B. On the second renderer, I add only the actor B. Everything works fine here : actor A and B are displayed on renderer C, and actor B on renderer D. When I remove only the actor B from both renderer, calling C-??>removeActor(B) and D->removeActor(B), the actor A will disappear from the renderer C as well for no reason. The surprising thing is that it is still in the vtkActorCollection of the renderer when I call C->getActors(). Have any of you tried the same thing? Is there anything I'm maybe doing wrong? Is there any workaround? I've been on this for days and really can't find any solution other than to copy my actors 2 times, which I'm trying to avoid. -- View this message in context: http://vtk.1045678.n5.nabble.com/Multiple-actors-multiple-renderers-bug-tp5732994.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Jul 20 13:35:59 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 20 Jul 2015 13:35:59 -0400 Subject: [vtkusers] Multiple actors, multiple renderers bug In-Reply-To: <1437412812795-5732994.post@n5.nabble.com> References: <1437412812795-5732994.post@n5.nabble.com> Message-ID: You cannot reliably add the same actor to multiple renderers. See this thread: http://public.kitware.com/pipermail/vtkusers/2011-November/070817.html Cory On Mon, Jul 20, 2015 at 1:20 PM, Drak wrote: > Hello, > > I'm having weird bugs with vtk and I would like to know if there is any > workaround. > > Basically, what I'm trying to do is this. I have 2 actors (A and B) and 2 > renderers (C and D). On the renderer C, I add both actors A and B. On the > second renderer, I add only the actor B. > > Everything works fine here : actor A and B are displayed on renderer C, and > actor B on renderer D. > > When I remove only the actor B from both renderer, calling > C-??>removeActor(B) and D->removeActor(B), the actor A will disappear from > the renderer C as well for no reason. The surprising thing is that it is > still in the vtkActorCollection of the renderer when I call C->getActors(). > > Have any of you tried the same thing? Is there anything I'm maybe doing > wrong? Is there any workaround? I've been on this for days and really can't > find any solution other than to copy my actors 2 times, which I'm trying to > avoid. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Multiple-actors-multiple-renderers-bug-tp5732994.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 draktharrblorf at gmail.com Mon Jul 20 13:50:16 2015 From: draktharrblorf at gmail.com (Drak) Date: Mon, 20 Jul 2015 10:50:16 -0700 (MST) Subject: [vtkusers] Multiple actors, multiple renderers bug In-Reply-To: References: <1437412812795-5732994.post@n5.nabble.com> Message-ID: <1437414616188-5732996.post@n5.nabble.com> Thank you for your quick reply. I would still like to know why adding and removing actors works perfectly when both renderers have the same actors (removing and adding the same actors to both renderers works fine). But as soon as I have custom combinations of actors/renderers like the one in my original post, I get weird effects, like random actors disappearing, "phantom actor" (random actors appearing with transparency for some reason), etc. Thank you again. Also, in the post you sent me, it seems the problem was more with LOD actors. I quote : "A basic vtkActor/vtkPolyDataMapper with no texture and no shaders is the only prop that I would trust to add to more than one renderer." -- View this message in context: http://vtk.1045678.n5.nabble.com/Multiple-actors-multiple-renderers-bug-tp5732994p5732996.html Sent from the VTK - Users mailing list archive at Nabble.com. From jeffrey.c.becker at nasa.gov Mon Jul 20 14:08:24 2015 From: jeffrey.c.becker at nasa.gov (Jeff Becker) Date: Mon, 20 Jul 2015 11:08:24 -0700 Subject: [vtkusers] [Paraview] Combining vtk and paraview python scripts In-Reply-To: References: <55A55C2C.2030107@nasa.gov> <55A56672.3040204@nasa.gov> Message-ID: <55AD3918.3030808@nasa.gov> Hi, On 07/18/2015 05:17 PM, Berk Geveci wrote: > To elaborate on what Andy said, you can stick your entire VTK script > in side the programmable source. Which you can use in batch mode as > well. If you want to keep your VTK script as a reusable code, I > recommend making it a module that you import from the programmable source. So if the last thing my VTK script does is set up a vtkImageImport object should that work as a programmable source (I tried but ParaView didn't get any bounds or scalar field name even though I set them up)? If not, what else do I need to do? Thanks. -jeff > > Best, > -berk > > On Tue, Jul 14, 2015 at 3:43 PM, Jeff Becker > > wrote: > > On 07/14/2015 12:20 PM, Andy Bauer wrote: >> ParaView's Python Programmable Filter and Python Programmable >> Source use VTK Python wrapping to do the work while making it >> available in Paraview. Check out >> http://www.paraview.org/Wiki/Python_Programmable_Filter. > > Thanks. That's pretty neat, but what I'd really like is a > standalone script I can run in batch mode (no interaction) to > generate one png file per timestep for all the timesteps in the > data set. Essentially I'd like a way to construct a pipeline > between the vtk.vtkImageImport() object and the ParaView renderView1. > > -jeff > >> >> On Tue, Jul 14, 2015 at 2:59 PM, Jeff Becker >> > wrote: >> >> Hi. >> >> As a proof of concept, I have a vtk script that reads some >> binary data, and produces a vti file. I then have a second >> script that I generated using ParaView's tracing facility >> while viewing the data. Now I'd like to combine them, so as >> to eliminate the intermediate file, i.e., go from binary data >> directly to rendering. To be specific, my vtk script ends >> like this: >> >> steinbmag = steinbmag.reshape(nx,ny,nz).T >> >> vtkImporter = vtk.vtkImageImport() >> vtkImporter.CopyImportVoidPointer(steinbmag, steinbmag.nbytes) >> >> vtkImporter.SetDataScalarTypeToFloat() >> vtkImporter.SetNumberOfScalarComponents(1) >> vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) >> vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) >> vtkImporter.SetScalarArrayName('B field magnitude') >> >> writer=vtk.vtkXMLImageDataWriter() >> writer.SetFileName(out_fname) >> writer.SetInputConnection(vtkImporter.GetOutputPort()) >> writer.Write() >> >> and the ParaView script starts like this: >> >> from paraview.simple import * >> >> paraview.simple._DisableFirstRenderCameraReset() >> >> filepfx = '/nobackup/jcbecker/steinBmag_0' >> infile = filepfx+'.vti' >> # create a new 'XML Image Data Reader' >> steinBmag_ = XMLImageDataReader(FileName=infile) >> steinBmag_.CellArrayStatus = [] >> steinBmag_.PointArrayStatus = ['B field magnitude'] >> >> # get animation scene >> animationScene1 = GetAnimationScene() >> >> # update animation scene based on data timesteps >> animationScene1.UpdateAnimationUsingDataTimeSteps() >> >> # get active view >> renderView1 = GetActiveViewOrCreate('RenderView') >> # uncomment following to set a specific view size >> renderView1.ViewSize = [1090, 761] >> >> I'm looking at the VTK examples and pvpython documentation, >> but any help is appreciated. >> >> Thanks. >> >> -jeff >> _______________________________________________ >> 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 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 fotosentido at gmail.com Mon Jul 20 14:55:36 2015 From: fotosentido at gmail.com (Marcos) Date: Mon, 20 Jul 2015 20:55:36 +0200 Subject: [vtkusers] Configuring VTK with Qt5 Message-ID: Hi, I'm trying to configure VTK 6.2 with Cmake. I get: CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/FindQt4.cmake:1326 (message): Found unsuitable Qt version "5.4.2" from C:/Qt/5.4/msvc2013_opengl/bin/qmake.exe, this code requires Qt 4.x Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:71 (find_package) The official Qt installer lets choose Qt versions from 5.0.2 to 5.5. I could try an older installer but I'd like to benefit from the newest Qt version. I wonder why QVTK widgets are still not available with Qt5. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From draktharrblorf at gmail.com Mon Jul 20 15:02:36 2015 From: draktharrblorf at gmail.com (Drak) Date: Mon, 20 Jul 2015 12:02:36 -0700 (MST) Subject: [vtkusers] Configuring VTK with Qt5 In-Reply-To: References: Message-ID: <1437418956611-5732999.post@n5.nabble.com> see this: http://stackoverflow.com/questions/30892773/building-vtk-with-qt5-windows-8/30894401#30894401 change VK_QT_VERSION to 5 in your cmake -- View this message in context: http://vtk.1045678.n5.nabble.com/Configuring-VTK-with-Qt5-tp5732998p5732999.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Jul 20 17:24:50 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 20 Jul 2015 17:24:50 -0400 Subject: [vtkusers] Area of Intersection between a volume and a surface In-Reply-To: References: Message-ID: Hi Hedieh, I'm not clear on what you are trying to compute. Do you have an image to illustrate? Thanks, Cory On Mon, Jul 20, 2015 at 10:40 AM, Hedieh Ebrahimi wrote: > Dear all, > > I have a question. I am trying to calculate the intersection area between > a hexahedron volume and a triangle surface. > > I came across the Python Bindings for VTK. I am wondering if there is any > way to get the cross section between a hexahedron volume and a triangle > surface. > > Second is there any way to calculate this cross-sectional area? > > I would really appreciate if you could please refer me to any classes or > sample code to do this? > > Thank you very much in Advance for your help. > > Best Regards, > Hedieh > > _______________________________________________ > 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 sayanmaity.10 at gmail.com Mon Jul 20 17:43:24 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Mon, 20 Jul 2015 14:43:24 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> Message-ID: <1437428604623-5733001.post@n5.nabble.com> Dear Cory, I tried to use "vtkThreshold" as you suggested. The code is executing without any exception but "0 cells after thresholding." the vtkThreshold is not creating any cells also I tried to visualize the vtkUnstructuredGrid data generated by "vtkThreshold" but I couldn't see any output in the render window. Could you please have a look in the code and give some suggestion if I am missing something. Here is the code & output window: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileNameSliceOffset(1); reader->SetFileNameSliceSpacing(1); reader->SetFilePattern("S:\\GSoC_2015_Implementation\\test_images\\2.%d.bspline.tif"); reader->SetDataExtent(0, 63, 0, 63, 1, 551); reader->SetOrientationType(3); reader->Update(); vtkSmartPointer threshold = vtkSmartPointer::New(); threshold->SetInputConnection(reader->GetOutputPort()); threshold->ThresholdByUpper(1); vtkUnstructuredGrid* thresholdedPolydata = threshold->GetOutput(); std::cout << "There are " << thresholdedPolydata->GetNumberOfCells() << " cells after thresholding." << std::endl; //Visualization UnstructuredGrid after threshold // Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(thresholdedPolydata); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(1.0, 0.0, 0.0); actor->GetProperty()->SetRepresentationToWireframe(); actor->GetProperty()->SetLineWidth(5); // Create a renderer, render window, and interactor vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); // Add the actors to the scene renderer->AddActor(actor); //renderer->SetBackground(1,1,1); // Background color white // Render and interact renderWindow->Render(); renderWindowInteractor->Start(); Output windows: -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733001.html Sent from the VTK - Users mailing list archive at Nabble.com. From sayanmaity.10 at gmail.com Mon Jul 20 18:22:36 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Mon, 20 Jul 2015 15:22:36 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1437428604623-5733001.post@n5.nabble.com> References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> Message-ID: <1437430956334-5733002.post@n5.nabble.com> Dear Cory, Please disregard the previous post. I was doing a silly mistake of not including the "threshold->Update();" statement thus the threshold operation wasn't performing. After including the statement the vtkThreshold is working and giving me outputs: Code & plots are attached: *Code:* // Start by loading some data. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileNameSliceOffset(1); reader->SetFileNameSliceSpacing(1); reader->SetFilePattern("S:\\GSoC_2015_Implementation\\test_images\\2.%d.bspline.tif"); reader->SetDataExtent(0, 63, 0, 63, 1, 125); reader->SetOrientationType(3); reader->Update(); vtkSmartPointer threshold = vtkSmartPointer::New(); threshold->SetInputConnection(reader->GetOutputPort()); threshold->ThresholdByUpper(1); //threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "index"); threshold->Update(); vtkUnstructuredGrid* thresholdedPolydata = threshold->GetOutput(); std::cout << "There are " << thresholdedPolydata->GetNumberOfCells() << " cells after thresholding." << std::endl; //Visualization UnstructuredGrid after threshold // Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(thresholdedPolydata); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(1.0, 0.0, 0.0); actor->GetProperty()->SetRepresentationToWireframe(); actor->GetProperty()->SetLineWidth(5); // Create a renderer, render window, and interactor vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); // Add the actors to the scene renderer->AddActor(actor); //renderer->AddActor(sphereActor); renderer->SetBackground(.1, .5, .8);; // Background color white // Render and interact renderWindow->Render(); renderWindowInteractor->Start(); *Plot of Unstructured grid using vtkThreshold :* /***** Issue****/ *But I am facing some memory related problem, I have total 551 images (series/ stack) out of which only 125 images are loading in my PC (16 GB memory installed) while using vtkThreshold anything more than that throwing error related Memory overloading, error window shown below. Please suggest me how to handle this memory allocation problem :* ""ERROR: In f:\vtk\vtk-6.2.0\common\core\vtkDataArrayTemplate.txx, line 142 vtkIdTypeArray (0000000001C83C90): Unable to allocate 996245250 elements of size 8 bytes. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733002.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Mon Jul 20 20:43:59 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 20 Jul 2015 20:43:59 -0400 Subject: [vtkusers] [Paraview] Combining vtk and paraview python scripts In-Reply-To: <55AD3918.3030808@nasa.gov> References: <55A55C2C.2030107@nasa.gov> <55A56672.3040204@nasa.gov> <55AD3918.3030808@nasa.gov> Message-ID: You probably need to update vtkImageExport and shallow copy its output to the programmable source's output. You also need to add something to the RequestInformation setting the whole extent. You need something like: from paraview import util util.SetOutputWholeExtent(self, [0,nx-1,0,ny-1,0,nz-1]) By the way, there are better ways of getting numpy arrays into VTK than the image import stuff. See some of the earlier blogs here: http://www.kitware.com/blog/home/user/53/2 Best, -berk On Mon, Jul 20, 2015 at 2:08 PM, Jeff Becker wrote: > Hi, > > On 07/18/2015 05:17 PM, Berk Geveci wrote: > > To elaborate on what Andy said, you can stick your entire VTK script in > side the programmable source. Which you can use in batch mode as well. If > you want to keep your VTK script as a reusable code, I recommend making it > a module that you import from the programmable source. > > > So if the last thing my VTK script does is set up a vtkImageImport object > should that work as a programmable source (I tried but ParaView didn't get > any bounds or scalar field name even though I set them up)? If not, what > else do I need to do? Thanks. > > -jeff > > > > Best, > -berk > > On Tue, Jul 14, 2015 at 3:43 PM, Jeff Becker > wrote: > >> On 07/14/2015 12:20 PM, Andy Bauer wrote: >> >> ParaView's Python Programmable Filter and Python Programmable Source use >> VTK Python wrapping to do the work while making it available in Paraview. >> Check out http://www.paraview.org/Wiki/Python_Programmable_Filter. >> >> >> Thanks. That's pretty neat, but what I'd really like is a standalone >> script I can run in batch mode (no interaction) to generate one png file >> per timestep for all the timesteps in the data set. Essentially I'd like a >> way to construct a pipeline between the vtk.vtkImageImport() object and >> the ParaView renderView1. >> >> -jeff >> >> >> On Tue, Jul 14, 2015 at 2:59 PM, Jeff Becker >> wrote: >> >>> Hi. >>> >>> As a proof of concept, I have a vtk script that reads some binary data, >>> and produces a vti file. I then have a second script that I generated using >>> ParaView's tracing facility while viewing the data. Now I'd like to combine >>> them, so as to eliminate the intermediate file, i.e., go from binary data >>> directly to rendering. To be specific, my vtk script ends like this: >>> >>> steinbmag = steinbmag.reshape(nx,ny,nz).T >>> >>> vtkImporter = vtk.vtkImageImport() >>> vtkImporter.CopyImportVoidPointer(steinbmag, steinbmag.nbytes) >>> >>> vtkImporter.SetDataScalarTypeToFloat() >>> vtkImporter.SetNumberOfScalarComponents(1) >>> vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) >>> vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) >>> vtkImporter.SetScalarArrayName('B field magnitude') >>> >>> writer=vtk.vtkXMLImageDataWriter() >>> writer.SetFileName(out_fname) >>> writer.SetInputConnection(vtkImporter.GetOutputPort()) >>> writer.Write() >>> >>> and the ParaView script starts like this: >>> >>> from paraview.simple import * >>> >>> paraview.simple._DisableFirstRenderCameraReset() >>> >>> filepfx = '/nobackup/jcbecker/steinBmag_0' >>> infile = filepfx+'.vti' >>> # create a new 'XML Image Data Reader' >>> steinBmag_ = XMLImageDataReader(FileName=infile) >>> steinBmag_.CellArrayStatus = [] >>> steinBmag_.PointArrayStatus = ['B field magnitude'] >>> >>> # get animation scene >>> animationScene1 = GetAnimationScene() >>> >>> # update animation scene based on data timesteps >>> animationScene1.UpdateAnimationUsingDataTimeSteps() >>> >>> # get active view >>> renderView1 = GetActiveViewOrCreate('RenderView') >>> # uncomment following to set a specific view size >>> renderView1.ViewSize = [1090, 761] >>> >>> I'm looking at the VTK examples and pvpython documentation, but any help >>> is appreciated. >>> >>> Thanks. >>> >>> -jeff >>> _______________________________________________ >>> 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 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 cory.quammen at kitware.com Mon Jul 20 23:07:28 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 20 Jul 2015 23:07:28 -0400 Subject: [vtkusers] 3D numpy array to vtkDataSet In-Reply-To: References: <6276B1E8-FC45-4D0B-BF81-4CD0E7C84BFF@gmail.com> Message-ID: Quentan, Thank you for posting the excellent code sample. With it, I could see what the problem was right away. The problem is that vtkImageData has the notion of an origin, and you are not setting it. By default, vtkImageData have a corner at (0, 0, 0), but your function in numpy starts at (-1, -1, -1). By not setting the origin to (-1, -1, -1), you are accidentally shifting your data. You'll need to set the origin in your vtk_image_data via vtk_image_data.SetOrigin(-1, -1, -1) You'll also need to figure out your vtk_image_data's spacing. For the x-component, this can be computed with (x_max - x_min) / (x_dim - 1) where x_{max, min} are the maximum and minimum x coordinate and x_dim is the number of voxels in the x direction. I hope that helps, Cory On Sun, Jul 19, 2015 at 1:40 PM, Quentan Qi wrote: > Dear Cory, > > I may fail to explain my problem, so I made an example > to show what I want to > express, as you suggested. https://github.com/quentan/Test_ImageData > > This example generates a quadric with its implicit form: F(x,y,z) = > a0*x^2 + a1*y^2 + a2*z^2 + a3*x*y + a4*y*z + a5*x*z + a6*x + a7*y + a8*z + > a9 > > The left viewport renders the quadric with vtkQuadric, which works > perfectly. > > The right viewport renders the same quadric with a meshgrid generated with > numpy. The meshgrid is converted to vtkFloatArray then to vtkImageData. Its > shape is right, but locates at wrong position, which seems like it was > scaled to some positive values. > > Note the small perpendicular coordinate lines in the corner. > > I guess the issue raises around line 120 - 123. If any other wrongs > happen, point it for me, please. > > Cheers, > Quentan > > > On 18 Jul 2015, at 15:09, Cory Quammen wrote: > > Quentan, > > vtkImageData is in fact a subclass of vtkDataSet, so no conversion is > needed. You said, "vtkImageData scales all points to positive integer > values", but this should not be the case. Something strange is going on. > > Could you expand the code above into a complete example that can be run > through vtkpython? That will make it easier to take a look. In particular, > please add a part that shows the vtkImageData are being scaled to positive > integers. It's fine if you fill the array with random values. > > Thanks, > Cory > > > On Sat, Jul 18, 2015 at 6:08 AM, Quentan Qi wrote: > >> Hi there, >> >> I am going to read a set of discrete 3D points (float value, not int >> value) and show both the points and the fitting surface via VTK?s implicit >> functions, say vtkImplicitVolume or vtkImplicitDataSet. >> >> It works fine of the numpy arrary to vtkImageData conversion in the >> following code, but is out of my mind how to convert it to vtkDataSet, >> which is my requirement. >> >> ```Python >> # Convert numpy array to VTK array (vtkFloatArray) >> vtk_data_array = numpy_support.numpy_to_vtk( >> num_array=ndarray.transpose(2, 1, 0).ravel(), # ndarray contains >> the fitting result from the points. It is a 3D array >> deep=True, >> array_type=vtk.VTK_FLOAT) >> >> # Convert the VTK array to vtkImageData >> img_vtk = vtk.vtkImageData() >> img_vtk.SetDimensions(ndarray.shape) >> img_vtk.SetSpacing(spacing[::-1]) >> img_vtk.GetPointData().SetScalars(vtk_data_array) >> >> # ? >> implicit_volume = vtk.vtkImplicitVolume() # I want a >> vtkImplicitDataSet, whose input is a vtkDataSet >> implicit_volume.SetVolume(img_vtk) >> ``` >> >> Because vtkImageData scales all points to positive integer values so that >> the rendering result mismatches the original points, I deem vtkDataSet or >> its subclass can do it. Anybody knows how to convert? >> >> Cheers, >> Quentan >> >> _______________________________________________ >> 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 hemla21 at gmail.com Tue Jul 21 03:09:46 2015 From: hemla21 at gmail.com (Hedieh Ebrahimi) Date: Tue, 21 Jul 2015 09:09:46 +0200 Subject: [vtkusers] Area of Intersection between a volume and a surface In-Reply-To: References: Message-ID: Hi Cory, Thanks for your reply. I was looking at the Python Bindings for VTK where I came across the following example. http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/PolygonIntersection The example above returns the intersection point of a line with a polygon if it exists. Im my case I need to know if a finite plane intersects with a volume ( hexahedron) and if so I will need to calculate the intersectional area. I was wondering if this is possible using VTK. I came across this example regarding Planes Intersection: http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/PlanesIntersection But still it is not what I exactly need. Does anybody know of any classes that will calculate the intersectional area. Please find attached an image I am sending with this email. Thank you very much in advance for your help. Best Regards, Hedieh On Mon, Jul 20, 2015 at 11:24 PM, Cory Quammen wrote: > Hi Hedieh, > > I'm not clear on what you are trying to compute. Do you have an image to > illustrate? > > Thanks, > Cory > > On Mon, Jul 20, 2015 at 10:40 AM, Hedieh Ebrahimi > wrote: > >> Dear all, >> >> I have a question. I am trying to calculate the intersection area between >> a hexahedron volume and a triangle surface. >> >> I came across the Python Bindings for VTK. I am wondering if there is any >> way to get the cross section between a hexahedron volume and a triangle >> surface. >> >> Second is there any way to calculate this cross-sectional area? >> >> I would really appreciate if you could please refer me to any classes or >> sample code to do this? >> >> Thank you very much in Advance for your help. >> >> Best Regards, >> Hedieh >> >> _______________________________________________ >> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: IntersectionalArea.jpg Type: image/jpeg Size: 41005 bytes Desc: not available URL: From quentan at gmail.com Tue Jul 21 03:58:16 2015 From: quentan at gmail.com (Quentan Qi) Date: Tue, 21 Jul 2015 08:58:16 +0100 Subject: [vtkusers] 3D numpy array to vtkDataSet In-Reply-To: References: <6276B1E8-FC45-4D0B-BF81-4CD0E7C84BFF@gmail.com> Message-ID: Dear Cory, Thank you so much for your explanation! My problem is solved! One more thing is the array order in the conversion from numpy array to vtkArray, which should change to [2, 0, 1] instead of [2, 1, 0]. It guarantees the rendering result will not be up-side-down or with other disordered results. ```Python vtk_array = numpy_support.numpy_to_vtk( num_array=quadric_2.transpose(2, 0, 1).ravel(), # was (2, 1, 0) deep=True, array_type=vtk.VTK_FLOAT) ``` It confused me actually that numpy has opposite array order against VTK, but here it seems not. What happened? Cheers, Quentan > On 21 Jul 2015, at 04:07, Cory Quammen wrote: > > Quentan, > > Thank you for posting the excellent code sample. With it, I could see what the problem was right away. > > The problem is that vtkImageData has the notion of an origin, and you are not setting it. By default, vtkImageData have a corner at (0, 0, 0), but your function in numpy starts at (-1, -1, -1). By not setting the origin to (-1, -1, -1), you are accidentally shifting your data. You'll need to set the origin in your vtk_image_data via > > vtk_image_data.SetOrigin(-1, -1, -1) > > You'll also need to figure out your vtk_image_data's spacing. For the x-component, this can be computed with > > (x_max - x_min) / (x_dim - 1) > > where x_{max, min} are the maximum and minimum x coordinate and x_dim is the number of voxels in the x direction. > > I hope that helps, > Cory > > > > On Sun, Jul 19, 2015 at 1:40 PM, Quentan Qi > wrote: > Dear Cory, > > I may fail to explain my problem, so I made an example to show what I want to express, as you suggested. https://github.com/quentan/Test_ImageData > > This example generates a quadric with its implicit form: F(x,y,z) = a0*x^2 + a1*y^2 + a2*z^2 + a3*x*y + a4*y*z + a5*x*z + a6*x + a7*y + a8*z + a9 > > The left viewport renders the quadric with vtkQuadric, which works perfectly. > > The right viewport renders the same quadric with a meshgrid generated with numpy. The meshgrid is converted to vtkFloatArray then to vtkImageData. Its shape is right, but locates at wrong position, which seems like it was scaled to some positive values. > > Note the small perpendicular coordinate lines in the corner. > > I guess the issue raises around line 120 - 123. If any other wrongs happen, point it for me, please. > > Cheers, > Quentan > > >> On 18 Jul 2015, at 15:09, Cory Quammen > wrote: >> >> Quentan, >> >> vtkImageData is in fact a subclass of vtkDataSet, so no conversion is needed. You said, "vtkImageData scales all points to positive integer values", but this should not be the case. Something strange is going on. >> >> Could you expand the code above into a complete example that can be run through vtkpython? That will make it easier to take a look. In particular, please add a part that shows the vtkImageData are being scaled to positive integers. It's fine if you fill the array with random values. >> >> Thanks, >> Cory >> >> >> On Sat, Jul 18, 2015 at 6:08 AM, Quentan Qi > wrote: >> Hi there, >> >> I am going to read a set of discrete 3D points (float value, not int value) and show both the points and the fitting surface via VTK?s implicit functions, say vtkImplicitVolume or vtkImplicitDataSet. >> >> It works fine of the numpy arrary to vtkImageData conversion in the following code, but is out of my mind how to convert it to vtkDataSet, which is my requirement. >> >> ```Python >> # Convert numpy array to VTK array (vtkFloatArray) >> vtk_data_array = numpy_support.numpy_to_vtk( >> num_array=ndarray.transpose(2, 1, 0).ravel(), # ndarray contains the fitting result from the points. It is a 3D array >> deep=True, >> array_type=vtk.VTK_FLOAT) >> >> # Convert the VTK array to vtkImageData >> img_vtk = vtk.vtkImageData() >> img_vtk.SetDimensions(ndarray.shape) >> img_vtk.SetSpacing(spacing[::-1]) >> img_vtk.GetPointData().SetScalars(vtk_data_array) >> >> # ? >> implicit_volume = vtk.vtkImplicitVolume() # I want a vtkImplicitDataSet, whose input is a vtkDataSet >> implicit_volume.SetVolume(img_vtk) >> ``` >> >> Because vtkImageData scales all points to positive integer values so that the rendering result mismatches the original points, I deem vtkDataSet or its subclass can do it. Anybody knows how to convert? >> >> Cheers, >> Quentan >> >> _______________________________________________ >> 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 cory.quammen at kitware.com Tue Jul 21 08:42:39 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 21 Jul 2015 08:42:39 -0400 Subject: [vtkusers] 3D numpy array to vtkDataSet In-Reply-To: References: <6276B1E8-FC45-4D0B-BF81-4CD0E7C84BFF@gmail.com> Message-ID: Quentan, Great, I'm glad that part is solved. Sorry, I don't know why the seemingly odd transpose arguments are needed that way. Maybe someone with more experience converting numpy arrays to VTK arrays can chime in. Thanks, Cory On Tue, Jul 21, 2015 at 3:58 AM, Quentan Qi wrote: > Dear Cory, > > Thank you so much for your explanation! My problem is solved! > > One more thing is the array order in the conversion from numpy array to > vtkArray, which should change to [2, 0, 1] instead of [2, 1, 0]. It > guarantees the rendering result will not be up-side-down or with other > disordered results. > > ```Python > vtk_array = numpy_support.numpy_to_vtk( > num_array=quadric_2.transpose(2, 0, 1).ravel(), # was (2, 1, 0) > deep=True, > array_type=vtk.VTK_FLOAT) > ``` > > It confused me actually that numpy has opposite array order against VTK, > but here it seems not. What happened? > > Cheers, > Quentan > > > On 21 Jul 2015, at 04:07, Cory Quammen wrote: > > Quentan, > > Thank you for posting the excellent code sample. With it, I could see what > the problem was right away. > > The problem is that vtkImageData has the notion of an origin, and you are > not setting it. By default, vtkImageData have a corner at (0, 0, 0), but > your function in numpy starts at (-1, -1, -1). By not setting the origin to > (-1, -1, -1), you are accidentally shifting your data. You'll need to set > the origin in your vtk_image_data via > > vtk_image_data.SetOrigin(-1, -1, -1) > > You'll also need to figure out your vtk_image_data's spacing. For the > x-component, this can be computed with > > (x_max - x_min) / (x_dim - 1) > > where x_{max, min} are the maximum and minimum x coordinate and x_dim is > the number of voxels in the x direction. > > I hope that helps, > Cory > > > > On Sun, Jul 19, 2015 at 1:40 PM, Quentan Qi wrote: > >> Dear Cory, >> >> I may fail to explain my problem, so I made an example >> to show what I want to >> express, as you suggested. https://github.com/quentan/Test_ImageData >> >> This example generates a quadric with its implicit form: F(x,y,z) = >> a0*x^2 + a1*y^2 + a2*z^2 + a3*x*y + a4*y*z + a5*x*z + a6*x + a7*y + a8*z + >> a9 >> >> The left viewport renders the quadric with vtkQuadric, which works >> perfectly. >> >> The right viewport renders the same quadric with a meshgrid generated >> with numpy. The meshgrid is converted to vtkFloatArray then to >> vtkImageData. Its shape is right, but locates at wrong position, which >> seems like it was scaled to some positive values. >> >> Note the small perpendicular coordinate lines in the corner. >> >> I guess the issue raises around line 120 - 123. If any other wrongs >> happen, point it for me, please. >> >> Cheers, >> Quentan >> >> >> On 18 Jul 2015, at 15:09, Cory Quammen wrote: >> >> Quentan, >> >> vtkImageData is in fact a subclass of vtkDataSet, so no conversion is >> needed. You said, "vtkImageData scales all points to positive integer >> values", but this should not be the case. Something strange is going on. >> >> Could you expand the code above into a complete example that can be run >> through vtkpython? That will make it easier to take a look. In particular, >> please add a part that shows the vtkImageData are being scaled to positive >> integers. It's fine if you fill the array with random values. >> >> Thanks, >> Cory >> >> >> On Sat, Jul 18, 2015 at 6:08 AM, Quentan Qi wrote: >> >>> Hi there, >>> >>> I am going to read a set of discrete 3D points (float value, not int >>> value) and show both the points and the fitting surface via VTK?s implicit >>> functions, say vtkImplicitVolume or vtkImplicitDataSet. >>> >>> It works fine of the numpy arrary to vtkImageData conversion in the >>> following code, but is out of my mind how to convert it to vtkDataSet, >>> which is my requirement. >>> >>> ```Python >>> # Convert numpy array to VTK array (vtkFloatArray) >>> vtk_data_array = numpy_support.numpy_to_vtk( >>> num_array=ndarray.transpose(2, 1, 0).ravel(), # ndarray >>> contains the fitting result from the points. It is a 3D array >>> deep=True, >>> array_type=vtk.VTK_FLOAT) >>> >>> # Convert the VTK array to vtkImageData >>> img_vtk = vtk.vtkImageData() >>> img_vtk.SetDimensions(ndarray.shape) >>> img_vtk.SetSpacing(spacing[::-1]) >>> img_vtk.GetPointData().SetScalars(vtk_data_array) >>> >>> # ? >>> implicit_volume = vtk.vtkImplicitVolume() # I want a >>> vtkImplicitDataSet, whose input is a vtkDataSet >>> implicit_volume.SetVolume(img_vtk) >>> ``` >>> >>> Because vtkImageData scales all points to positive integer values so >>> that the rendering result mismatches the original points, I deem vtkDataSet >>> or its subclass can do it. Anybody knows how to convert? >>> >>> Cheers, >>> Quentan >>> >>> _______________________________________________ >>> 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. > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Jul 21 10:57:19 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 21 Jul 2015 10:57:19 -0400 Subject: [vtkusers] some queries with vtkcellarrays In-Reply-To: References: Message-ID: 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::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 fotosentido at gmail.com Tue Jul 21 11:16:36 2015 From: fotosentido at gmail.com (Marcos) Date: Tue, 21 Jul 2015 17:16:36 +0200 Subject: [vtkusers] Configuring VTK with Qt5 In-Reply-To: References: <1437418956611-5732999.post@n5.nabble.com> Message-ID: Ok, I saw the "Advanced" checkbox in Cmake-gui, and checking it I got the VTK_QT_VERSION I was looking for. And then, setting it to 5 resolved the problem. Thank you again 2015-07-20 22:01 GMT+02:00 Marcos : > The thing is I don't see the VTK_QT_VERSION option in Cmake (I remember > seeing it in older VTK versions). > > It fills the QT_QMAKE_EXECUTABLE by itself. > > I tried inserting manually the variables > VTK_QT_VERSION > QT_DIR > > and also setting environment variables. > > But it insists on looking for a Qt4 version: > C:/Qt/5.4/msvc2013_opengl/bin/qmake.exe, this code requires Qt 4.x > > If I uncheck VTK_Group_Qt, everything is alright, of course. > But I need the QT widget. > > Thanks for your time. > > > 2015-07-20 21:02 GMT+02:00 Drak : > >> see this: >> >> http://stackoverflow.com/questions/30892773/building-vtk-with-qt5-windows-8/30894401#30894401 >> >> change VK_QT_VERSION to 5 in your cmake >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Configuring-VTK-with-Qt5-tp5732998p5732999.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 Tue Jul 21 11:23:35 2015 From: draktharrblorf at gmail.com (Drak) Date: Tue, 21 Jul 2015 08:23:35 -0700 (MST) Subject: [vtkusers] Need all cpp and header files In-Reply-To: <1437386431127-5732983.post@n5.nabble.com> References: <1437386431127-5732983.post@n5.nabble.com> Message-ID: <1437492215894-5733013.post@n5.nabble.com> https://github.com/Kitware/VTK -- View this message in context: http://vtk.1045678.n5.nabble.com/Need-all-cpp-and-header-files-tp5732983p5733013.html Sent from the VTK - Users mailing list archive at Nabble.com. From jeffrey.c.becker at nasa.gov Tue Jul 21 12:14:06 2015 From: jeffrey.c.becker at nasa.gov (Jeff Becker) Date: Tue, 21 Jul 2015 09:14:06 -0700 Subject: [vtkusers] [Paraview] Combining vtk and paraview python scripts In-Reply-To: References: <55A55C2C.2030107@nasa.gov> <55A56672.3040204@nasa.gov> <55AD3918.3030808@nasa.gov> Message-ID: <55AE6FCE.2010407@nasa.gov> On 07/20/2015 05:43 PM, Berk Geveci wrote: > You probably need to update vtkImageExport and shallow copy its output > to the programmable source's output. You also need to add something to > the RequestInformation setting the whole extent. You need something like: > > from paraview import util > util.SetOutputWholeExtent(self, [0,nx-1,0,ny-1,0,nz-1]) > > By the way, there are better ways of getting numpy arrays into VTK > than the image import stuff. See some of the earlier blogs here: Right. I found the RequestInformation info above from searching the web. Then I was able to follow the instructions in the ParaView Guide section 13.2.4 Reading binary 2D image. I basically replaced the image import stuff with code analogous to the output assignment, Thanks for your help. -jeff > > http://www.kitware.com/blog/home/user/53/2 > > Best, > -berk > > On Mon, Jul 20, 2015 at 2:08 PM, Jeff Becker > > wrote: > > Hi, > > On 07/18/2015 05:17 PM, Berk Geveci wrote: >> To elaborate on what Andy said, you can stick your entire VTK >> script in side the programmable source. Which you can use in >> batch mode as well. If you want to keep your VTK script as a >> reusable code, I recommend making it a module that you import >> from the programmable source. > > So if the last thing my VTK script does is set up a vtkImageImport > object should that work as a programmable source (I tried but > ParaView didn't get any bounds or scalar field name even though I > set them up)? If not, what else do I need to do? Thanks. > > -jeff > > >> >> Best, >> -berk >> >> On Tue, Jul 14, 2015 at 3:43 PM, Jeff Becker >> > wrote: >> >> On 07/14/2015 12:20 PM, Andy Bauer wrote: >>> ParaView's Python Programmable Filter and Python >>> Programmable Source use VTK Python wrapping to do the work >>> while making it available in Paraview. Check out >>> http://www.paraview.org/Wiki/Python_Programmable_Filter. >> >> Thanks. That's pretty neat, but what I'd really like is a >> standalone script I can run in batch mode (no interaction) to >> generate one png file per timestep for all the timesteps in >> the data set. Essentially I'd like a way to construct a >> pipeline between the vtk.vtkImageImport() object and the >> ParaView renderView1. >> >> -jeff >> >>> >>> On Tue, Jul 14, 2015 at 2:59 PM, Jeff Becker >>> >> > wrote: >>> >>> Hi. >>> >>> As a proof of concept, I have a vtk script that reads >>> some binary data, and produces a vti file. I then have a >>> second script that I generated using ParaView's tracing >>> facility while viewing the data. Now I'd like to combine >>> them, so as to eliminate the intermediate file, i.e., go >>> from binary data directly to rendering. To be specific, >>> my vtk script ends like this: >>> >>> steinbmag = steinbmag.reshape(nx,ny,nz).T >>> >>> vtkImporter = vtk.vtkImageImport() >>> vtkImporter.CopyImportVoidPointer(steinbmag, >>> steinbmag.nbytes) >>> >>> vtkImporter.SetDataScalarTypeToFloat() >>> vtkImporter.SetNumberOfScalarComponents(1) >>> vtkImporter.SetDataExtent(0, nx-1, 0, ny-1, 0, nz-1) >>> vtkImporter.SetWholeExtent(0, nx-1, 0, ny-1, 0, nz-1) >>> vtkImporter.SetScalarArrayName('B field magnitude') >>> >>> writer=vtk.vtkXMLImageDataWriter() >>> writer.SetFileName(out_fname) >>> writer.SetInputConnection(vtkImporter.GetOutputPort()) >>> writer.Write() >>> >>> and the ParaView script starts like this: >>> >>> from paraview.simple import * >>> >>> paraview.simple._DisableFirstRenderCameraReset() >>> >>> filepfx = '/nobackup/jcbecker/steinBmag_0' >>> infile = filepfx+'.vti' >>> # create a new 'XML Image Data Reader' >>> steinBmag_ = XMLImageDataReader(FileName=infile) >>> steinBmag_.CellArrayStatus = [] >>> steinBmag_.PointArrayStatus = ['B field magnitude'] >>> >>> # get animation scene >>> animationScene1 = GetAnimationScene() >>> >>> # update animation scene based on data timesteps >>> animationScene1.UpdateAnimationUsingDataTimeSteps() >>> >>> # get active view >>> renderView1 = GetActiveViewOrCreate('RenderView') >>> # uncomment following to set a specific view size >>> renderView1.ViewSize = [1090, 761] >>> >>> I'm looking at the VTK examples and pvpython >>> documentation, but any help is appreciated. >>> >>> Thanks. >>> >>> -jeff >>> _______________________________________________ >>> 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 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 cory.quammen at kitware.com Tue Jul 21 13:18:00 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 21 Jul 2015 13:18:00 -0400 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1437430956334-5733002.post@n5.nabble.com> References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> Message-ID: Is your application and VTK built in 32-bit or 64-bit mode? You should always build in 64-bit mode when working with image data like this because typically the 32-bit address space is not large enough to hold the data. What operating system are you running? On Mon, Jul 20, 2015 at 6:22 PM, Neel007 wrote: > Dear Cory, > > Please disregard the previous post. I was doing a silly mistake of not > including the "threshold->Update();" statement thus the threshold operation > wasn't performing. After including the statement the vtkThreshold is > working > and giving me outputs: Code & plots are attached: > > *Code:* > // Start by loading some data. > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileNameSliceOffset(1); > reader->SetFileNameSliceSpacing(1); > > > reader->SetFilePattern("S:\\GSoC_2015_Implementation\\test_images\\2.%d.bspline.tif"); > reader->SetDataExtent(0, 63, 0, 63, 1, 125); > > reader->SetOrientationType(3); > reader->Update(); > > vtkSmartPointer threshold = > vtkSmartPointer::New(); > threshold->SetInputConnection(reader->GetOutputPort()); > threshold->ThresholdByUpper(1); > > //threshold->SetInputArrayToProcess(0, 0, 0, > vtkDataObject::FIELD_ASSOCIATION_POINTS, "index"); > threshold->Update(); > vtkUnstructuredGrid* thresholdedPolydata = threshold->GetOutput(); > std::cout << "There are " << thresholdedPolydata->GetNumberOfCells() > << " cells after thresholding." << std::endl; > > //Visualization UnstructuredGrid after threshold > > > // Create a mapper and actor > vtkSmartPointer mapper = > vtkSmartPointer::New(); > > mapper->SetInputData(thresholdedPolydata); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > actor->GetProperty()->SetColor(1.0, 0.0, 0.0); > actor->GetProperty()->SetRepresentationToWireframe(); > actor->GetProperty()->SetLineWidth(5); > > // Create a renderer, render window, and interactor > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > // Add the actors to the scene > renderer->AddActor(actor); > //renderer->AddActor(sphereActor); > renderer->SetBackground(.1, .5, .8);; // Background color white > > // Render and interact > renderWindow->Render(); > renderWindowInteractor->Start(); > > *Plot of Unstructured grid using vtkThreshold :* > > > > /***** Issue****/ *But I am facing some memory related problem, I have > total > 551 images (series/ stack) out of which only 125 images are loading in my > PC > (16 GB memory installed) while using vtkThreshold anything more than that > throwing error related Memory overloading, error window shown below. Please > suggest me how to handle this memory allocation problem :* > > ""ERROR: In f:\vtk\vtk-6.2.0\common\core\vtkDataArrayTemplate.txx, line 142 > vtkIdTypeArray (0000000001C83C90): Unable to allocate 996245250 elements of > size 8 bytes. > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733002.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 sur.chiranjib at gmail.com Tue Jul 21 13:24:18 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Tue, 21 Jul 2015 22:54:18 +0530 Subject: [vtkusers] some queries with vtkcellarrays In-Reply-To: References: Message-ID: 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::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 stephenshamilton at gmail.com Tue Jul 21 13:31:34 2015 From: stephenshamilton at gmail.com (Stephen Hamilton) Date: Tue, 21 Jul 2015 13:31:34 -0400 Subject: [vtkusers] Time series in a VTI Message-ID: I'm trying to built a single VTI file with multiple time steps, and I can't quite figure it out. I have data that is in image data format, and I can save that as a single VTI file. I would like to iterate through multiple images and save them to a single VTI file that would show up in ParaView as an image with multiple time steps. I've been able to append them together along an axis with vtkImageAppend (see below), but that isn't exactly what I need. Here is a snip of the code I have now: writer = vtk.vtkXMLImageDataWriter() writer.SetTimeStepRange(ts,te) writer.SetNumberOfTimeSteps(te-ts) writer.SetFileName(tmp.name) a = vtk.vtkImageAppend() for timestep in range(ts,te): image = odbccutout.OdbcCutout().getvtkimage(webargs,timestep) a.AddInputData(image) a.Update() writer.SetInputData(a.GetOutput()) writer.Write() Any help would be appreciated! Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From sayanmaity.10 at gmail.com Tue Jul 21 13:46:31 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Tue, 21 Jul 2015 10:46:31 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> Message-ID: <1437500791052-5733022.post@n5.nabble.com> Hi Cory, Thanks a lot for your reply. I have build VTK using CMake in Windows: Using 'Visual Studio 10 win 64' generator & also the Visual Studio project is configured in 'x64' Debug mode. Please let me know if I should check something else. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733022.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Jul 21 14:18:24 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 21 Jul 2015 14:18:24 -0400 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1437500791052-5733022.post@n5.nabble.com> References: <1436564919015-5732834.post@n5.nabble.com> <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> Message-ID: Well, let's see, it is failing to allocate a buffer of size 7.4 GB. On a 16 GB system, that seems plausible. One of the difficulties with applying the vtkThreshold filter to a vtkImageData is that the entire image is converted to a tetrahedral mesh before the thresholding is applied. No doubt there is a more memory efficient way to operate, but that is how things are implemented at the moment. If the object in your image occupies a relatively small portion of the image, you could first try to extract just the volume in which the object resides with vtkExtractVOI, then apply the vtkThreshold filter to the output of vtkExtractVOI. HTH, Cory On Tue, Jul 21, 2015 at 1:46 PM, Neel007 wrote: > Hi Cory, > > Thanks a lot for your reply. > > I have build VTK using CMake in Windows: Using 'Visual Studio 10 win 64' > generator & also the Visual Studio project is configured in 'x64' Debug > mode. > > Please let me know if I should check something else. > > Thanks. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733022.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 sayanmaity.10 at gmail.com Tue Jul 21 14:31:13 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Tue, 21 Jul 2015 11:31:13 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> Message-ID: <1437503473719-5733024.post@n5.nabble.com> Hi Cory, Thanks a lot, I will try using "vtkExtractVOI" to see if it can perform the thresholding operation in more memory efficient way. Just wondering "vtkExtractVOI" will extract the least possible volume that contains the object right based on the "setVOI" coordinated manually set by the user right? Is there any way to get the extent of the object in the entire 3D volume from the output of the 3D tiff reader? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733024.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Jul 21 14:44:56 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 21 Jul 2015 14:44:56 -0400 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1437503473719-5733024.post@n5.nabble.com> References: <1436566813503-5732836.post@n5.nabble.com> <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> <1437503473719-5733024.post@n5.nabble.com> Message-ID: > Is there any way to get the extent of the object in the > entire 3D volume from the output of the 3D tiff reader? > That would be useful, but not that I know of. > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733024.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 sayanmaity.10 at gmail.com Tue Jul 21 14:46:53 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Tue, 21 Jul 2015 11:46:53 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> <1437503473719-5733024.post@n5.nabble.com> Message-ID: <1437504413266-5733026.post@n5.nabble.com> Okay, no problem. Will keep you posted and ask if got stuck somewhere. Thanks again for your time. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733026.html Sent from the VTK - Users mailing list archive at Nabble.com. From maxim.p.kochukov at gmail.com Tue Jul 21 17:33:56 2015 From: maxim.p.kochukov at gmail.com (Maxim Kochukov) Date: Wed, 22 Jul 2015 00:33:56 +0300 Subject: [vtkusers] [VTK-users] Spline approximation Message-ID: Hello everyone. I have a point cloud that represents some closed contour. Is there any filters in VTK which can perform a polynomial approximation of these points?? I tried to use vtkParametricSpline, but seems like it is for interpolation only. Thanks in advance. Maxim. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tr_jun-jiang.ee at vitrox.com Tue Jul 21 21:04:00 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Tue, 21 Jul 2015 18:04:00 -0700 (MST) Subject: [vtkusers] Smooth out surfaces generated from vtkMarchingCubes Message-ID: <1437527040274-5733028.post@n5.nabble.com> Hi all, I have generated a few 3D mesh from volume data using vtkMarchingCubes, but the surfaces seem to appear blocky and i will like to have a smoother version of the 3D mesh. However, the blockiness might down to the image quality of the volume data. Thus, my question is, do we have any features in VTK that might help in smoothing out the surfaces?? -- View this message in context: http://vtk.1045678.n5.nabble.com/Smooth-out-surfaces-generated-from-vtkMarchingCubes-tp5733028.html Sent from the VTK - Users mailing list archive at Nabble.com. From lihouxing at yeah.net Tue Jul 21 21:45:52 2015 From: lihouxing at yeah.net (lee) Date: Tue, 21 Jul 2015 18:45:52 -0700 (MST) Subject: [vtkusers] use one polydata to clip another polydata Message-ID: <1437529552425-5733029.post@n5.nabble.com> Hi all, Recently I need to use one polydata to clip another polydata. I try to use vtkclippolydata and vtkImplicitDataSet as the implicit function, but I failed to get the result. The same problem happened many years ago in this Message:http://vtk.1045678.n5.nabble.com/Problem-with-vtkClipPolyData-tc3192520.html that message mentioned a solution of using a third party lib which can be found from this link http://www.insight-journal.org/browse/publication/726, but I cannot compile the gts and glib as it mentioned. So anyone knows how to solve this problem? Any advice would be appriciated! Many thanks! Lee -- View this message in context: http://vtk.1045678.n5.nabble.com/use-one-polydata-to-clip-another-polydata-tp5733029.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Jul 21 22:33:18 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 21 Jul 2015 22:33:18 -0400 Subject: [vtkusers] use one polydata to clip another polydata In-Reply-To: <1437529552425-5733029.post@n5.nabble.com> References: <1437529552425-5733029.post@n5.nabble.com> Message-ID: See http://www.vtk.org/doc/release/6.2/html/classvtkBooleanOperationPolyDataFilter.html On Tue, Jul 21, 2015 at 9:45 PM, lee wrote: > Hi all, > Recently I need to use one polydata to clip another polydata. I try to > use > vtkclippolydata and vtkImplicitDataSet as the implicit function, but I > failed to get the result. The same problem happened many years ago in this > Message: > http://vtk.1045678.n5.nabble.com/Problem-with-vtkClipPolyData-tc3192520.html > > that message mentioned a solution of using a third party lib which can be > found from this link http://www.insight-journal.org/browse/publication/726 > , > but I cannot compile the gts and glib as it mentioned. > > So anyone knows how to solve this problem? Any advice would be appriciated! > > Many thanks! > > Lee > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/use-one-polydata-to-clip-another-polydata-tp5733029.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 lihouxing at yeah.net Tue Jul 21 22:38:22 2015 From: lihouxing at yeah.net (lee) Date: Tue, 21 Jul 2015 19:38:22 -0700 (MST) Subject: [vtkusers] use one polydata to clip another polydata In-Reply-To: References: <1437529552425-5733029.post@n5.nabble.com> Message-ID: <1437532702730-5733032.post@n5.nabble.com> thanks for your response! I will try this method~ -- View this message in context: http://vtk.1045678.n5.nabble.com/use-one-polydata-to-clip-another-polydata-tp5733029p5733032.html Sent from the VTK - Users mailing list archive at Nabble.com. From lihouxing at yeah.net Tue Jul 21 23:26:20 2015 From: lihouxing at yeah.net (lee) Date: Tue, 21 Jul 2015 20:26:20 -0700 (MST) Subject: [vtkusers] use one polydata to clip another polydata In-Reply-To: References: <1437529552425-5733029.post@n5.nabble.com> Message-ID: <1437535580421-5733034.post@n5.nabble.com> Hi Cory, I tried this class,but when I do it crushed when I apply Updata() function, My code is as follow: m_Cliper->SetInputData(0,m_input);//m_input is a polydata m_Cliper->SetInputData(1,m_turbe);//m_turbe is another polydata m_Cliper->SetOperationToUnion(); m_Cliper->Update(); m_output->DeepCopy(m_Cliper->GetOutput(0)); outputData->DeepCopy(m_output); Do your have any idear? Is it because the data is two complicated? m_input is 40M, and m_turbe is 3k. -- View this message in context: http://vtk.1045678.n5.nabble.com/use-one-polydata-to-clip-another-polydata-tp5733029p5733034.html Sent from the VTK - Users mailing list archive at Nabble.com. From tdinar at gmail.com Wed Jul 22 01:13:32 2015 From: tdinar at gmail.com (tariq) Date: Tue, 21 Jul 2015 22:13:32 -0700 (MST) Subject: [vtkusers] tdinar@gmail.com Message-ID: <1437542012001-5733035.post@n5.nabble.com> Hi, I am a newbie to vtk, and I have been trying to visualize an unstructured grid with the aid of vtkGeometryFilter to convert a polyhedron (unStructuredGrid) into vtkPolyData. Then compute the Normals and use a Lookup table to plot the data. The one polyhedron in my code would not show up. The code is pasted below and I am all ears. Thanks. TQ. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main( int, char*[] ) { // create polyhedron (cube) vtkIdType pointIds[8] = {0, 1, 2, 3, 4, 5, 6, 7}; vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(-1.0,-1.0,-1.0); points->InsertNextPoint( 1.0,-1.0,-1.0); points->InsertNextPoint( 1.0, 1.0,-1.0); points->InsertNextPoint(-1.0, 1.0,-1.0); points->InsertNextPoint(-1.0,-1.0, 1.0); points->InsertNextPoint( 1.0,-1.0, 1.0); points->InsertNextPoint( 1.0, 1.0, 1.0); points->InsertNextPoint(-1.0, 1.0, 1.0); vtkSmartPointer faces = vtkSmartPointer::New(); vtkIdType face0[4] = {0, 3, 2, 1}; vtkIdType face1[4] = {0, 4, 7, 3}; vtkIdType face2[4] = {4, 5, 6, 7}; vtkIdType face3[4] = {5, 1, 2, 6}; vtkIdType face4[4] = {0, 1, 5, 4}; vtkIdType face5[4] = {2, 3, 7, 6}; faces->InsertNextCell(4, face0); faces->InsertNextCell(4, face1); faces->InsertNextCell(4, face2); faces->InsertNextCell(4, face3); faces->InsertNextCell(4, face4); faces->InsertNextCell(4, face5); vtkSmartPointer ugrid = vtkSmartPointer::New(); ugrid->SetPoints(points); ugrid->InsertNextCell( VTK_POLYHEDRON, 8, pointIds, 6, faces->GetPointer()); // Extract poly data from unsturctured Grid vtkSmartPointer Filter1= vtkSmartPointer::New(); Filter1->SetInputData(ugrid); Filter1->Update(0); vtkSmartPointer Filter2= vtkSmartPointer::New(); Filter2->SetInputConnection(0,Filter1->GetOutputPort(0)); Filter2->Update(0); // Calculate normals vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetFeatureAngle(60); normals->SetInputConnection(0,Filter2->GetOutputPort(0)); normals->Update(0); //Setup lookup table vtkSmartPointer lut= vtkSmartPointer::New(); lut->SetHueRange(0.0, 100); // initiate mapper vtkSmartPointer mapper= vtkSmartPointer::New(); mapper->SetInputConnection(0,normals->GetOutputPort(0)); mapper->SetLookupTable(lut); mapper->SetScalarRange(0.12, 0.6); vtkSmartPointer actor= vtkSmartPointer::New(); // Initiate Actor actor->SetMapper(mapper); actor->SetPosition(0.0, 0.0, 0.0); // Create a renderer, render window, and interactor vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->ResetCamera(); renderer->ResetCameraClippingRange(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); // Add the actor to the scene renderer->AddActor(actor); renderer->SetBackground(.2, .3, .4); // Render and interact renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/tdinar-gmail-com-tp5733035.html Sent from the VTK - Users mailing list archive at Nabble.com. From anuwat_boy at yahoo.com Wed Jul 22 06:25:04 2015 From: anuwat_boy at yahoo.com (Anuwat Dechvijankit) Date: Wed, 22 Jul 2015 10:25:04 +0000 (UTC) Subject: [vtkusers] problem on depth peeling rendering with multiple renderers Message-ID: <1843924189.255683.1437560704475.JavaMail.yahoo@mail.yahoo.com> Hi all, I have a problem with depth peeling rendering using vtk 6.2To generate this problem, i took code based on example of?http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MultipleViewports When I enabled depth peeling feature, only lower left corner render could be visible.? Is it a bug or limitation of depth peeling? best regards, Anuwat ---- CODE----#include #include #include #include #include #include #include #include #include ?#include ?int main(int, char *[]){? vtkSmartPointer renderWindow =?? ? vtkSmartPointer::New();?? vtkSmartPointer renderWindowInteractor =?? ? vtkSmartPointer::New(); renderWindow->SetAlphaBitPlanes(1); renderWindow->SetMultiSamples(0);? renderWindowInteractor->SetRenderWindow(renderWindow);?? // Define viewport ranges? double xmins[4] = {0,.5,0,.5};? double xmaxs[4] = {0.5,1,0.5,1};? double ymins[4] = {0,0,.5,.5};? double ymaxs[4]= {0.5,0.5,1,1};? for(unsigned i = 0; i < 4; i++)? ? {? ? vtkSmartPointer renderer =?? ? ? vtkSmartPointer::New();?? ? renderWindow->AddRenderer(renderer);? ? renderer->SetViewport(xmins[i],ymins[i],xmaxs[i],ymaxs[i]);?? ? // Create a sphere? ? vtkSmartPointer sphereSource =?? ? ? vtkSmartPointer::New();? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? sphereSource->SetRadius(5);? ? sphereSource->Update();?? ? // Create a mapper and actor? ? vtkSmartPointer mapper =?? ? ? vtkSmartPointer::New();? ? mapper->SetInputConnection(sphereSource->GetOutputPort());? ? vtkSmartPointer actor = vtkSmartPointer::New();? ? actor->SetMapper(mapper); actor->GetProperty()->SetOpacity(0.5);? ? renderer->AddActor(actor);? ? renderer->ResetCamera(); renderer->SetUseDepthPeeling(1); renderer->SetMaximumNumberOfPeels(100); renderer->SetOcclusionRatio(0.0);? ?? renderWindow->Render(); ? ? renderWindow->SetWindowName("Multiple ViewPorts");? ? }?? renderWindowInteractor->Start();?? return EXIT_SUCCESS;} -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.manobala2009 at gmail.com Wed Jul 22 06:35:49 2015 From: t.manobala2009 at gmail.com (Mano) Date: Wed, 22 Jul 2015 16:05:49 +0530 Subject: [vtkusers] Dicom Images Message-ID: hi to all am very new to vtk and now am trying to get serial Dicom images. I got some examples form vtk.org. But in my code i can't get images serially form the directory and i am getting only 1st image of the directory ,i had attached the code plz find out my error and give better solution , Thank you , Manobala.T. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Serial DICOM Images Type: application/octet-stream Size: 5430 bytes Desc: not available URL: From sankhesh.jhaveri at kitware.com Wed Jul 22 09:16:45 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 22 Jul 2015 09:16:45 -0400 Subject: [vtkusers] some queries with vtkcellarrays In-Reply-To: References: Message-ID: 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 ishan.tembhekar at caltech.edu Wed Jul 22 13:00:21 2015 From: ishan.tembhekar at caltech.edu (Ishan Tembhekar) Date: Wed, 22 Jul 2015 10:00:21 -0700 Subject: [vtkusers] Writing a rotated vtkcubesource in a .vtp file Message-ID: Hello everyone, I am new to using VTK and to this forum. I have tried searching for an answer for this issue for a while and wanted some help. I am writing a code in c++ that generates an output of a cube and stores it in a .vtp file. The code is as follows: (The variables center, _widthOfBottomFace, _widthOfSideFace, _widthInZDirection are defined elsewhere) vtkSmartPointer cubeSource = vtkSmartPointer::New(); //set dimensions of cube cubeSource->SetCenter(center[0], center[1], center[2]); cubeSource->SetXLength(_widthOfBottomFace); cubeSource->SetYLength(_widthOfSideFace); cubeSource->SetZLength(_widthInZDirection); cubeSource->Update(); //rotate the cube now vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputData(cubeSource->GetOutput()); vtkActor* actor = vtkActor::New(); actor->SetMapper(mapper); actor->SetOrigin(cubeSource->GetCenter()); actor->RotateZ(1); //create the writer vtkSmartPointer writer = vtkSmartPointer::New(); // Build the filename char buffer[500]; sprintf(buffer, "%06u", fileIndex); string filename =string("CuboidalIndenter_") + string(buffer) + string(".vtp"); //printf("writing file to %s\n", filename.c_str()); writer->SetFileName(filename.c_str()); writer->SetInputConnection(cubeSource->GetOutputPort()); // write the vtk file writer->SetDataModeToBinary(); int result = writer->Write(); if (result != 1) { printf("Error writing cuboidal indenter vtk file\n"); I want to have the rotated cube as the output and currently I am using the object cubeSource which does not give me the rotated cube. Can someone tell me how I can write out the rotated cube ? Thank you so much! -Ishan -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jul 22 13:05:06 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 22 Jul 2015 13:05:06 -0400 Subject: [vtkusers] Writing a rotated vtkcubesource in a .vtp file In-Reply-To: References: Message-ID: Ishan, The actor->RotateZ(1); call rotates only the visible representation of the cube, not the actual points that define the cube. Use vtkTransformPolyDataFilter [1] to transform the cube source and save the output of the transform filter. [1] http://www.vtk.org/doc/release/6.2/html/classvtkTransformPolyDataFilter.html HTH, Cory On Wed, Jul 22, 2015 at 1:00 PM, Ishan Tembhekar < ishan.tembhekar at caltech.edu> wrote: > Hello everyone, > > I am new to using VTK and to this forum. I have tried searching for an > answer for this issue for a while and wanted some help. > > I am writing a code in c++ that generates an output of a cube and stores > it in a .vtp file. The code is as follows: (The variables center, > _widthOfBottomFace, _widthOfSideFace, _widthInZDirection are defined > elsewhere) > > vtkSmartPointer cubeSource = > vtkSmartPointer::New(); > > //set dimensions of cube > cubeSource->SetCenter(center[0], center[1], center[2]); > cubeSource->SetXLength(_widthOfBottomFace); > cubeSource->SetYLength(_widthOfSideFace); > cubeSource->SetZLength(_widthInZDirection); > cubeSource->Update(); > > //rotate the cube now > vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); > mapper->SetInputData(cubeSource->GetOutput()); > > vtkActor* actor = vtkActor::New(); > actor->SetMapper(mapper); > actor->SetOrigin(cubeSource->GetCenter()); > > actor->RotateZ(1); > > > //create the writer > vtkSmartPointer writer = > vtkSmartPointer::New(); > > // Build the filename > char buffer[500]; > sprintf(buffer, "%06u", fileIndex); > string filename =string("CuboidalIndenter_") + > string(buffer) + string(".vtp"); > > //printf("writing file to %s\n", filename.c_str()); > writer->SetFileName(filename.c_str()); > writer->SetInputConnection(cubeSource->GetOutputPort()); > > > // write the vtk file > writer->SetDataModeToBinary(); > int result = writer->Write(); > if (result != 1) { > printf("Error writing cuboidal indenter vtk file\n"); > > > I want to have the rotated cube as the output and currently I am using the > object cubeSource which does not give me the rotated cube. > Can someone tell me how I can write out the rotated cube ? > > Thank you so much! > > -Ishan > > _______________________________________________ > 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 wumengda at gmail.com Wed Jul 22 13:17:33 2015 From: wumengda at gmail.com (Mengda Wu) Date: Wed, 22 Jul 2015 13:17:33 -0400 Subject: [vtkusers] vtkXMLDataElement::GetCharacterData fails for a large data in a XML file Message-ID: Hi All, I am trying to read a dataarray (>50000 coordinates) from a generic XML file (not the vtk xml file). It looks like this -19.92780000 -189.56800000 1276.60750000 -8.42000000 -179.22460000 1287.58500000 -25.75580000 -173.91110000 1267.89400000 -14.17970000 -189.38230000 1280.66000000 ... ... Unfortunately, vtkXMLDataElement::GetCharacterData gives me nothing. I think it is because the vtkXMLDataParser does not save the data. I also tried the "parser->SetIgnoreCharacterData(0)" as suggested by the previous posts in this mainling list. But it does not work either. I am wondering what is the good way to read this data. I am looking at "vtkXMLDataParser::ReadInlineData". But I cannot figure out how I should pass the parameters. Thanks, Mengda -------------- next part -------------- An HTML attachment was scrubbed... URL: From ishan.tembhekar at caltech.edu Wed Jul 22 13:58:28 2015 From: ishan.tembhekar at caltech.edu (ishantembhekar) Date: Wed, 22 Jul 2015 10:58:28 -0700 (MST) Subject: [vtkusers] Writing a rotated vtkcubesource in a .vtp file In-Reply-To: References: Message-ID: <1437587908447-5733047.post@n5.nabble.com> Hi Cory, Thank you so much for your immediate response! The vtkTransformPolyDataFilter worked and it now gives me a rotated cube. I replaced the mapper and the actor with the following lines: //create a rotation object vtkSmartPointer rotation = vtkSmartPointer::New(); //the angle is measured in degrees for some reason rotation->RotateZ(45.); //use this rotation object in a transformFilter vtkSmartPointer transformFilter = vtkSmartPointer::New(); transformFilter->SetInputConnection(cubeSource->GetOutputPort()); transformFilter->SetTransform(rotation); transformFilter->Update(); However, it is rotating about the z-axis and the origin (as shown in the image I attached). What can I do for it to rotate about the center of the cube? I tried using SetCenter for both the vtkTransform and the PolyDataFilter but they do not have that method. Any ideas? Thanks once again! -Ishan -- View this message in context: http://vtk.1045678.n5.nabble.com/Writing-a-rotated-vtkcubesource-in-a-vtp-file-tp5733044p5733047.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Jul 22 14:18:30 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 22 Jul 2015 14:18:30 -0400 Subject: [vtkusers] Writing a rotated vtkcubesource in a .vtp file In-Reply-To: <1437587908447-5733047.post@n5.nabble.com> References: <1437587908447-5733047.post@n5.nabble.com> Message-ID: You'll need to translate your cube by the negated center of the cube, then rotate. You can do this all in the same vtkTransform object. - Cory On Wed, Jul 22, 2015 at 1:58 PM, ishantembhekar wrote: > < > http://vtk.1045678.n5.nabble.com/file/n5733047/Screen_Shot_2015-07-22_at_10.png > > > > Hi Cory, > > Thank you so much for your immediate response! The > vtkTransformPolyDataFilter worked and it now gives me a rotated cube. I > replaced the mapper and the actor with the following lines: > > //create a rotation object > vtkSmartPointer rotation = > vtkSmartPointer::New(); > //the angle is measured in degrees for some reason > rotation->RotateZ(45.); > //use this rotation object in a transformFilter > vtkSmartPointer transformFilter = > vtkSmartPointer::New(); > transformFilter->SetInputConnection(cubeSource->GetOutputPort()); > transformFilter->SetTransform(rotation); > transformFilter->Update(); > > However, it is rotating about the z-axis and the origin (as shown in the > image I attached). What can I do for it to rotate about the center of the > cube? I tried using SetCenter for both the vtkTransform and the > PolyDataFilter but they do not have that method. Any ideas? > > Thanks once again! > > -Ishan > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Writing-a-rotated-vtkcubesource-in-a-vtp-file-tp5733044p5733047.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 sur.chiranjib at gmail.com Wed Jul 22 14:36:10 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Thu, 23 Jul 2015 00:06:10 +0530 Subject: [vtkusers] some queries with vtkcellarrays In-Reply-To: References: Message-ID: 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 utkarsh.ayachit at kitware.com Wed Jul 22 15:41:36 2015 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 22 Jul 2015 19:41:36 +0000 Subject: [vtkusers] tdinar@gmail.com In-Reply-To: <1437542012001-5733035.post@n5.nabble.com> References: <1437542012001-5733035.post@n5.nabble.com> Message-ID: Can you try replacing the vtkGeometryFilter with vtkDataSetSurfaceFilter? I suspect the vtkGeometryFilter doesn't handle polyhedral elements. Utkarsh On Wed, Jul 22, 2015 at 1:13 AM tariq wrote: > Hi, I am a newbie to vtk, and I have been trying to visualize an > unstructured > grid with the aid of vtkGeometryFilter to convert a polyhedron > (unStructuredGrid) into vtkPolyData. Then compute the Normals and use a > Lookup table to plot the data. The one polyhedron in my code would not show > up. The code is pasted below and I am all ears. Thanks. TQ. > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > > int main( int, char*[] ) > { > // create polyhedron (cube) > vtkIdType pointIds[8] = {0, 1, 2, 3, 4, 5, 6, 7}; > > vtkSmartPointer points = > vtkSmartPointer::New(); > points->InsertNextPoint(-1.0,-1.0,-1.0); > points->InsertNextPoint( 1.0,-1.0,-1.0); > points->InsertNextPoint( 1.0, 1.0,-1.0); > points->InsertNextPoint(-1.0, 1.0,-1.0); > points->InsertNextPoint(-1.0,-1.0, 1.0); > points->InsertNextPoint( 1.0,-1.0, 1.0); > points->InsertNextPoint( 1.0, 1.0, 1.0); > points->InsertNextPoint(-1.0, 1.0, 1.0); > > vtkSmartPointer faces = > vtkSmartPointer::New(); > vtkIdType face0[4] = {0, 3, 2, 1}; > vtkIdType face1[4] = {0, 4, 7, 3}; > vtkIdType face2[4] = {4, 5, 6, 7}; > vtkIdType face3[4] = {5, 1, 2, 6}; > vtkIdType face4[4] = {0, 1, 5, 4}; > vtkIdType face5[4] = {2, 3, 7, 6}; > > faces->InsertNextCell(4, face0); > faces->InsertNextCell(4, face1); > faces->InsertNextCell(4, face2); > faces->InsertNextCell(4, face3); > faces->InsertNextCell(4, face4); > faces->InsertNextCell(4, face5); > > vtkSmartPointer ugrid = > vtkSmartPointer::New(); > ugrid->SetPoints(points); > ugrid->InsertNextCell( > VTK_POLYHEDRON, 8, pointIds, > 6, faces->GetPointer()); > // Extract poly data from unsturctured Grid > > vtkSmartPointer Filter1= > vtkSmartPointer::New(); > > Filter1->SetInputData(ugrid); > Filter1->Update(0); > > vtkSmartPointer Filter2= > vtkSmartPointer::New(); > > > Filter2->SetInputConnection(0,Filter1->GetOutputPort(0)); > Filter2->Update(0); > > // Calculate normals > > vtkSmartPointer normals = > vtkSmartPointer::New(); > > normals->SetFeatureAngle(60); > > normals->SetInputConnection(0,Filter2->GetOutputPort(0)); > > normals->Update(0); > > //Setup lookup table > vtkSmartPointer lut= > vtkSmartPointer::New(); > > lut->SetHueRange(0.0, 100); > > // initiate mapper > > vtkSmartPointer mapper= > vtkSmartPointer::New(); > > mapper->SetInputConnection(0,normals->GetOutputPort(0)); > mapper->SetLookupTable(lut); > mapper->SetScalarRange(0.12, 0.6); > > > vtkSmartPointer actor= > vtkSmartPointer::New(); > > // Initiate Actor > > actor->SetMapper(mapper); > actor->SetPosition(0.0, 0.0, 0.0); > > // Create a renderer, render window, and interactor > vtkSmartPointer renderer = > vtkSmartPointer::New(); > renderer->ResetCamera(); > renderer->ResetCameraClippingRange(); > > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > > renderWindow->AddRenderer(renderer); > > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > // Add the actor to the scene > renderer->AddActor(actor); > renderer->SetBackground(.2, .3, .4); > > // Render and interact > renderWindow->Render(); > renderWindowInteractor->Start(); > > > > return EXIT_SUCCESS; > } > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/tdinar-gmail-com-tp5733035.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 bengt at ctech.com Wed Jul 22 18:05:10 2015 From: bengt at ctech.com (Bengt Rosenberger) Date: Thu, 23 Jul 2015 00:05:10 +0200 Subject: [vtkusers] vtkContourFilter rounding issue with vtkIntArray Message-ID: <55B01396.2090608@ctech.com> Hello everyone! Sorry if this may appear twice on the mailing list, the first time I've submitted this the attachment prevented this to show up. This time I'll provide a link to my DropBox for the data. Anyway, we encountered an issue with vtkContourFilter. Specifically, we have an unstructured grid containing the data to contour with and an additional vtkIntArray. The data in the int array is supposed to be of all the same value, in this case 3. However, after running the field through the contour filter, the int data contains values of 2 as well. After digging deeper into the VTK code, we discovered that the data for the int array is cast to double, interpolated and then cast back to int. So my question is: Why aren't the data values being rounded after interpolation, but instead just cast back to int? Is there a way to enable rounding or copying for only a single array in the grid? Thank you! Here's the data: https://dl.dropboxusercontent.com/u/16837761/test1.7z And here's the code we used for testing: #include #include #include #include #include #include #include // Checks whether the geo_layer values are all constant void check_geo_layer(vtkDataSet* ds) { if (ds->GetNumberOfCells() == 0) { assert(false); } vtkDataArray* geoLayerData = ds->GetPointData()->GetArray("Geo_Layer"); double geoLayer = geoLayerData->GetComponent(ds->GetCell(0)->GetPointId(0), 0); for (uint32_t i = 0; i < ds->GetNumberOfCells(); ++i) { vtkCell* c = ds->GetCell(i); for (uint32_t j = 0; j < c->GetNumberOfPoints(); ++j) { double gl = geoLayerData->GetComponent(c->GetPointId(j), 0); if (gl != geoLayer) { assert(false); } } } } template void check_geo_layer(vtkSmartPointer vtkFilter) { vtkFilter->Update(); auto result = vtkFilter->GetOutput(); vtkDataSet* ds = vtkDataSet::SafeDownCast(result); check_geo_layer(ds); } int _tmain(int argc, _TCHAR* argv[]) { // Read the test field // Field has one vtkDoubleArray ("TOTHC") and one vtkIntArray ("Geo_Layer") vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("C:\\test1.vtk"); reader->Update(); vtkDataSet* g1 = reader->GetOutputAsDataSet(); // Values in Geo_Layer are supposed to be all 3's. Check that now for the input. check_geo_layer(g1); const double isoValue = 0.98712348937988281; vtkSmartPointer contour = vtkContourFilter::New(); contour->SetInputData(g1); contour->ReleaseDataFlagOn(); contour->GenerateTrianglesOn(); contour->ComputeGradientsOff(); contour->ComputeNormalsOff(); contour->ComputeScalarsOff(); contour->SetNumberOfContours(1); contour->SetValue(0, isoValue); contour->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "TOTHC"); // Check again whether values in Geo_Layer are only 3's. // PROBLEM: They are not. There are 2's in there as well, which occur from interpolating integers and not rounding in the end. // You can see the problem if you convert Geo_Layer to a vtkDoubleArray, in which case values of 2.9999999998 may appear after contouring. check_geo_layer(contour); std::cin.ignore(); } From ishan.tembhekar at caltech.edu Wed Jul 22 19:06:27 2015 From: ishan.tembhekar at caltech.edu (Ishan Tembhekar) Date: Wed, 22 Jul 2015 16:06:27 -0700 Subject: [vtkusers] Writing a rotated vtkcubesource in a .vtp file In-Reply-To: References: <1437587908447-5733047.post@n5.nabble.com> Message-ID: Hi Cory, Thanks for the tip. I have been trying to implement that for a while and still hasn't worked for some reason.. This is the code I have: //set dimensions of cube cubeSource->SetCenter(center[0], center[1], center[2]); cubeSource->SetXLength(_widthOfBottomFace); cubeSource->SetYLength(_widthOfSideFace); cubeSource->SetZLength(_widthInZDirection); cubeSource->Update(); //create a transformation object vtkSmartPointer transformation = vtkSmartPointer::New(); //use this transformation object in a transformFilter vtkSmartPointer transformFilter = vtkSmartPointer::New(); transformFilter->SetInputConnection(cubeSource->GetOutputPort()); transformFilter->SetTransform(transformation); //first take the cube back to the origin for rotation transformation->Translate(-center[0], -center[1], -center[2]); //now rotate it with the given angle (in degrees) transformation->RotateZ(45.); //translate it back transformation->Translate(center[0], center[1], center[2]); transformFilter->Update(); I have attached the output that I get for various cases. The big box in the center is just for reference. I am generating the small one by this code. 1) The black box corresponds to if I *do nothing. *So if I commented out the transformation, then I would get the black box. 2) The pink box corresponds to *just negative translation.* So just the first translate line of the code is executed and the rotation and positive translation is not. 3) The small grey box is *negative translation and rotation*. So, the positive translation is not executed. 4) The blue box is *negative translate, rotate and positive translate. *This is when all of the above code is executed. Observations: 1) and 2) look correct. 3) I would have expected the outcome to be located at the same point as the pink box but rotated around the origin (which is shown as the red,green and yellow cross) 4) This is where I wanted the outcome to be the black box but rotated. Remarks: I think that the transform is somehow applying the transformation to both the cube AND the axes. So in case 4, when I do negative translate, the axis goes down as well. Then when I rotate, the axis rotates as well and finally when I do positively translate, instead of going straight up, the box goes along the "up" of the rotated axis and you see the blue box where it is. Can you help me here? Is there some way I can stop the axis from doing the same things that my cube is doing? I apologize for the long email Thanks again! -Ishan On Wed, Jul 22, 2015 at 11:18 AM, Cory Quammen wrote: > You'll need to translate your cube by the negated center of the cube, then > rotate. You can do this all in the same vtkTransform object. > > - Cory > > On Wed, Jul 22, 2015 at 1:58 PM, ishantembhekar < > ishan.tembhekar at caltech.edu> wrote: > >> < >> http://vtk.1045678.n5.nabble.com/file/n5733047/Screen_Shot_2015-07-22_at_10.png >> > >> >> Hi Cory, >> >> Thank you so much for your immediate response! The >> vtkTransformPolyDataFilter worked and it now gives me a rotated cube. I >> replaced the mapper and the actor with the following lines: >> >> //create a rotation object >> vtkSmartPointer rotation = >> vtkSmartPointer::New(); >> //the angle is measured in degrees for some reason >> rotation->RotateZ(45.); >> //use this rotation object in a transformFilter >> vtkSmartPointer transformFilter = >> vtkSmartPointer::New(); >> transformFilter->SetInputConnection(cubeSource->GetOutputPort()); >> transformFilter->SetTransform(rotation); >> transformFilter->Update(); >> >> However, it is rotating about the z-axis and the origin (as shown in the >> image I attached). What can I do for it to rotate about the center of the >> cube? I tried using SetCenter for both the vtkTransform and the >> PolyDataFilter but they do not have that method. Any ideas? >> >> Thanks once again! >> >> -Ishan >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Writing-a-rotated-vtkcubesource-in-a-vtp-file-tp5733044p5733047.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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2015-07-22 at 3.58.07 PM.png Type: image/png Size: 14129 bytes Desc: not available URL: From tdinar at gmail.com Wed Jul 22 19:26:33 2015 From: tdinar at gmail.com (Tarig Dinar) Date: Wed, 22 Jul 2015 16:26:33 -0700 Subject: [vtkusers] tdinar@gmail.com In-Reply-To: References: <1437542012001-5733035.post@n5.nabble.com> Message-ID: Thank you so much, it works now. On Wed, Jul 22, 2015 at 12:41 PM, Utkarsh Ayachit < utkarsh.ayachit at kitware.com> wrote: > Can you try replacing the vtkGeometryFilter with vtkDataSetSurfaceFilter? > I suspect the vtkGeometryFilter doesn't handle polyhedral elements. > > Utkarsh > > On Wed, Jul 22, 2015 at 1:13 AM tariq wrote: > >> Hi, I am a newbie to vtk, and I have been trying to visualize an >> unstructured >> grid with the aid of vtkGeometryFilter to convert a polyhedron >> (unStructuredGrid) into vtkPolyData. Then compute the Normals and use a >> Lookup table to plot the data. The one polyhedron in my code would not >> show >> up. The code is pasted below and I am all ears. Thanks. TQ. >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> >> >> int main( int, char*[] ) >> { >> // create polyhedron (cube) >> vtkIdType pointIds[8] = {0, 1, 2, 3, 4, 5, 6, 7}; >> >> vtkSmartPointer points = >> vtkSmartPointer::New(); >> points->InsertNextPoint(-1.0,-1.0,-1.0); >> points->InsertNextPoint( 1.0,-1.0,-1.0); >> points->InsertNextPoint( 1.0, 1.0,-1.0); >> points->InsertNextPoint(-1.0, 1.0,-1.0); >> points->InsertNextPoint(-1.0,-1.0, 1.0); >> points->InsertNextPoint( 1.0,-1.0, 1.0); >> points->InsertNextPoint( 1.0, 1.0, 1.0); >> points->InsertNextPoint(-1.0, 1.0, 1.0); >> >> vtkSmartPointer faces = >> vtkSmartPointer::New(); >> vtkIdType face0[4] = {0, 3, 2, 1}; >> vtkIdType face1[4] = {0, 4, 7, 3}; >> vtkIdType face2[4] = {4, 5, 6, 7}; >> vtkIdType face3[4] = {5, 1, 2, 6}; >> vtkIdType face4[4] = {0, 1, 5, 4}; >> vtkIdType face5[4] = {2, 3, 7, 6}; >> >> faces->InsertNextCell(4, face0); >> faces->InsertNextCell(4, face1); >> faces->InsertNextCell(4, face2); >> faces->InsertNextCell(4, face3); >> faces->InsertNextCell(4, face4); >> faces->InsertNextCell(4, face5); >> >> vtkSmartPointer ugrid = >> vtkSmartPointer::New(); >> ugrid->SetPoints(points); >> ugrid->InsertNextCell( >> VTK_POLYHEDRON, 8, pointIds, >> 6, faces->GetPointer()); >> // Extract poly data from unsturctured Grid >> >> vtkSmartPointer Filter1= >> vtkSmartPointer::New(); >> >> Filter1->SetInputData(ugrid); >> Filter1->Update(0); >> >> vtkSmartPointer Filter2= >> vtkSmartPointer::New(); >> >> >> Filter2->SetInputConnection(0,Filter1->GetOutputPort(0)); >> Filter2->Update(0); >> >> // Calculate normals >> >> vtkSmartPointer normals = >> vtkSmartPointer::New(); >> >> normals->SetFeatureAngle(60); >> >> normals->SetInputConnection(0,Filter2->GetOutputPort(0)); >> >> normals->Update(0); >> >> //Setup lookup table >> vtkSmartPointer lut= >> vtkSmartPointer::New(); >> >> lut->SetHueRange(0.0, 100); >> >> // initiate mapper >> >> vtkSmartPointer mapper= >> vtkSmartPointer::New(); >> >> mapper->SetInputConnection(0,normals->GetOutputPort(0)); >> mapper->SetLookupTable(lut); >> mapper->SetScalarRange(0.12, 0.6); >> >> >> vtkSmartPointer actor= >> vtkSmartPointer::New(); >> >> // Initiate Actor >> >> actor->SetMapper(mapper); >> actor->SetPosition(0.0, 0.0, 0.0); >> >> // Create a renderer, render window, and interactor >> vtkSmartPointer renderer = >> vtkSmartPointer::New(); >> renderer->ResetCamera(); >> renderer->ResetCameraClippingRange(); >> >> vtkSmartPointer renderWindow = >> vtkSmartPointer::New(); >> >> renderWindow->AddRenderer(renderer); >> >> vtkSmartPointer renderWindowInteractor = >> vtkSmartPointer::New(); >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> // Add the actor to the scene >> renderer->AddActor(actor); >> renderer->SetBackground(.2, .3, .4); >> >> // Render and interact >> renderWindow->Render(); >> renderWindowInteractor->Start(); >> >> >> >> return EXIT_SUCCESS; >> } >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/tdinar-gmail-com-tp5733035.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 ishan.tembhekar at caltech.edu Wed Jul 22 20:22:59 2015 From: ishan.tembhekar at caltech.edu (ishantembhekar) Date: Wed, 22 Jul 2015 17:22:59 -0700 (MST) Subject: [vtkusers] Writing a rotated vtkcubesource in a .vtp file In-Reply-To: References: <1437587908447-5733047.post@n5.nabble.com> Message-ID: <1437610979676-5733054.post@n5.nabble.com> Oops never mind. Figured out that I was supposed to be using the PostMultiply() method in the transform. Did it and it worked! Thanks for you help again Cory! -- View this message in context: http://vtk.1045678.n5.nabble.com/Writing-a-rotated-vtkcubesource-in-a-vtp-file-tp5733044p5733054.html Sent from the VTK - Users mailing list archive at Nabble.com. From kmd1995 at sjtu.edu.cn Wed Jul 22 21:41:28 2015 From: kmd1995 at sjtu.edu.cn (kmd1995) Date: Wed, 22 Jul 2015 18:41:28 -0700 (MST) Subject: [vtkusers] how to show a vedio from ultrasound mechine? Message-ID: <1437615688130-5733055.post@n5.nabble.com> Hi all, I'm a undergraduate now working on a ultrasound subject, I used the vtkvideosource to capture the video but it returned error message "can't grab". My ultrasound machine is GE LOGIQ P5.It's said that this device is able to output a digital video data through svideo and BNC. What should I do? Look forward for any help! THX! -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-show-a-vedio-from-ultrasound-mechine-tp5733055.html Sent from the VTK - Users mailing list archive at Nabble.com. From kmd1995 at sjtu.edu.cn Wed Jul 22 23:04:47 2015 From: kmd1995 at sjtu.edu.cn (kmd1995) Date: Wed, 22 Jul 2015 20:04:47 -0700 (MST) Subject: [vtkusers] How to open a series of Dicom image? Message-ID: <1437620687837-5733056.post@n5.nabble.com> Hi all, I have a series of Dicom image, and I want to open them with vtkDICOMImageReader. I've tried lots of ways, including SetdirectoryName (which worked fine on earlier dicom images) ,using vtkImageAppend. When using SetdirectoryName, the extend is always(0,511,0,511,0,0) but it should be ((0,511,0,511,0,67)). When using vtkImageAppend, I got image of right size but all zero,(i.e. when I call GetScalarComponentAsDouble it returns zero whatever the position of picture). Besides,when I do this data.SetScalarComponentFromDouble(32,34,2,0,0.5) print data.GetScalarComponentAsDouble(32,34,2,0) why I get 0.0? I'm totally comfused.Looking forward for any help.Thx! And my code v16 = vtk.vtkDICOMImageReader() append=vtk.vtkImageAppend() append.SetAppendAxis(2) readers=[0]*67 for i in range (67): x="F:\\SE2\\IM%d" %i readers[i]=vtk.vtkDICOMImageReader() readers[i].SetDataSpacing(1,0.8,1.2) readers[i].SetFileName(x) append.SetInputConnection(readers[i].GetOutputPort()) append.Update() print append.GetOutput().GetExtent() -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-open-a-series-of-Dicom-image-tp5733056.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Jul 22 23:09:04 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 22 Jul 2015 21:09:04 -0600 Subject: [vtkusers] how to show a vedio from ultrasound mechine? In-Reply-To: <1437615688130-5733055.post@n5.nabble.com> References: <1437615688130-5733055.post@n5.nabble.com> Message-ID: On Wed, Jul 22, 2015 at 7:41 PM, kmd1995 wrote: > Hi all, > I'm a undergraduate now working on a ultrasound subject, I used the > vtkvideosource to capture the video but it returned error message "can't > grab". > My ultrasound machine is GE LOGIQ P5.It's said that this device is able > to > output a digital video data through svideo and BNC. > What should I do? > Look forward for any help! THX! > S-Video is analog, not digital. I'm sure the BNC delivers an analog signal, as well. To use the vtkWin32VideoSource only works with video-for-windows, so the video capture card on your computer must have a video-for-windows driver. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoldino at gmail.com Thu Jul 23 05:24:43 2015 From: smoldino at gmail.com (Paolo Grossi) Date: Thu, 23 Jul 2015 10:24:43 +0100 Subject: [vtkusers] Failed attempt connection between VTK and ZeroMQ Message-ID: Hi all, I'm trying to bind the ZeroMQ properties with the VTK visualisations possibility. Server/client are written in C++ language. The goal of the server is to receive a greet message from the server and to respond with the vtkRenderWindow. The goal of the client is to send an "Hello" message to the server and to receive a vtkRenderWindow in order to reproduce it. After the execution I obtain this output with the command "hwclient & hwserver": [S] Open connection [C] Connecting to server? [C] Sending Hello [S] Received Hello terminate called after throwing an instance of 'zmq::error_t' what(): Bad address I'm looking forward to hear you. Thanks, Paolo Grossi. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hwclient.cxx Type: text/x-c++src Size: 954 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hwserver.cxx Type: text/x-c++src Size: 1641 bytes Desc: not available URL: From t.manobala2009 at gmail.com Thu Jul 23 05:47:02 2015 From: t.manobala2009 at gmail.com (Mano) Date: Thu, 23 Jul 2015 15:17:02 +0530 Subject: [vtkusers] Dicom Message-ID: Hi to all am trying to give Scalarbaractor on Dicom images or to give simple color to Dicom images can any plz share code for me Thanking you Manobala.T -------------- next part -------------- An HTML attachment was scrubbed... URL: From bikash at umich.edu Thu Jul 23 08:44:49 2015 From: bikash at umich.edu (Bikash Kanungo) Date: Thu, 23 Jul 2015 08:44:49 -0400 Subject: [vtkusers] VTK Destructors Message-ID: Hi, I'm creating vtkHexahedron(s) using the New() public member function. The resultant object is pointed by a base vtkCell pointer. Since the destructors of both vtkHexahedron and vtkCell are protected member functions, is there a way to de-allocate the memory occupied by the object created by New()? Thanks, Bikash -- Bikash S. Kanungo PhD Student Computational Materials Physics Group Mechanical Engineering University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Jul 23 08:48:42 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 23 Jul 2015 08:48:42 -0400 Subject: [vtkusers] VTK Destructors In-Reply-To: References: Message-ID: Bikash, VTK objects are managed by a garbage collector which does all the deleting for you. To let VTK know you are done with an object, you can call object->Delete(); If this is the last reference to the object, the garbage collector will delete it for you. If, however, a reference to the object is held by some other object, it will not be garbage collected. That's why code like the following is safe: vtkSphereSource* source = vtkSphereSource::New() otherFilter->SetInputConnection( source->GetOutputPort() ); source->Delete(); HTH, Cory On Thu, Jul 23, 2015 at 8:44 AM, Bikash Kanungo wrote: > Hi, > > I'm creating vtkHexahedron(s) using the New() public member function. The > resultant object is pointed by a base vtkCell pointer. Since the > destructors of both vtkHexahedron and vtkCell are protected member > functions, is there a way to de-allocate the memory occupied by the object > created by New()? > > Thanks, > Bikash > > -- > Bikash S. Kanungo > PhD Student > Computational Materials Physics Group > Mechanical Engineering > University of Michigan > > > _______________________________________________ > 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 bikash at umich.edu Thu Jul 23 09:00:48 2015 From: bikash at umich.edu (Bikash Kanungo) Date: Thu, 23 Jul 2015 09:00:48 -0400 Subject: [vtkusers] VTK Destructors In-Reply-To: References: Message-ID: Thanks Cory. That helped. Regards, Bikash On Thu, Jul 23, 2015 at 8:48 AM, Cory Quammen wrote: > Bikash, > > VTK objects are managed by a garbage collector which does all the deleting > for you. To let VTK know you are done with an object, you can call > > object->Delete(); > > If this is the last reference to the object, the garbage collector will > delete it for you. If, however, a reference to the object is held by some > other object, it will not be garbage collected. That's why code like the > following is safe: > > vtkSphereSource* source = vtkSphereSource::New() > otherFilter->SetInputConnection( source->GetOutputPort() ); > source->Delete(); > > HTH, > Cory > > On Thu, Jul 23, 2015 at 8:44 AM, Bikash Kanungo wrote: > >> Hi, >> >> I'm creating vtkHexahedron(s) using the New() public member function. The >> resultant object is pointed by a base vtkCell pointer. Since the >> destructors of both vtkHexahedron and vtkCell are protected member >> functions, is there a way to de-allocate the memory occupied by the object >> created by New()? >> >> Thanks, >> Bikash >> >> -- >> Bikash S. Kanungo >> PhD Student >> Computational Materials Physics Group >> Mechanical Engineering >> University of Michigan >> >> >> _______________________________________________ >> 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. > -- Bikash S. Kanungo PhD Student Computational Materials Physics Group Mechanical Engineering University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Thu Jul 23 08:59:04 2015 From: DLRdave at aol.com (David Cole) Date: Thu, 23 Jul 2015 08:59:04 -0400 Subject: [vtkusers] Failed attempt connection between VTK and ZeroMQ In-Reply-To: References: Message-ID: Really? >From the code you attached: vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer( ren1 ); renWin->SetSize( 300, 300 ); // Send reply back to client zmq::message_t reply; memcpy((void *)reply.data(), renWin, 99999); socket.send(reply); Two questions back to you: Why do you think a pointer to a vtkRenderWindow in one process may be sent across a ZMQ socket to another process in this manner? Why do you think the vtkRenderWindow points to 99999 bytes worth of memory? I suggest studying up on how to serialize data for sending across a socket from one process to another before you try to do it with VTK objects. To start with, search for "serializ" on this web page: http://zeromq.org/area:faq and just google around for serializing stuff for zeromq. Also: http://stackoverflow.com/q/14480161/236192 (and there's a section on the right with other related stack overflow questions...) HTH, David C. On Thu, Jul 23, 2015 at 5:24 AM, Paolo Grossi wrote: > Hi all, > I'm trying to bind the ZeroMQ properties with the VTK visualisations > possibility. > Server/client are written in C++ language. > > The goal of the server is to receive a greet message from the server and to > respond with the vtkRenderWindow. > > The goal of the client is to send an "Hello" message to the server and to > receive a vtkRenderWindow in order to reproduce it. > > After the execution I obtain this output with the command "hwclient & > hwserver": > > [S] Open connection > [C] Connecting to server? > [C] Sending Hello > [S] Received Hello > terminate called after throwing an instance of 'zmq::error_t' > what(): Bad address > > I'm looking forward to hear you. > > Thanks, > Paolo Grossi. > > _______________________________________________ > 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 cory.quammen at kitware.com Thu Jul 23 09:05:18 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 23 Jul 2015 09:05:18 -0400 Subject: [vtkusers] Area of Intersection between a volume and a surface In-Reply-To: References: Message-ID: Hedieh, You could try to use vtkBoxClipDataSet [1] to clip parts of your finite plane away and then compute the area of the plane with vtkMassProperties. vtkBoxClipDataSet produces an unstructured grid, so you'll likely need a vtkDataSetSurfaceFilter between it and vtkMassProperties. HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkBoxClipDataSet.html On Tue, Jul 21, 2015 at 3:09 AM, Hedieh Ebrahimi wrote: > Hi Cory, > > Thanks for your reply. I was looking at the Python Bindings for VTK where > I came across the following example. > > > http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/PolygonIntersection > > The example above returns the intersection point of a line with a polygon > if it exists. > > Im my case I need to know if a finite plane intersects with a volume ( > hexahedron) and if so I will need to calculate the intersectional area. I > was wondering if this is possible using VTK. > > I came across this example regarding Planes Intersection: > > > http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/PlanesIntersection > > But still it is not what I exactly need. Does anybody know of any classes > that will calculate the intersectional area. > > Please find attached an image I am sending with this email. > > Thank you very much in advance for your help. > > Best Regards, > Hedieh > > > > On Mon, Jul 20, 2015 at 11:24 PM, Cory Quammen > wrote: > >> Hi Hedieh, >> >> I'm not clear on what you are trying to compute. Do you have an image to >> illustrate? >> >> Thanks, >> Cory >> >> On Mon, Jul 20, 2015 at 10:40 AM, Hedieh Ebrahimi >> wrote: >> >>> Dear all, >>> >>> I have a question. I am trying to calculate the intersection area >>> between a hexahedron volume and a triangle surface. >>> >>> I came across the Python Bindings for VTK. I am wondering if there is >>> any way to get the cross section between a hexahedron volume and a triangle >>> surface. >>> >>> Second is there any way to calculate this cross-sectional area? >>> >>> I would really appreciate if you could please refer me to any classes or >>> sample code to do this? >>> >>> Thank you very much in Advance for your help. >>> >>> Best Regards, >>> Hedieh >>> >>> _______________________________________________ >>> 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 cory.quammen at kitware.com Thu Jul 23 09:30:57 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 23 Jul 2015 09:30:57 -0400 Subject: [vtkusers] vtkContourFilter rounding issue with vtkIntArray In-Reply-To: <55B01396.2090608@ctech.com> References: <55B01396.2090608@ctech.com> Message-ID: Bengt, >From what I can tell looking at the interpolating code in vtkDataArray.cxx, it looks like integer types should be rounded, and it looks like this support has been in VTK for a long time. Can you point out where in VTK you are seeing the casting back to integer type instead of rounding? You may have discovered a bug. Thanks, Cory On Wed, Jul 22, 2015 at 6:05 PM, Bengt Rosenberger wrote: > Hello everyone! > > Sorry if this may appear twice on the mailing list, the first time I've > submitted this the attachment prevented this to show up. This time I'll > provide a link to my DropBox for the data. > > Anyway, we encountered an issue with vtkContourFilter. Specifically, we > have an unstructured grid containing the data to contour with and an > additional vtkIntArray. The data in the int array is supposed to be of all > the same value, in this case 3. However, after running the field through > the contour filter, the int data contains values of 2 as well. > > After digging deeper into the VTK code, we discovered that the data for > the int array is cast to double, interpolated and then cast back to int. > > So my question is: > Why aren't the data values being rounded after interpolation, but instead > just cast back to int? Is there a way to enable rounding or copying for > only a single array in the grid? > > Thank you! > > Here's the data: https://dl.dropboxusercontent.com/u/16837761/test1.7z > And here's the code we used for testing: > > #include > #include > #include > #include > #include > #include > #include > > // Checks whether the geo_layer values are all constant > void check_geo_layer(vtkDataSet* ds) > { > if (ds->GetNumberOfCells() == 0) > { > assert(false); > } > > vtkDataArray* geoLayerData = ds->GetPointData()->GetArray("Geo_Layer"); > > double geoLayer = > geoLayerData->GetComponent(ds->GetCell(0)->GetPointId(0), 0); > for (uint32_t i = 0; i < ds->GetNumberOfCells(); ++i) > { > vtkCell* c = ds->GetCell(i); > for (uint32_t j = 0; j < c->GetNumberOfPoints(); ++j) > { > double gl = geoLayerData->GetComponent(c->GetPointId(j), 0); > if (gl != geoLayer) > { > assert(false); > } > } > } > } > > template > void check_geo_layer(vtkSmartPointer vtkFilter) > { > vtkFilter->Update(); > auto result = vtkFilter->GetOutput(); > vtkDataSet* ds = vtkDataSet::SafeDownCast(result); > > check_geo_layer(ds); > } > > int _tmain(int argc, _TCHAR* argv[]) > { > // Read the test field > // Field has one vtkDoubleArray ("TOTHC") and one vtkIntArray > ("Geo_Layer") > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName("C:\\test1.vtk"); > reader->Update(); > vtkDataSet* g1 = reader->GetOutputAsDataSet(); > > // Values in Geo_Layer are supposed to be all 3's. Check that now for > the input. > check_geo_layer(g1); > > const double isoValue = 0.98712348937988281; > > vtkSmartPointer contour = vtkContourFilter::New(); > contour->SetInputData(g1); > contour->ReleaseDataFlagOn(); > contour->GenerateTrianglesOn(); > contour->ComputeGradientsOff(); > contour->ComputeNormalsOff(); > contour->ComputeScalarsOff(); > contour->SetNumberOfContours(1); > contour->SetValue(0, isoValue); > contour->SetInputArrayToProcess(0, 0, 0, > vtkDataObject::FIELD_ASSOCIATION_POINTS, "TOTHC"); > > // Check again whether values in Geo_Layer are only 3's. > // PROBLEM: They are not. There are 2's in there as well, which occur > from interpolating integers and not rounding in the end. > // You can see the problem if you convert Geo_Layer to a > vtkDoubleArray, in which case values of 2.9999999998 may appear after > contouring. > check_geo_layer(contour); > > std::cin.ignore(); > } > _______________________________________________ > 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 Thu Jul 23 09:32:44 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 23 Jul 2015 09:32:44 -0400 Subject: [vtkusers] use one polydata to clip another polydata In-Reply-To: <1437535580421-5733034.post@n5.nabble.com> References: <1437529552425-5733029.post@n5.nabble.com> <1437535580421-5733034.post@n5.nabble.com> Message-ID: It's hard to say without a stack trace showing where the code is crashing. There can be problems with the boolean operations filter with complicated geometries. Could you provide a stack trace? Thanks, Cory On Tue, Jul 21, 2015 at 11:26 PM, lee wrote: > Hi Cory, > I tried this class,but when I do it crushed when I apply Updata() > function, > My code is as follow: > > > m_Cliper->SetInputData(0,m_input);//m_input is a polydata > m_Cliper->SetInputData(1,m_turbe);//m_turbe is another polydata > m_Cliper->SetOperationToUnion(); > m_Cliper->Update(); > m_output->DeepCopy(m_Cliper->GetOutput(0)); > outputData->DeepCopy(m_output); > > > Do your have any idear? Is it because the data is two complicated? m_input > is 40M, and m_turbe is 3k. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/use-one-polydata-to-clip-another-polydata-tp5733029p5733034.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 leonid_dulman at yahoo.co.uk Thu Jul 23 10:30:28 2015 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Thu, 23 Jul 2015 14:30:28 +0000 (UTC) Subject: [vtkusers] Can not download VTK 6.3.0 RC1 Message-ID: <787656930.1219330.1437661828828.JavaMail.yahoo@mail.yahoo.com> Hi to AllI tried to download VTK-6.3.0.rc1.tar.gz from? Download | VTK,, but return to download page. Where it will be available. Thank you. Leonid | ? | | ? | | ? | ? | ? | ? | ? | | Download | VTK?Next Release Candidate (6.3.0.rc1) Platform Files Source VTK-6.3.0.rc1.zip VTK-6.3.0.rc1.tar.gz Standalone Python Interface (Installer) coming soon Data VTKData-6.... | | | | View on www.vtk.org | Preview by Yahoo | | | | ? | -------------- next part -------------- An HTML attachment was scrubbed... URL: From bengt at ctech.com Thu Jul 23 12:50:40 2015 From: bengt at ctech.com (Bengt Rosenberger) Date: Thu, 23 Jul 2015 18:50:40 +0200 Subject: [vtkusers] vtkContourFilter rounding issue with vtkIntArray In-Reply-To: References: <55B01396.2090608@ctech.com> Message-ID: <55B11B60.80109@ctech.com> Hi Cory, thanks for the reply. When you run the provided code with the provided data, the interpolation for the int data ultimately happens in vtkDataArray::InterpolateEdge, ln 520, which in turn calls vtkDataArrayInterpolateTuple, ln 103. This one performs a multiplication with double and then casts back to the type Scalar, it does not round the final interpolant. The overload above it does tho, but it's not called. Hope that helps, Bengt Am 23.07.2015 um 15:30 schrieb Cory Quammen: > Bengt, > > From what I can tell looking at the interpolating code in > vtkDataArray.cxx, it looks like integer types should be rounded, and > it looks like this support has been in VTK for a long time. Can you > point out where in VTK you are seeing the casting back to integer type > instead of rounding? You may have discovered a bug. > > Thanks, > Cory > > On Wed, Jul 22, 2015 at 6:05 PM, Bengt Rosenberger > wrote: > > Hello everyone! > > Sorry if this may appear twice on the mailing list, the first time > I've submitted this the attachment prevented this to show up. This > time I'll provide a link to my DropBox for the data. > > Anyway, we encountered an issue with vtkContourFilter. > Specifically, we have an unstructured grid containing the data to > contour with and an additional vtkIntArray. The data in the int > array is supposed to be of all the same value, in this case 3. > However, after running the field through the contour filter, the > int data contains values of 2 as well. > > After digging deeper into the VTK code, we discovered that the > data for the int array is cast to double, interpolated and then > cast back to int. > > So my question is: > Why aren't the data values being rounded after interpolation, but > instead just cast back to int? Is there a way to enable rounding > or copying for only a single array in the grid? > > Thank you! > > Here's the data: https://dl.dropboxusercontent.com/u/16837761/test1.7z > And here's the code we used for testing: > > #include > #include > #include > #include > #include > #include > #include > > // Checks whether the geo_layer values are all constant > void check_geo_layer(vtkDataSet* ds) > { > if (ds->GetNumberOfCells() == 0) > { > assert(false); > } > > vtkDataArray* geoLayerData = > ds->GetPointData()->GetArray("Geo_Layer"); > > double geoLayer = > geoLayerData->GetComponent(ds->GetCell(0)->GetPointId(0), 0); > for (uint32_t i = 0; i < ds->GetNumberOfCells(); ++i) > { > vtkCell* c = ds->GetCell(i); > for (uint32_t j = 0; j < c->GetNumberOfPoints(); ++j) > { > double gl = > geoLayerData->GetComponent(c->GetPointId(j), 0); > if (gl != geoLayer) > { > assert(false); > } > } > } > } > > template > void check_geo_layer(vtkSmartPointer vtkFilter) > { > vtkFilter->Update(); > auto result = vtkFilter->GetOutput(); > vtkDataSet* ds = vtkDataSet::SafeDownCast(result); > > check_geo_layer(ds); > } > > int _tmain(int argc, _TCHAR* argv[]) > { > // Read the test field > // Field has one vtkDoubleArray ("TOTHC") and one vtkIntArray > ("Geo_Layer") > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName("C:\\test1.vtk"); > reader->Update(); > vtkDataSet* g1 = reader->GetOutputAsDataSet(); > > // Values in Geo_Layer are supposed to be all 3's. Check that > now for the input. > check_geo_layer(g1); > > const double isoValue = 0.98712348937988281; > > vtkSmartPointer contour = > vtkContourFilter::New(); > contour->SetInputData(g1); > contour->ReleaseDataFlagOn(); > contour->GenerateTrianglesOn(); > contour->ComputeGradientsOff(); > contour->ComputeNormalsOff(); > contour->ComputeScalarsOff(); > contour->SetNumberOfContours(1); > contour->SetValue(0, isoValue); > contour->SetInputArrayToProcess(0, 0, 0, > vtkDataObject::FIELD_ASSOCIATION_POINTS, "TOTHC"); > > // Check again whether values in Geo_Layer are only 3's. > // PROBLEM: They are not. There are 2's in there as well, > which occur from interpolating integers and not rounding in the end. > // You can see the problem if you convert Geo_Layer > to a vtkDoubleArray, in which case values of 2.9999999998 may > appear after contouring. > check_geo_layer(contour); > > std::cin.ignore(); > } > _______________________________________________ > 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 Thu Jul 23 12:53:42 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 23 Jul 2015 12:53:42 -0400 Subject: [vtkusers] Can not download VTK 6.3.0 RC1 In-Reply-To: <787656930.1219330.1437661828828.JavaMail.yahoo@mail.yahoo.com> References: <787656930.1219330.1437661828828.JavaMail.yahoo@mail.yahoo.com> Message-ID: Thanks Leonid, Apologies, this should be fixed now. Llet us know if anything needs fixing for vtkAda 6.3. cheers David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jul 23, 2015 at 10:30 AM, Leonid Dulman wrote: > Hi to All > I tried to download VTK-6.3.0.rc1.tar.gz > from Download > | VTK ,, but return to download page. Where > it will be available. > Thank you. Leonid > > > [image: image] > > > > > > Download | VTK > Next Release Candidate (6.3.0.rc1) Platform Files Source > VTK-6.3.0.rc1.zip VTK-6.3.0.rc1.tar.gz Standalone Python Interface > (Installer) coming soon Data VTKData-6.... > View on www.vtk.org > Preview by Yahoo > > > > _______________________________________________ > 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 bengt at ctech.com Thu Jul 23 13:01:25 2015 From: bengt at ctech.com (Bengt Rosenberger) Date: Thu, 23 Jul 2015 19:01:25 +0200 Subject: [vtkusers] vtkContourFilter rounding issue with vtkIntArray In-Reply-To: <55B11B60.80109@ctech.com> References: <55B01396.2090608@ctech.com> <55B11B60.80109@ctech.com> Message-ID: <55B11DE5.2020207@ctech.com> Small correction: vtkDataArrayInterpolateTuple is either called from vtkDataArray, ln 496 or ln 515. I can't exactly tell because I'm unable to step through that macro. However, I could see that vtkDataArrayInterpolateTuple, ln 103 was called. Is there just a vtkDataArrayRoundIfNecessary missing? Bye, Bengt Am 23.07.2015 um 18:50 schrieb Bengt Rosenberger: > Hi Cory, > > thanks for the reply. > > When you run the provided code with the provided data, the > interpolation for the int data ultimately happens in > vtkDataArray::InterpolateEdge, ln 520, which in turn calls > vtkDataArrayInterpolateTuple, ln 103. This one performs a > multiplication with double and then casts back to the type Scalar, it > does not round the final interpolant. The overload above it does tho, > but it's not called. > > Hope that helps, > Bengt > > Am 23.07.2015 um 15:30 schrieb Cory Quammen: >> Bengt, >> >> From what I can tell looking at the interpolating code in >> vtkDataArray.cxx, it looks like integer types should be rounded, and >> it looks like this support has been in VTK for a long time. Can you >> point out where in VTK you are seeing the casting back to integer >> type instead of rounding? You may have discovered a bug. >> >> Thanks, >> Cory >> >> On Wed, Jul 22, 2015 at 6:05 PM, Bengt Rosenberger > > wrote: >> >> Hello everyone! >> >> Sorry if this may appear twice on the mailing list, the first >> time I've submitted this the attachment prevented this to show >> up. This time I'll provide a link to my DropBox for the data. >> >> Anyway, we encountered an issue with vtkContourFilter. >> Specifically, we have an unstructured grid containing the data to >> contour with and an additional vtkIntArray. The data in the int >> array is supposed to be of all the same value, in this case 3. >> However, after running the field through the contour filter, the >> int data contains values of 2 as well. >> >> After digging deeper into the VTK code, we discovered that the >> data for the int array is cast to double, interpolated and then >> cast back to int. >> >> So my question is: >> Why aren't the data values being rounded after interpolation, but >> instead just cast back to int? Is there a way to enable rounding >> or copying for only a single array in the grid? >> >> Thank you! >> >> Here's the data: >> https://dl.dropboxusercontent.com/u/16837761/test1.7z >> And here's the code we used for testing: >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> // Checks whether the geo_layer values are all constant >> void check_geo_layer(vtkDataSet* ds) >> { >> if (ds->GetNumberOfCells() == 0) >> { >> assert(false); >> } >> >> vtkDataArray* geoLayerData = >> ds->GetPointData()->GetArray("Geo_Layer"); >> >> double geoLayer = >> geoLayerData->GetComponent(ds->GetCell(0)->GetPointId(0), 0); >> for (uint32_t i = 0; i < ds->GetNumberOfCells(); ++i) >> { >> vtkCell* c = ds->GetCell(i); >> for (uint32_t j = 0; j < c->GetNumberOfPoints(); ++j) >> { >> double gl = >> geoLayerData->GetComponent(c->GetPointId(j), 0); >> if (gl != geoLayer) >> { >> assert(false); >> } >> } >> } >> } >> >> template >> void check_geo_layer(vtkSmartPointer vtkFilter) >> { >> vtkFilter->Update(); >> auto result = vtkFilter->GetOutput(); >> vtkDataSet* ds = vtkDataSet::SafeDownCast(result); >> >> check_geo_layer(ds); >> } >> >> int _tmain(int argc, _TCHAR* argv[]) >> { >> // Read the test field >> // Field has one vtkDoubleArray ("TOTHC") and one vtkIntArray >> ("Geo_Layer") >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName("C:\\test1.vtk"); >> reader->Update(); >> vtkDataSet* g1 = reader->GetOutputAsDataSet(); >> >> // Values in Geo_Layer are supposed to be all 3's. Check that >> now for the input. >> check_geo_layer(g1); >> >> const double isoValue = 0.98712348937988281; >> >> vtkSmartPointer contour = >> vtkContourFilter::New(); >> contour->SetInputData(g1); >> contour->ReleaseDataFlagOn(); >> contour->GenerateTrianglesOn(); >> contour->ComputeGradientsOff(); >> contour->ComputeNormalsOff(); >> contour->ComputeScalarsOff(); >> contour->SetNumberOfContours(1); >> contour->SetValue(0, isoValue); >> contour->SetInputArrayToProcess(0, 0, 0, >> vtkDataObject::FIELD_ASSOCIATION_POINTS, "TOTHC"); >> >> // Check again whether values in Geo_Layer are only 3's. >> // PROBLEM: They are not. There are 2's in there as well, >> which occur from interpolating integers and not rounding in the end. >> // You can see the problem if you convert >> Geo_Layer to a vtkDoubleArray, in which case values of >> 2.9999999998 may appear after contouring. >> check_geo_layer(contour); >> >> std::cin.ignore(); >> } >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Jul 23 13:10:51 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 23 Jul 2015 13:10:51 -0400 Subject: [vtkusers] vtkContourFilter rounding issue with vtkIntArray In-Reply-To: <55B11DE5.2020207@ctech.com> References: <55B01396.2090608@ctech.com> <55B11B60.80109@ctech.com> <55B11DE5.2020207@ctech.com> Message-ID: Bengt, That's what it looks like to me. Could you try to add a call to vtkDataArrayRoundIfNecessary there and report back if it solves your problem? If so, would you be interested in contributing a patch to VTK? Developer instructions are available here: https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md Feel free to add me as a reviewer: @cory-quammen is my username. Thanks, Cory On Thu, Jul 23, 2015 at 1:01 PM, Bengt Rosenberger wrote: > Small correction: vtkDataArrayInterpolateTuple is either called from > vtkDataArray, ln 496 or ln 515. I can't exactly tell because I'm unable to > step through that macro. However, I could see that > vtkDataArrayInterpolateTuple, ln 103 was called. > > Is there just a vtkDataArrayRoundIfNecessary missing? > > Bye, > Bengt > > Am 23.07.2015 um 18:50 schrieb Bengt Rosenberger: > > Hi Cory, > > thanks for the reply. > > When you run the provided code with the provided data, the interpolation > for the int data ultimately happens in vtkDataArray::InterpolateEdge, ln > 520, which in turn calls vtkDataArrayInterpolateTuple, ln 103. This one > performs a multiplication with double and then casts back to the type > Scalar, it does not round the final interpolant. The overload above it does > tho, but it's not called. > > Hope that helps, > Bengt > > Am 23.07.2015 um 15:30 schrieb Cory Quammen: > > Bengt, > > From what I can tell looking at the interpolating code in > vtkDataArray.cxx, it looks like integer types should be rounded, and it > looks like this support has been in VTK for a long time. Can you point out > where in VTK you are seeing the casting back to integer type instead of > rounding? You may have discovered a bug. > > Thanks, > Cory > > On Wed, Jul 22, 2015 at 6:05 PM, Bengt Rosenberger < > bengt at ctech.com> wrote: > >> Hello everyone! >> >> Sorry if this may appear twice on the mailing list, the first time I've >> submitted this the attachment prevented this to show up. This time I'll >> provide a link to my DropBox for the data. >> >> Anyway, we encountered an issue with vtkContourFilter. Specifically, we >> have an unstructured grid containing the data to contour with and an >> additional vtkIntArray. The data in the int array is supposed to be of all >> the same value, in this case 3. However, after running the field through >> the contour filter, the int data contains values of 2 as well. >> >> After digging deeper into the VTK code, we discovered that the data for >> the int array is cast to double, interpolated and then cast back to int. >> >> So my question is: >> Why aren't the data values being rounded after interpolation, but instead >> just cast back to int? Is there a way to enable rounding or copying for >> only a single array in the grid? >> >> Thank you! >> >> Here's the data: https://dl.dropboxusercontent.com/u/16837761/test1.7z >> And here's the code we used for testing: >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> // Checks whether the geo_layer values are all constant >> void check_geo_layer(vtkDataSet* ds) >> { >> if (ds->GetNumberOfCells() == 0) >> { >> assert(false); >> } >> >> vtkDataArray* geoLayerData = >> ds->GetPointData()->GetArray("Geo_Layer"); >> >> double geoLayer = >> geoLayerData->GetComponent(ds->GetCell(0)->GetPointId(0), 0); >> for (uint32_t i = 0; i < ds->GetNumberOfCells(); ++i) >> { >> vtkCell* c = ds->GetCell(i); >> for (uint32_t j = 0; j < c->GetNumberOfPoints(); ++j) >> { >> double gl = geoLayerData->GetComponent(c->GetPointId(j), 0); >> if (gl != geoLayer) >> { >> assert(false); >> } >> } >> } >> } >> >> template >> void check_geo_layer(vtkSmartPointer vtkFilter) >> { >> vtkFilter->Update(); >> auto result = vtkFilter->GetOutput(); >> vtkDataSet* ds = vtkDataSet::SafeDownCast(result); >> >> check_geo_layer(ds); >> } >> >> int _tmain(int argc, _TCHAR* argv[]) >> { >> // Read the test field >> // Field has one vtkDoubleArray ("TOTHC") and one vtkIntArray >> ("Geo_Layer") >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName("C:\\test1.vtk"); >> reader->Update(); >> vtkDataSet* g1 = reader->GetOutputAsDataSet(); >> >> // Values in Geo_Layer are supposed to be all 3's. Check that now for >> the input. >> check_geo_layer(g1); >> >> const double isoValue = 0.98712348937988281; >> >> vtkSmartPointer contour = vtkContourFilter::New(); >> contour->SetInputData(g1); >> contour->ReleaseDataFlagOn(); >> contour->GenerateTrianglesOn(); >> contour->ComputeGradientsOff(); >> contour->ComputeNormalsOff(); >> contour->ComputeScalarsOff(); >> contour->SetNumberOfContours(1); >> contour->SetValue(0, isoValue); >> contour->SetInputArrayToProcess(0, 0, 0, >> vtkDataObject::FIELD_ASSOCIATION_POINTS, "TOTHC"); >> >> // Check again whether values in Geo_Layer are only 3's. >> // PROBLEM: They are not. There are 2's in there as well, which occur >> from interpolating integers and not rounding in the end. >> // You can see the problem if you convert Geo_Layer to a >> vtkDoubleArray, in which case values of 2.9999999998 may appear after >> contouring. >> check_geo_layer(contour); >> >> std::cin.ignore(); >> } >> _______________________________________________ >> 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 > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Thu Jul 23 13:56:47 2015 From: the.1.lily at hotmail.com (the lily) Date: Thu, 23 Jul 2015 20:56:47 +0300 Subject: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64" Message-ID: Hello, I built VTK on OSX 10.9 using the following tutorial http://stackoverflow.com/questions/17329258/how-to-install-vtk-6-1-for-osx-10-8-with-cocoa-xcode-support I'm trying to use VTK in my code but I'm having trouble liking VTK my code. I'm not sure what is the problem. Is it the gcc version? or is it the way I'm linking the libraries? I'm using the following directory Users/lily/VTK/VTKBuild/libthis is part of the error I'm getting "_vtk_png_create_info_struct", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_create_write_struct", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_destroy_write_struct", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_get_error_ptr", referenced from: vtkPNGWriteWarningFunction(png_struct_def*, char const*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_get_io_ptr", referenced from: vtkPNGWriteInit(png_struct_def*, unsigned char*, unsigned long) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_init_io", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_set_IHDR", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_set_compression_level", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_set_error_fn", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_set_swap", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_set_write_fn", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_write_end", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_write_image", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) "_vtk_png_write_info", referenced from: vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *** Error 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Jul 23 14:05:36 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 23 Jul 2015 14:05:36 -0400 Subject: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64" In-Reply-To: References: Message-ID: Are you configuring your program with cmake? On Thu, Jul 23, 2015 at 1:56 PM, the lily wrote: > Hello, > > > I built VTK on OSX 10.9 using the following tutorial > http://stackoverflow.com/questions/17329258/how-to-install-vtk-6-1-for-osx-10-8-with-cocoa-xcode-support > > > I'm trying to use VTK in my code but I'm having trouble liking VTK my code. > I'm not sure what is the problem. Is it the gcc version? or is it the way > I'm linking the libraries? > > I'm using the following directory Users/lily/VTK/VTKBuild/lib > > this is part of the error I'm getting > > > "_vtk_png_create_info_struct", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_create_write_struct", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_destroy_write_struct", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_get_error_ptr", referenced from: > > vtkPNGWriteWarningFunction(png_struct_def*, char const*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_get_io_ptr", referenced from: > > vtkPNGWriteInit(png_struct_def*, unsigned char*, unsigned long) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_init_io", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_set_IHDR", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_set_compression_level", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_set_error_fn", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_set_swap", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_set_write_fn", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_write_end", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_write_image", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > "_vtk_png_write_info", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > ld: symbol(s) not found for architecture x86_64 > > collect2: error: ld returned 1 exit status > > make: *** Error 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 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 MEEHANBT at nv.doe.gov Thu Jul 23 14:07:53 2015 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Thu, 23 Jul 2015 18:07:53 +0000 Subject: [vtkusers] Saving multiple time steps in a vtkXMLStructuredGrid file ... In-Reply-To: References: Message-ID: I?ve looked all over the wiki, and all of the books that I have, and I just can?t figure this out. Was vtkXMLStructuredGrid just plain not designed to handle time? In the vts file, I can see that the time steps are saved: 0.0, 0.1, 0.2, just like I wrote them, but when I load them into ParaView, they show up as 0, 1, 2. In the file it seems to record three separate time steps, but it calls them all TimeStep=?0? I get the feeling that I am leaving something simple out, any help would be appreciated. On 7/8/15, 8:02 AM, "Meehan, Bernard" wrote: >I was hoping to be able to write a scalar field that changed over time to >a vtkXMLStructuredGridFile, following the example on this thread: >http://public.kitware.com/pipermail/vtkusers/2012-November/077262.html > >But when I examined my ?*vts? file, the scalar function wasn?t written to >a different time step. I?d be happy to turn this into an example on the >wiki if I could get it to work ? > >import vtk > >NX = 10 >NY = 10 >NZ = 10 > >#-------------------------------Create your >Grid-------------------------------# >pts = vtk.vtkPoints() >for i in range(NX): > for j in range(NY): > for k in range(NZ): > pts.InsertNextPoint(i, j, k) > >sg = vtk.vtkStructuredGrid() >sg.SetDimensions(NX, NY, NZ) >sg.SetPoints(pts) > >f1 = vtk.vtkDoubleArray() >f1.SetName("Function 1") >for i in range(NX): > for j in range(NY): > for k in range(NZ): > f1.InsertNextValue(i+j+k) >sg.GetPointData().AddArray(f1) > >#----------------------------------Save >File-----------------------------------# >w = vtk.vtkXMLStructuredGridWriter() >w.SetFileName("test.vts") >w.SetInputData(sg) >w.SetDataModeToAscii() >w.SetCompressorTypeToNone() >w.SetNumberOfTimeSteps(3) > >w.Start() >w.WriteNextTime(0.0) >w.WriteNextTime(0.1) > ># I wanted to see if I could change "Function 1" at the third time step, >but ># when I look at the file that is written, the time step for this never >seems ># to change? > >f1 = vtk.vtkDoubleArray() >f1.SetName("Function 1") >for i in range(NX): > for j in range(NY): > for k in range(NZ): > f1.InsertNextValue(-(i+j+k)) >sg.GetPointData().AddArray(f1) >sg.Modified() > >w.WriteNextTime(0.2) >w.Stop() > From the.1.lily at hotmail.com Thu Jul 23 14:22:51 2015 From: the.1.lily at hotmail.com (the lily) Date: Thu, 23 Jul 2015 21:22:51 +0300 Subject: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64" In-Reply-To: References: , Message-ID: I configured VTK using cmake and I'm linking my code to vtk using a Makefile I'm not sure if this is important but I'm using mpi in my code > Date: Thu, 23 Jul 2015 14:05:36 -0400 > Subject: Re: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64" > From: bill.lorensen at gmail.com > To: the.1.lily at hotmail.com > CC: vtkusers at vtk.org > > Are you configuring your program with cmake? > > > > On Thu, Jul 23, 2015 at 1:56 PM, the lily wrote: > > Hello, > > > > > > I built VTK on OSX 10.9 using the following tutorial > > http://stackoverflow.com/questions/17329258/how-to-install-vtk-6-1-for-osx-10-8-with-cocoa-xcode-support > > > > > > I'm trying to use VTK in my code but I'm having trouble liking VTK my code. > > I'm not sure what is the problem. Is it the gcc version? or is it the way > > I'm linking the libraries? > > > > I'm using the following directory Users/lily/VTK/VTKBuild/lib > > > > this is part of the error I'm getting > > > > > > "_vtk_png_create_info_struct", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_create_write_struct", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_destroy_write_struct", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_get_error_ptr", referenced from: > > > > vtkPNGWriteWarningFunction(png_struct_def*, char const*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_get_io_ptr", referenced from: > > > > vtkPNGWriteInit(png_struct_def*, unsigned char*, unsigned long) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_init_io", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_set_IHDR", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_set_compression_level", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_set_error_fn", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_set_swap", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_set_write_fn", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_write_end", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_write_image", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > "_vtk_png_write_info", referenced from: > > > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in > > libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > > ld: symbol(s) not found for architecture x86_64 > > > > collect2: error: ld returned 1 exit status > > > > make: *** Error 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 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 bengt at ctech.com Thu Jul 23 14:34:32 2015 From: bengt at ctech.com (Bengt Rosenberger) Date: Thu, 23 Jul 2015 20:34:32 +0200 Subject: [vtkusers] vtkContourFilter rounding issue with vtkIntArray In-Reply-To: References: <55B01396.2090608@ctech.com> <55B11B60.80109@ctech.com> <55B11DE5.2020207@ctech.com> Message-ID: <55B133B8.8070701@ctech.com> Cory, I can confirm a call to vtkDataArrayRoundIfNecessary fixes the issue. I will prepare and submit a patch. Thank you, Bengt > Bengt, > > That's what it looks like to me. Could you try to add a call to > vtkDataArrayRoundIfNecessary there and report back if it solves your > problem? If so, would you be interested in contributing a patch to > VTK? Developer instructions are available here: > > https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md > > Feel free to add me as a reviewer: @cory-quammen is my username. > > Thanks, > Cory > > On Thu, Jul 23, 2015 at 1:01 PM, Bengt Rosenberger > wrote: > > Small correction: vtkDataArrayInterpolateTuple is either called > from vtkDataArray, ln 496 or ln 515. I can't exactly tell because > I'm unable to step through that macro. However, I could see that > vtkDataArrayInterpolateTuple, ln 103 was called. > > Is there just a vtkDataArrayRoundIfNecessary missing? > > Bye, > Bengt > > Am 23.07.2015 um 18:50 schrieb Bengt Rosenberger: >> Hi Cory, >> >> thanks for the reply. >> >> When you run the provided code with the provided data, the >> interpolation for the int data ultimately happens in >> vtkDataArray::InterpolateEdge, ln 520, which in turn calls >> vtkDataArrayInterpolateTuple, ln 103. This one performs a >> multiplication with double and then casts back to the type >> Scalar, it does not round the final interpolant. The overload >> above it does tho, but it's not called. >> >> Hope that helps, >> Bengt >> >> Am 23.07.2015 um 15:30 schrieb Cory Quammen: >>> Bengt, >>> >>> From what I can tell looking at the interpolating code in >>> vtkDataArray.cxx, it looks like integer types should be rounded, >>> and it looks like this support has been in VTK for a long time. >>> Can you point out where in VTK you are seeing the casting back >>> to integer type instead of rounding? You may have discovered a bug. >>> >>> Thanks, >>> Cory >>> >>> On Wed, Jul 22, 2015 at 6:05 PM, Bengt Rosenberger >>> > wrote: >>> >>> Hello everyone! >>> >>> Sorry if this may appear twice on the mailing list, the >>> first time I've submitted this the attachment prevented this >>> to show up. This time I'll provide a link to my DropBox for >>> the data. >>> >>> Anyway, we encountered an issue with vtkContourFilter. >>> Specifically, we have an unstructured grid containing the >>> data to contour with and an additional vtkIntArray. The data >>> in the int array is supposed to be of all the same value, in >>> this case 3. However, after running the field through the >>> contour filter, the int data contains values of 2 as well. >>> >>> After digging deeper into the VTK code, we discovered that >>> the data for the int array is cast to double, interpolated >>> and then cast back to int. >>> >>> So my question is: >>> Why aren't the data values being rounded after >>> interpolation, but instead just cast back to int? Is there a >>> way to enable rounding or copying for only a single array in >>> the grid? >>> >>> Thank you! >>> >>> Here's the data: >>> https://dl.dropboxusercontent.com/u/16837761/test1.7z >>> And here's the code we used for testing: >>> >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> >>> // Checks whether the geo_layer values are all constant >>> void check_geo_layer(vtkDataSet* ds) >>> { >>> if (ds->GetNumberOfCells() == 0) >>> { >>> assert(false); >>> } >>> >>> vtkDataArray* geoLayerData = >>> ds->GetPointData()->GetArray("Geo_Layer"); >>> >>> double geoLayer = >>> geoLayerData->GetComponent(ds->GetCell(0)->GetPointId(0), 0); >>> for (uint32_t i = 0; i < ds->GetNumberOfCells(); ++i) >>> { >>> vtkCell* c = ds->GetCell(i); >>> for (uint32_t j = 0; j < c->GetNumberOfPoints(); ++j) >>> { >>> double gl = >>> geoLayerData->GetComponent(c->GetPointId(j), 0); >>> if (gl != geoLayer) >>> { >>> assert(false); >>> } >>> } >>> } >>> } >>> >>> template >>> void check_geo_layer(vtkSmartPointer vtkFilter) >>> { >>> vtkFilter->Update(); >>> auto result = vtkFilter->GetOutput(); >>> vtkDataSet* ds = vtkDataSet::SafeDownCast(result); >>> >>> check_geo_layer(ds); >>> } >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> // Read the test field >>> // Field has one vtkDoubleArray ("TOTHC") and one >>> vtkIntArray ("Geo_Layer") >>> vtkSmartPointer reader = >>> vtkSmartPointer::New(); >>> reader->SetFileName("C:\\test1.vtk"); >>> reader->Update(); >>> vtkDataSet* g1 = reader->GetOutputAsDataSet(); >>> >>> // Values in Geo_Layer are supposed to be all 3's. Check >>> that now for the input. >>> check_geo_layer(g1); >>> >>> const double isoValue = 0.98712348937988281; >>> >>> vtkSmartPointer contour = >>> vtkContourFilter::New(); >>> contour->SetInputData(g1); >>> contour->ReleaseDataFlagOn(); >>> contour->GenerateTrianglesOn(); >>> contour->ComputeGradientsOff(); >>> contour->ComputeNormalsOff(); >>> contour->ComputeScalarsOff(); >>> contour->SetNumberOfContours(1); >>> contour->SetValue(0, isoValue); >>> contour->SetInputArrayToProcess(0, 0, 0, >>> vtkDataObject::FIELD_ASSOCIATION_POINTS, "TOTHC"); >>> >>> // Check again whether values in Geo_Layer are only 3's. >>> // PROBLEM: They are not. There are 2's in there as >>> well, which occur from interpolating integers and not >>> rounding in the end. >>> // You can see the problem if you convert >>> Geo_Layer to a vtkDoubleArray, in which case values of >>> 2.9999999998 may appear after contouring. >>> check_geo_layer(contour); >>> >>> std::cin.ignore(); >>> } >>> _______________________________________________ >>> 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 bywww.kitware.com >> >> Visit other Kitware open-source projects athttp://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 Thu Jul 23 14:45:10 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 23 Jul 2015 14:45:10 -0400 Subject: [vtkusers] vtkContourFilter rounding issue with vtkIntArray In-Reply-To: <55B133B8.8070701@ctech.com> References: <55B01396.2090608@ctech.com> <55B11B60.80109@ctech.com> <55B11DE5.2020207@ctech.com> <55B133B8.8070701@ctech.com> Message-ID: Awesome! Thanks in advance for contributing! Cory On Thu, Jul 23, 2015 at 2:34 PM, Bengt Rosenberger wrote: > Cory, > > I can confirm a call to vtkDataArrayRoundIfNecessary fixes the issue. I > will prepare and submit a patch. > > Thank you, > Bengt > > > Bengt, > > That's what it looks like to me. Could you try to add a call to vtkDataArrayRoundIfNecessary there > and report back if it solves your problem? If so, would you be interested > in contributing a patch to VTK? Developer instructions are available here: > > > https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md > > Feel free to add me as a reviewer: @cory-quammen is my username. > > Thanks, > Cory > > On Thu, Jul 23, 2015 at 1:01 PM, Bengt Rosenberger > wrote: > >> Small correction: vtkDataArrayInterpolateTuple is either called from >> vtkDataArray, ln 496 or ln 515. I can't exactly tell because I'm unable to >> step through that macro. However, I could see that >> vtkDataArrayInterpolateTuple, ln 103 was called. >> >> Is there just a vtkDataArrayRoundIfNecessary missing? >> >> Bye, >> Bengt >> >> Am 23.07.2015 um 18:50 schrieb Bengt Rosenberger: >> >> Hi Cory, >> >> thanks for the reply. >> >> When you run the provided code with the provided data, the interpolation >> for the int data ultimately happens in vtkDataArray::InterpolateEdge, ln >> 520, which in turn calls vtkDataArrayInterpolateTuple, ln 103. This one >> performs a multiplication with double and then casts back to the type >> Scalar, it does not round the final interpolant. The overload above it does >> tho, but it's not called. >> >> Hope that helps, >> Bengt >> >> Am 23.07.2015 um 15:30 schrieb Cory Quammen: >> >> Bengt, >> >> From what I can tell looking at the interpolating code in >> vtkDataArray.cxx, it looks like integer types should be rounded, and it >> looks like this support has been in VTK for a long time. Can you point out >> where in VTK you are seeing the casting back to integer type instead of >> rounding? You may have discovered a bug. >> >> Thanks, >> Cory >> >> On Wed, Jul 22, 2015 at 6:05 PM, Bengt Rosenberger < >> bengt at ctech.com> wrote: >> >>> Hello everyone! >>> >>> Sorry if this may appear twice on the mailing list, the first time I've >>> submitted this the attachment prevented this to show up. This time I'll >>> provide a link to my DropBox for the data. >>> >>> Anyway, we encountered an issue with vtkContourFilter. Specifically, we >>> have an unstructured grid containing the data to contour with and an >>> additional vtkIntArray. The data in the int array is supposed to be of all >>> the same value, in this case 3. However, after running the field through >>> the contour filter, the int data contains values of 2 as well. >>> >>> After digging deeper into the VTK code, we discovered that the data for >>> the int array is cast to double, interpolated and then cast back to int. >>> >>> So my question is: >>> Why aren't the data values being rounded after interpolation, but >>> instead just cast back to int? Is there a way to enable rounding or copying >>> for only a single array in the grid? >>> >>> Thank you! >>> >>> Here's the data: https://dl.dropboxusercontent.com/u/16837761/test1.7z >>> And here's the code we used for testing: >>> >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> >>> // Checks whether the geo_layer values are all constant >>> void check_geo_layer(vtkDataSet* ds) >>> { >>> if (ds->GetNumberOfCells() == 0) >>> { >>> assert(false); >>> } >>> >>> vtkDataArray* geoLayerData = >>> ds->GetPointData()->GetArray("Geo_Layer"); >>> >>> double geoLayer = >>> geoLayerData->GetComponent(ds->GetCell(0)->GetPointId(0), 0); >>> for (uint32_t i = 0; i < ds->GetNumberOfCells(); ++i) >>> { >>> vtkCell* c = ds->GetCell(i); >>> for (uint32_t j = 0; j < c->GetNumberOfPoints(); ++j) >>> { >>> double gl = geoLayerData->GetComponent(c->GetPointId(j), 0); >>> if (gl != geoLayer) >>> { >>> assert(false); >>> } >>> } >>> } >>> } >>> >>> template >>> void check_geo_layer(vtkSmartPointer vtkFilter) >>> { >>> vtkFilter->Update(); >>> auto result = vtkFilter->GetOutput(); >>> vtkDataSet* ds = vtkDataSet::SafeDownCast(result); >>> >>> check_geo_layer(ds); >>> } >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> // Read the test field >>> // Field has one vtkDoubleArray ("TOTHC") and one vtkIntArray >>> ("Geo_Layer") >>> vtkSmartPointer reader = >>> vtkSmartPointer::New(); >>> reader->SetFileName("C:\\test1.vtk"); >>> reader->Update(); >>> vtkDataSet* g1 = reader->GetOutputAsDataSet(); >>> >>> // Values in Geo_Layer are supposed to be all 3's. Check that now >>> for the input. >>> check_geo_layer(g1); >>> >>> const double isoValue = 0.98712348937988281; >>> >>> vtkSmartPointer contour = vtkContourFilter::New(); >>> contour->SetInputData(g1); >>> contour->ReleaseDataFlagOn(); >>> contour->GenerateTrianglesOn(); >>> contour->ComputeGradientsOff(); >>> contour->ComputeNormalsOff(); >>> contour->ComputeScalarsOff(); >>> contour->SetNumberOfContours(1); >>> contour->SetValue(0, isoValue); >>> contour->SetInputArrayToProcess(0, 0, 0, >>> vtkDataObject::FIELD_ASSOCIATION_POINTS, "TOTHC"); >>> >>> // Check again whether values in Geo_Layer are only 3's. >>> // PROBLEM: They are not. There are 2's in there as well, which >>> occur from interpolating integers and not rounding in the end. >>> // You can see the problem if you convert Geo_Layer to a >>> vtkDoubleArray, in which case values of 2.9999999998 may appear after >>> contouring. >>> check_geo_layer(contour); >>> >>> std::cin.ignore(); >>> } >>> _______________________________________________ >>> 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 >> >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Thu Jul 23 16:36:21 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 23 Jul 2015 16:36:21 -0400 Subject: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64" In-Reply-To: References: Message-ID: <20150723203621.GA27025@megas.kitware.com> On Thu, Jul 23, 2015 at 20:56:47 +0300, the lily wrote: > I built VTK on OSX 10.9 using the following tutorial > http://stackoverflow.com/questions/17329258/how-to-install-vtk-6-1-for-osx-10-8-with-cocoa-xcode-support > I'm trying to use VTK in my code but I'm having trouble liking VTK my > code. I'm not sure what is the problem. Is it the gcc version? or is > it the way I'm linking the libraries? I'm using the following > directory Users/lily/VTK/VTKBuild/libthis is part of the error I'm > getting > "_vtk_png_create_info_struct", referenced from: > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) What's the link line you're using? You're likely missing -lvtkpng-6.1. --Ben From lihouxing at yeah.net Fri Jul 24 03:18:14 2015 From: lihouxing at yeah.net (lee) Date: Fri, 24 Jul 2015 00:18:14 -0700 (MST) Subject: [vtkusers] use one polydata to clip another polydata In-Reply-To: References: <1437529552425-5733029.post@n5.nabble.com> <1437535580421-5733034.post@n5.nabble.com> Message-ID: <1437722294271-5733088.post@n5.nabble.com> Thank you Cory, I figure it out why it crashed. It looks like that this class need the two polydata to be triangulated first. So after I triangulated them, the result is correct! Thanks again~ -- View this message in context: http://vtk.1045678.n5.nabble.com/use-one-polydata-to-clip-another-polydata-tp5733029p5733088.html Sent from the VTK - Users mailing list archive at Nabble.com. From weihuayi at xtu.edu.cn Fri Jul 24 04:49:38 2015 From: weihuayi at xtu.edu.cn (Huayi Wei) Date: Fri, 24 Jul 2015 16:49:38 +0800 Subject: [vtkusers] convert a multi-block structured grid into a single unstructured grid Message-ID: <55B1FC22.7010506@xtu.edu.cn> Hi, There, I have a multi-block grid and I want to convert it into a single unstructured grid. In the multi-block grid, the block size maybe different. I am trying to use vtkAppendFilter to do such thing. ```python reader = vtk.vtkTecplotReader() reader.SetFileName("mesh.dat") reader.Update() mesh = reader.GetOutput() apd = vtk.vtkAppendFilter() apd.MergePointsOn() N = mesh.GetNumberOfBlocks() for i in range(0, N): apd.AddInputData(mesh.GetBlock(i)) apd.Update() umesh = apd.GetOutput() print umesh.GetNumberOfPoints() print umesh.GetNumberOfCells() ``` For the first and second blocks, their sizes are same (30*5) , vtkAppendFilter can work well. But the third block size is 15*4 and the fourth block size is 8*15. Then I get the following error message: ``` ERROR: In /home/why/repositories/vtk/VTK/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx, line 857 vtkStreamingDemandDrivenPipeline (0x1f5e4c0): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(0x1f5e090) is 0 30 0 5 0 0, which is outside the whole extent 0 15 0 4 0 0. ERROR: In /home/why/repositories/vtk/VTK/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx, line 857 vtkStreamingDemandDrivenPipeline (0x1f5f070): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(0x1f5ec40) is 0 30 0 5 0 0, which is outside the whole extent 0 8 0 15 0 0. ``` So what is the mistake I made? I need your help and suggestions, thanks very much. Best Huayi From ke.manjunath at gmail.com Fri Jul 24 06:15:50 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Fri, 24 Jul 2015 15:45:50 +0530 Subject: [vtkusers] NetCDFFile : How to read data for all values of Time axes using vtkNetCDFCFReader. Message-ID: Hi all I am reading a netcdf file using vtkNetCDFCFReader. The input 4 dimensions (TAXIS, ZAX, YAXIS, XAXIS). But, after reading it, the time varying data is not read, i.e only *TAXIS = 0* is read. If XAXIS = 90 ; YAXIS = 60 ; ZAX = 24 ; TAXIS =3 ; then I should have the size of the array being read = XAXIS * YAXIS * ZAX * TAXIS = 90 * 60 * 24 * 3 = 388800. But since, only one time value is considered then the TAXIS =1, the size of the array I have read is equall to = 90 * 60 * 24 * 1 (time axis)= 129600. So, please help me how read time varrying data. i.e How to read data for all values of Time axes using vtkNetCDFCFReader. My current code is as below : ==================================================================== def readNetCdfFile(netCdfFilename, arrayName) : netCdfReader = vtkNetCDFCFReader() netCdfReader.SetFileName(netCdfFilename) netCdfReader.SphericalCoordinatesOff() netCdfReader.SetReplaceFillValueWithNan(1) netCdfReader.Update() #Copy input Array to scalar value field of point data ..this makes point data to point to SAL array netCdfReader.GetOutput().GetPointData().SetScalars(netCdfReader.GetOutput().GetPointData().GetArray(arrayName)) netCdfReader.UpdateMetaData() netCdfReader.Update() netCdfReader.GetOutput().UpdateInformation() return netCdfReader ==================================================================== Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Jul 24 11:56:56 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 24 Jul 2015 11:56:56 -0400 Subject: [vtkusers] NetCDFFile : How to read data for all values of Time axes using vtkNetCDFCFReader. In-Reply-To: References: Message-ID: Hello, Is your NetCDF CF compliant? the vtkNetCDF reader makes certain assumption so it is possible that it hit some condition that made it think that there is no time information in it. - Aashish On Fri, Jul 24, 2015 at 6:15 AM, Manjunath K E wrote: > Hi all > > I am reading a netcdf file using vtkNetCDFCFReader. The input 4 dimensions > (TAXIS, ZAX, YAXIS, XAXIS). But, after reading it, the time varying data is > not read, i.e only *TAXIS = 0* is read. > > If XAXIS = 90 ; YAXIS = 60 ; ZAX = 24 ; TAXIS =3 ; then I should have > the size of the array being read = XAXIS * YAXIS * ZAX * TAXIS = 90 * > 60 * 24 * 3 = 388800. > > But since, only one time value is considered then the TAXIS =1, the size > of the array I have read is equall to = 90 * 60 * 24 * 1 (time axis)= > 129600. > > So, please help me how read time varrying data. i.e How to read data for > all values of Time axes using vtkNetCDFCFReader. > > My current code is as below : > ==================================================================== > def readNetCdfFile(netCdfFilename, arrayName) : > netCdfReader = vtkNetCDFCFReader() > netCdfReader.SetFileName(netCdfFilename) > netCdfReader.SphericalCoordinatesOff() > netCdfReader.SetReplaceFillValueWithNan(1) > netCdfReader.Update() > #Copy input Array to scalar value field of point data ..this makes > point data to point to SAL array > netCdfReader.GetOutput().GetPointData().SetScalars(netCdfReader.GetOutput().GetPointData().GetArray(arrayName)) > netCdfReader.UpdateMetaData() > netCdfReader.Update() > netCdfReader.GetOutput().UpdateInformation() > return netCdfReader > ==================================================================== > > > 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Jul 24 11:58:51 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 24 Jul 2015 11:58:51 -0400 Subject: [vtkusers] NetCDFFile : How to read data for all values of Time axes using vtkNetCDFCFReader. In-Reply-To: References: Message-ID: The other thing is that I don't think it read all the timestamps in the first call. I have to look at the API to give you more information on it. - Aashish On Fri, Jul 24, 2015 at 11:56 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hello, > > Is your NetCDF CF compliant? the vtkNetCDF reader makes certain assumption > so it is possible that it hit some condition that made it think that there > is no time information in it. > > - Aashish > > On Fri, Jul 24, 2015 at 6:15 AM, Manjunath K E > wrote: > >> Hi all >> >> I am reading a netcdf file using vtkNetCDFCFReader. The input 4 >> dimensions (TAXIS, ZAX, YAXIS, XAXIS). But, after reading it, the time >> varying data is not read, i.e only *TAXIS = 0* is read. >> >> If XAXIS = 90 ; YAXIS = 60 ; ZAX = 24 ; TAXIS =3 ; then I should have >> the size of the array being read = XAXIS * YAXIS * ZAX * TAXIS = 90 * >> 60 * 24 * 3 = 388800. >> >> But since, only one time value is considered then the TAXIS =1, the size >> of the array I have read is equall to = 90 * 60 * 24 * 1 (time axis)= >> 129600. >> >> So, please help me how read time varrying data. i.e How to read data for >> all values of Time axes using vtkNetCDFCFReader. >> >> My current code is as below : >> ==================================================================== >> def readNetCdfFile(netCdfFilename, arrayName) : >> netCdfReader = vtkNetCDFCFReader() >> netCdfReader.SetFileName(netCdfFilename) >> netCdfReader.SphericalCoordinatesOff() >> netCdfReader.SetReplaceFillValueWithNan(1) >> netCdfReader.Update() >> #Copy input Array to scalar value field of point data ..this >> makes point data to point to SAL array >> netCdfReader.GetOutput().GetPointData().SetScalars(netCdfReader.GetOutput().GetPointData().GetArray(arrayName)) >> netCdfReader.UpdateMetaData() >> netCdfReader.Update() >> netCdfReader.GetOutput().UpdateInformation() >> return netCdfReader >> ==================================================================== >> >> >> 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 >> >> > > > -- > > > > *| 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 patrick.oleary at kitware.com Fri Jul 24 14:57:29 2015 From: patrick.oleary at kitware.com (Patrick O'Leary) Date: Fri, 24 Jul 2015 12:57:29 -0600 Subject: [vtkusers] Save the Date - 4th Workshop on Next Generation Analytics for the Future Power Grid Message-ID: 4th Workshop on Next Generation Analytics for the Future Power Grid: http://gridoptics.pnnl.gov/fpgws15/ Energy Day @ PNNL: http://gridoptics.pnnl.gov/energyday/ More information on logistics for the meeting will be forthcoming, and will be added to the websites above as it becomes available, but please contact us at GridOPTICS at pnnl.gov with any questions?.and check your calendar now to save the date! Thanks greatly for your consideration, _________________________________________________ Zhenyu (Henry) Huang, Ph.D., P.E. Chief Engineer, Team Lead, Workshop Chair Energy and Environment Directorate Pacific Northwest National Laboratory 902 Battelle Boulevard P.O. Box 999, MSIN K1-85 Richland, WA 99352 USA Tel: 509-372-6781 Fax: 509-372-4353 zhenyu.huang at pnl.gov www.pnl.gov __________________________________________________ Tamica Dickenson Project Coordinator Energy and Environment Directorate Pacific Northwest National Laboratory 902 Battelle Boulevard P.O. Box 999, MSIN J4-90 Richland, WA 99352 USA Tel: 509-372-6802 Fax: 509-372-4353 Tamica at pnnl.gov www.pnl.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Next-Generation Analytics for the Future Power Grid flyer.jpg Type: image/jpeg Size: 173744 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Save the Date - 4th Workshop on Next-Generation Analytics for the Future Power Grid.ics Type: text/calendar Size: 11057 bytes Desc: not available URL: From ben.boeckel at kitware.com Fri Jul 24 15:07:54 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 24 Jul 2015 15:07:54 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready Message-ID: <20150724190754.GA29467@megas.kitware.com> The VTK developement team is happy to announce that VTK 6.3 has entered 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. The official release notes will be available when VTK final is released in the next few weeks. In the meantime here is a preview: - new OpenMP backend for vtkSMPTools; - new MPI-IO backend for PLOT3D reader; - new vtkPlotArea for rendering area (or range) plots; - multithreaded Gaussian splatter class; - multithreading support in the vtkSampleFunction; - compiler uplifts: gcc-4.1 and Visual Studio 2008 or newer are required; - the Piston and Dax accelerator modules are deprecated; - writing side and node sets in Exodus files; - skip NaN values in vtkDataArray::GetRange(); - reading compressed TIFF files with sub-extents; - support for OpenGL 3.2 in the (still experimental, but much less so) OpenGL2 backend; - text rendering now respects the DPI of the vtkWindow; - vtkAxis respects the TileScale setting of vtkWindow; And many bug fixes across the codebase. We hope you enjoy this release of VTK! As always, contact Kitware and the mailing lists for assistance. Thanks, --Ben -------------- next part -------------- Aashish Chaudhary (41): 57e88c1 Maximize or minimize each component for independent components 8449d38 Fixed additive blending for independent components 1a9bf2c Added initial support for 2 and 3 components f965f01 Fixed style 4f1b234 Fixed bad switch case 51af002 Compute the range correctly when dealing with 2-3 components f43b21b Keep the comments in the final shader string 0267974 Added support for dependent components 0e116ee Match tokens with method names 763a34b Fixing shader for 2 & 3 component f1560bd Fixed dependent component test failing cf8933f Fix GL extensions not reported on Mac OpenGL2 context 68696e8 Reset active texture to texture 0 50f28ce Saving and restoring GL state 921f8ae Fixed comment 157cbce Clamp texture unit to 0 and GL_MAX_TEXTURE_IMAGE_UNITS 0c0e6fe Fixed accessing invalid texture unit manager 4b16378 Using a consistent style within a method 77cafc5 Compute light position only once 64a5d18 Optimize lighting code some more 0951daa Reset number of lights b19c903 Some more optimizations for better performance 29d82b5 Respect interpolation type set on volume property e79e082 Fixed invalid variable names used for gradient computation 46a99ec Fixed check on interpolation type a4f6ac2 Updated default interpolation type for test 8b6889e Fixed style 501b9e5 Added check on when to update volume parameters a2f1b5f Do not update light parameters if shading is OFF ed6d37a Fixed compiler warning 65bcee5 Some more optimizations 921a22e Do not compute color if opacity is zero 6d4e699 Updated code to new computeColor signature 298d5a8 Avoid computation of fragment world position repeatedly 4fa1bd3 Fixed failing VTK tests ab7e903 Removed debug message 938c879 Fixed issues with interactive volume rendering a5890e6 Fixed styles and added notes 5df033a Fixed ReductionFactor not initialized that was causing tests to hangup 20b2a4a Added alternate baseline with jitter for GL2 f95de30 Updated test to new ivar to turn off auto adjust sample distance Andras Lasso (1): d307b83 BUG: Fixed vtkImageReslice HitInputExtent update Andrew Bauer (6): 4c8af46 Fix for bad cached cell id for flow path filters. 76c2b85 Particle path fixes. a002739 Getting rid of unused variable warning in release builds. b8ce5c3 Fixed memory issue and reinject frequency counter. bdf2e02 Adding in piece information for XMLPMultiBlockDataWriter. 56f0d7e Fix issue if there aren't any blocks. Andrew Maclean (20): 5637ce6 Remove the unnecessary find_package command. 70d3510 Visual Studio 2013 requires the header. 9349a38 Visual Studio 2013 requires the header. 8b81b92 A minor fix eliminating a CMP0043 warning. 23d1d38 Added TestEmptyInput.py 4a1cec5 Refactoring TestEmptyInput.py 19a774f Convert TestSetGet from TCL to Python. 87eb785 Added a new class to exclude. 14eb327 Missing comma. 0492d1f Adding another class to exclude in an attempt to fix release mode on OSX. 7c09e25 Removing two classes in LinuxExceptions. 713bb57 Adding back some classes to the exception list. c49a214 Test - see if vtkView as a friend is causing failures. 9425e69 Reverting 10084b6 Reverting c136c15 A patch from Utkarsh ef5e00b These scripts only run using Python 2.6 or greater. 22e17c5 Display information about the VTK test folders. 3a65a45 Converted more Tcl scripts to Python. 7fb2289 BUG: This import is unnecessary. Arnaud Gelas (1): fae5f10 Fix typo in FindTBB.cmake which makes it impossible to use TBB on MacOSX Ben Boeckel (35): a701e9c windows: compile the vtkpython.rc file separately b144b68 vtkpython: avoid vtkpythonrc hack in Visual Studio 4265bc0 docs: add buildbot information 2967cbb docs: buildbot label is no more 8d04f57 python: silence warnings about round redefinition eaa25b5 vtkMPICommunicator: check for 2.0 89fb55e java: remove screamake and quote paths 1175385 java: refactor out writing paths to the file 9593e16 java: quote arguments 9792dc2 java: add missing java files 118d9b7 python: add the generated files to the list as well 7c6acd1 freetype: update baselines to support freetype 2.5.3 55db776 testing: set PROCESSORS property for MPI tests b5fc340 FindJsonCpp: add version detection ecc6715 ThirdParty: add minimum version support 80f3f3d jsoncpp: mark that 0.7.0 is the minimum version 1b35883 vtkFFMPEGWriter: conditionalize a GCC pragma dae8b1b FindJsonCpp: fix typo in regex e57d5aa JsonCpp: the VERSION_VAR is a separate signature ee83098 QVTKWidget2: call the direct parent class c0ac4f1 QVTKWidget2: use Superclass typedef internally 1cf2f9b doxygen: generate SVG images f3450ca vtkRAdapter: move R_NO_REMAP to the header 36b7d40 mpi4py: strip trailing whitespace from the include dir 5b0f6ab typos: fix 'writting' -> 'writing' ea06eda vtkWin32ProcessOutputWindow: fix string literal a7c2dd7 vtkXMLUnstructuredDataWriter: also check for string output 5ad33c5 qtgraphicsview: remove unused vtkgl.h includes d9ac721 vtkGenericOpenGLRenderWindow: add PushState/PopState methods 6e14fa7 QVTKGraphicsItem: support the OpenGL2 backend bba39d5 vtkOpenGLRenderUtilities: move Render{Quad,Triangle} 1650168 IOXML: add test for outputting to a string a32d553 modules: use the export name for the file 46f1b60 Testing: fix unused variable warnings 2166c06 FiltersStatisticsGnuR: fix R_NO_REMAP juggling Berk Geveci (14): ba37dcd Fixed issue with vtkPointSet::FindCell(). e5b3e47 Impoved check for ascii file in PLOT3D reader. 38fd595 Fixed compiler warning 6c510c6 Initial point data support in AMR base reader 4c3491b Added point array support to vtkAMRBaseReader 34d5b0745 Moved Plot3D reader to IO/Parallel. 2e541e5 Making the Plot3D reader parallel. 1c0cfb9 Improved ghost array generation. 0027efa Do not rexecute based on ghosts for serial execution 9c1667f Do not override DATA_NUMBER_OF_GHOST_LEVELS() unnecesarily. 5f15c59 Cleaned up error handling in plot3d reader. 005e70d Fixed warnings. d91ecf9 BUG: Was using the wrong extent in computation. f4126e3 Fixed bug with loading 2D or ASCII datasets in parallel. Bill Hoffman (1): 56db190 Use Qt5 COMPNENTS in find_package instead of finding each package directly. Bill Lorensen (18): d59d439 COMP: Member template function use on Mac bc10e20 COMP: Member template function use on Mac f7106e4 ENH: Modernize RIBExporter and RIBProperty 26a1b4c COMP: Memory leak in new test d8ae26c ENH: define VTK_MAXPATH bf855f4 COMP: Typo causes compile error 5316177 COMP: Memory leak in vtkOBJImporter 45fe62d STYLE: OBJImporter style cf1d561 COMP: Adjust fuzzy compare tolerance ad0192a COMP: Adjust fuzzy compare tolerance for scalar divide 2663daa BUG: PentagonalPrism bug b052d7b COMP: TestPentagonalPrism mempry leak 8044bf4 ENH: Unit Test for Linear, Quadratic and BiQuadratic Cells 6890ae4 ENH: Remove unused tcl tests 69ff5a0 ENH: Restore Common/DataModel Cxx tests 1531bc3 BUG: Missing data file 1491288 ENH: Removed unused vtkExplicitCell ef927f0 ENH: Remote module capability Brad King (45): b7daff9 setup-stage: Optionally reconfigure topic stage d2d17f5 setup-gerrit: Allow ssh-only repo URLs c950cd6 setup-stage: Allow 'url' without 'pushurl' ac271ab Tell Git how to check GitSetup config files 341043c Add 'git-gerrit-push' script e848bb0 setup-hooks: Create .git hooks directory if necessary 80ace5f Avoid bash history expansion in developer setup scripts ba82ebc ExternalData: Allow local stores without any URL templates 2943e4f ExternalData: Add support for custom download scripts 2acd7ec ExternalData: Add support for custom algorithm-to-URL mapping 71aa0ce ExternalData: Update documentation to match CMake copy cd49e59 git-gerrit-push: Refine topic name validation e7e0682 git-gerrit-push: Append topic to refspecs instead of overwriting 30ff0dc git-gerrit-push: Avoid bash history expansion 40f508c git-gerrit-push: Fetch 'master' before checking refspecs 51a0143 Add 'setup-upstream' script to help users configure preferred upstream a595712 Add 'setup-gitlab' script to configure GitLab access 35e3b8d Add 'git-gitlab-push' script to help users push to their GitLab fork 95495ff git-gitlab-push: Print follow-up instructions and links for user 0f226a5 git-gitlab-push: Keep user fork 'master' up to date if possible 0227465 git-gitlab-push: Document options on multiple lines in usage a687ee2 git-gitlab-push: Require a '--force' option to force-push the topic 370a7eb Teach our 'git-gitlab-push' script to push ExternalData content 98ecd48 Drop mention of Gerrit from instructions in third-party README files ac802c7 Disable gerrit-push and stage aliases b1a0f22 Switch developer setup to use the GitLab workflow 328cb75 Tell Git how to check Markdown (.md) source files 9f088f0 Documentation: Add VTK Git instructions 8c49fc0 CONTRIBUTING: Update for GitLab workflow ef92e52 README.md: Add document introducing VTK and linking to resources 8b49512 README.html: Remove out-dated document 2f89fb5 Documentation: Revise Merge Request creation instructions 0bd3fbd Documentation: Add links to GitLab markdown documentation 7651b7b Documentation: Revise Git development docs to mention fork step cbe8ad6 setup-upstream: Tolerate lack of existing upstream pushurl afeb020 Report developer setup-upstream failure explicitly 49ce42f CONTRIBUTING: Restore link to dev/git/README.md document 6f89705 Documentation: Explain how to keep a GitLab fork `master` in sync 4e066e0 Documentation: Explain to reviewers how to fetch Merge Request changes 8485843 Fix 'git-gitlab-push' ExternalData push for duplicate objects ab5456f Documentation: Update required Git version to 1.7.2 30c437a Documentation: Define reviewer vote shortcuts and meanings 78012ba KWSys: Tell Git not to export .gitattributes 997b34f Add vtkPeriodicDataArray to list of sources in its module 230948e vtkhdf5: Suppress VS 2015 assertion failure popup during try_run Burlen Loring (1): d2582c6 buffering issue in vtkweb Chris Harris (3): 39fedcd Wait for resize notification in SetSize(...) 30eedf0 Revert "Wait for resize notification in SetSize(...)" 2ea3f61 vtkWeb: Ensure that we get the image size requested Chuck Atkins (1): 56454c5 ADIOS: Remove block-index calculations to use new APIs Cory Quammen (14): e0f018c Added vtkPolyLineSource 9ac195f Added vtkPolyLineRepresentation and vtkPolyLineWidget e52e1b4 Added base class for representations of curves eab3e38 Tests for vtkPolyLine{Widget,Source,Representation} 43a9b05 Added checking for NULL pointer in a few locations dac748a BUG 15365: Fixed crash in function called from multiple threads 67122e8 BUG: Fixed error in area-weighted normal e2cd069 Initialized all member variables in vtkCurveRepresentation c673bee Various fixes for vtkPolyLine{Source,Representation} df922af Initialized test values 8cc3d7a BUG: added output points precision for structured grids 882dfbf Added test for vtkDataSetSurfaceFilter 13aa55c BUG: Direct scalar coloring with string arrays caused crash e61a328 Move table resizing out of core mapping routine Dan Lipsa (42): 4b1dbe9 Solve warnings on the ICC compiler. 4dee027 Redesign "vtkGhostLevels" arrays and related ghost functionalties. bc0f56f Fix warnings. 156f895 Solve windows warnings. 66a9834 Remove warning when a array name for labeling is not found. f9b5404 Use previous version for XML files if there is no vtkGhostType array. f0a6f29 BUG #15199: EnSightReader does not crash if you change CaseFileName 46bde59 VTK XML files are saved using previous version if possible. 4834510 Update documentation for save VTK XML using previous version. bbcecbe BUG: Fix valgrind complaint about uninitialised values. 8491ed5 BUG: Blanked cell is marked as a blanked point. 69198ba ENH: Remove legacy code from before vtk-6.1 (2014-01-21) f48e262 ENH: Add GatherV for vtkDataObjects 496947d BUG: Mismatch between # of points and # of tcoords results in segfault 784b5c5 BUG: XMLMultiBlockDataWriter always pointed to vtp files. 1aa9f59 BUG: Add additional baselines to deal # of digits in exponent. 9dff41c BUG: Fix uninitialized values that caused segfault. 5f3f8d0 BUG: Skiped a number when adding a baseline. 741f7c5 BUG: Skipped a number when adding a baseline. 8ff2926 BUG: Test passed because two wrongs made it right. de18c2e ENH: Ghost changes documentation update. 826f7a4 BUG: Fix initialization and typo problems. 76acfea BUG: Enable vtkFiltersSourcesPython-squadViewer only if Module_vtkRenderingTk 1d4eb79 BUG: vtkTestingInteractor cannot create timers which results in errors. 5ddf702 BUG: Fix link warnings for static build on windows. 7d6f8f1 BUG: Teach ImageSlice and ImageSliceMapper to deal with empty slices d12e800 BUG: InteractorEventRecorder bug results warning about passive observer. cdd2e19 BUG: Fix test volume of interest to match data extents 6fad8fe ENH: TestChangeInformation does not print error message. 5693e5f BUG: Fix warning 'Resetting view-up since view plane normal is parallel' 7f7eb20 BUG: Fix warning 'Resetting view-up since view plane normal is parallel' 04fbdbb BUG: This fixes a valgrind complaint. fe7c638 BUG: We need a Renderer for HasTranslucentPolygonalGeometry 2a3dcbd BUG: Fix version for ghost documentation. 96baf8e BUG: Get rid of error printouts from TestRIBExporter 59b354c BUG: Replace deprecated functions. f905347 BUG: vtkProbeFilter stored state which did not work for multi-block data. 50e3767 BUG: Initialize grids before adding them to the AMR dataset. 812cacd BUG: Test basic representation after you setup the object 4e531cd ENH: CanReadFile does not fail for newer file version. 70cb8dd ENH: Move test that discovers inconsistent structured grids in an AMR grid. 2331d5e BUG: Fix uninitialized value. Dave DeMarle (3): 3bec6b5 Increment version to VTK 6.3.0 b8d8b4e fix no newline comp warning 45aaa13 expose texture so manta can intercept David C. Lonie (59): a36b64f Enable freetype tests when matplotlib is not found. 71396ea Use a default text property in the labeled contour mapper. 4287d0f Don't use offscreen FBOs when multisampling is requested. 4b4fee9 Disable multisampling in the OSCone test. 3af3151 Enable MPL tests only if the vtk module is enabled. 4d07c85 Allow vtkTextActor* to handle empty inputs. 094258f Account for actor matrix in vtkLabeledContourMapper. 1d9e3ed Add a debug-only yellow dot at the text alignment point. e498377 Ensure that the background is rendered behind the text. f5ee8c1 Improve appearance of small-sized mathtext. 00ec47a Add missing ReleaseGraphicsResources implementation. 40ee682 Move test file (s/cpp/cxx) 4eb5c9e Remove unimplemented private method. 00d87aa Fix transformed contour label placement on OpenGL backend. 59e5478 Fix kerning on rotated fonts. 3ad3670 Update sources in chart symbol glyphs. e628d29 Add missing ReleaseGraphicsResources implementation. 6563825 Release actor resources in vtkLegendScaleActor. 842ab1d Use vtkTextRenderer in the default label render strategy. fa76112 Do not set vtkProperties on vtkTextMappers. 5711379 Fix vtkBiDimensionalRepresentation2D to work with new text mapper. fbcf24a Use string width, not length, to determine longest labels. 25d7412 Remove tcl [info command "rtExMath"] check from test. 8e045af Print image name on test failure. 9175559 Update vtkTextMapper's alignment to match current conventions. 953d3b7 Align to a fixed-height font bbox, rather than a "tight" one. 4f7460a Remove the RenderingFreeTypeOpenGL module. 0ac3ec4 Exercise the new default vtkTextMapper implementation. 1942a72 Update baselines. e0ea6f3 Add new baselines for dash3's continuous build. 06b656e Number baselines consecutively. 73d88b4 Baselines from nightlies. 5a0f0db Fix typo/platform issues in GLUT test. ca58fe7 Call glewInit() from test to setup GL function pointers. 6c386da Move PreserveColorBuffer to vtkRenderer. e51007d Fix glut header in test. b46206e Fix variable type. 44db5b7 Allow an explicit mapping between tprops and scalars for contour labels. 7247da0 Update make_pair call to work with newer MSVC. 061e56d Clean up Rendering/OpenGL2/vtkGenericOpenGLRenWin. e3d0653 Remind MSVC that NULL is a pointer. Fix tclPrintOtherTest. 9e2ac87 Change comment text to use a gentler tone. 755683e Release shaders after rendering is complete. 4dbf657 Define missing typedefs. db8bf29 Fix typo. c8d6551 Add vtkWindow::DetectDPI. 07e728b Add DPI awareness to text rendering. b08abb6 Apply kerning to bounding box calculations. c0a20f3 Don't glyph hidden points in vtkGlyph2D. 2606ebe Mark ticks as dirty when enabling/disabling log scale. 19736b2 Performance cleanup. 48b5509 Account for TileScale in RenderWindowToImage filter. ef328bc Fix vtkAxis scaling when TileScale is set on the renwin. bdf3b4c Defer matplotlib initialization for text rendering. 784ea23 Update Get macro for paraview parsers. fd6c85f Use max(tdx, tdy) to determine string bound scaling... f387250 Add a warning if there is not a scene set on the vtkAxis instance. 75dd5c6 Ensure that input data is synced. 1118440 Make ScalarBarRepresentation orientation set-able. David E DeMarle (1): 388428d Fix depth peeling with antialiasing David Gobbi (21): bdc156e BUG 15358: Remove inappropriate cast from pointer to long. 1c68b08 Add the vtkBoundingBox type to the Python wrappers. 3ecc5e4 Fix Java build, different extensions for file properties. 88693d2 Allow wrappers to properly support "using" methods. df0ebf0 Apply using declarations that hadn't been "used". 4c490b5 Add missing hints for color conversion methods. a8a773b Add virtual data method CopyInformationToPipeline. cf446e3 Fix vtkParseMerge uninitialized variable warnings. d49c2b3 Allow TestEmptyInput to work with python 2.5. 5dae245 Fix a null deref when wrapping "using" declarations. d3404f4 Enable the "using" declaration in vtkTypedArray.h. 8c665f6 Fix nifti sform, qform when qfac=-1. 2a8225b Fix uninitiazed array warning in vtkBSPlineInterpolator. a5423ee Put back some Visual Studio 2003 compatibility code. a4a1d20 Temporary wrapper fix, pointers to vtkSmartPointer. 6419591 Code style fixes. 90dfa37 Allow NIFTI reader and writer to handle planar RGB files. 3c9d962 Close the DICOM file immediately after reading it. 32f5e6d Fix blank slices that appear in some TIFF volumes. f978e5a Replace the O(n^2) median algorithm with an O(n) one. 85f46e7 Fix the median computation in vtkImageMedian3D. Ethan Brodsky (4): abf0892 ENH: Added edge annotations to vtkCornerAnnotation d4ce834 CMP: Eliminated warnings relating to for loop iterator scoping 6e85be4 BUG: Updated test baseline output for edge annotation be1c168 ENH: Modified vtkCornerAnnotation testing to improve code coverage Jean-Christophe Fillion-Robin (3): 3216198 Maintenance: 'main' function in WhatModulesVTK can now be re-used 5a4c7f9 Maintenance: Update WhatModulesVTK to support rendering backend e6e6737 Do not force manifest selection for vtkhdf5 libraries Joachim Pouderoux (9): d7fbc99 Bug #0015217: Fix tet aspect ratio computation. f8b7962 Fix filter crash when input data is not temporal 73b3d40 Add more support of Quadratic Polygon cells. 6c00664 Fix TessellatorFilter so it does not crash with quadratic polygon cells. 54f52ce Enhance and optimize Xdmf2 reader and writer to support static meshes. 5d3c7d6 code cleaning 7bb9fd4 Fix error with java wrapping a5e481d fix header test 90bd6dc Add test and fix reader John Tourtellott (6): dbd6a64 Apply WRAP_EXCLUDE to the vtkGDAL not vtkGDAL.h 649bf86 Add return value to vtkPythonInterpreter::RunSimpleString() 761a643 Add field data to vtkUniformGrid to save GDALDataset NoDataValue 5e1fc1b Fix indentation and restore empty line 5c97e44 Move variable declaration inside loop to limit its scope bf1cd7e Change iterator from postincrement to preincrement Julien Finet (11): ed30420 Kill TDX timer when using no WindowHandle e230dd6 Add TDX_INCLUDE_DIR CMake variable e2c265e Add multitouch support to QVTKWidget and QVTKWidget2 e8eab5f Add support for drawing multiple line segments 4dcaa29 Add vtkPlot::Selectable f7788b1 Add vtkPlotBag::BagVisible b6947ee Fix crash in vtkPlotHistogram2D 67221cf Exposes vtkHighestDensityRegionStatistics::ComputeHDR() to the public API 90f01a5 Fix unsorted range error in vtkChartSelectionHelper::BuildSelection 3de2198 Fix compilation by adding DrawLines() to OpenGL context devices 8cffe7a Fix unsafe mix of bool and int types Julien Jomier (1): a0a1fda BUG: Internal title box should be initialized KWSys Robot (3): ce26403 KWSys 2015-04-16 (1ea01a46) b27579e KWSys 2015-04-19 (4f39791b) d9dea80 KWSys 2015-05-12 (b1d560a0) Karsten Tausche (2): d482da9 fix copied noise extent in vtkImageDataLIC2D 239fc8e fix memory leak in vtkImageDataLIC2D Karsten Tausche (1): 65364aa Remove vtkFreeTypeUtilities.h from vtkScalarBarActorInternal.h Ken Martin (135): f5f9ecb Fix a couple issues cc429a5 Fix a regression and new failing test e6a31ed Fix interactions of depth peeling with the point gaussian mapper. 5157ca8 Fix a case where glyphic was failing on unlit primitives 4693f39 A couple depth peeling fixes 944ee02 A number of transparency related issues fixed d24fcf9 Forgot to comment out debug statement 4ea5a7c Fix for the case when there is nothing to draw 164ea25 Rename class back to the old name for better compatability 5d7ab89 Add in support for below and above range LUTs 5241388 Remove power of two requirement from image slice mapper e96f816 Remove window size change fec981b Add back in LIC for OpenGL2 aaf7c19 Rebased and merged due to conflicts 586cec4 Fix a compiler warning 4b7bd42 Some lic cleanup for ES 2 and ES 3 59b539a A few dashboard fixes as described below 7c341f6 Fix a few issues with ImageDataLIC2D 2e9ec3c A few more VR fixes I missed the first time fb11ced Fix PV text composite with cell data issues e0e1853 Fix issues with composite dataset luts issues 45591d9 Fixes for composite id when selecting on OpenGL2 8403d05 Fix failing test and add new convenience func 366f859 Add a valid image and a slight change to generated normals ec84991 Convert Context2D to use more modern OpenGL 935a4e0 I should learn to test on intel too before committing 8431029 Some fixes for bigmac b3ee0a4 Fix for draw pixels shows up in PV rubberband selection 3983827 Add some debugging code bf094a5 Minor compile fix for GL ES 20 c05ab35 Fix bad destructor c4ba26d redo how cell data is handled and picking a74d8a2 Add support for picking indirection arrays 1f5f80d Managed to get scale and bias for voluem rendering working b8a4007 Make VTK work with OpenGL 3.2 Core 326eed2 Make X windows default to a 3.2 context 780a38c Convert Cocoa to default to OpenGL 3.2 d2335a5 Some more fixes for apple to make VTK more 3.2 core compliant 2dead9d Even more OSX 3.2 changes eee2075 More 3.2 OpenGL fixes da3f65d Minor compiler warning fix 7b2d837 Minor change to pass line width calls through 8eefde5 Added valid images for cases where line width is over 1.0 e98e460 Add missing ReleasGraphicsResources call 0b9e80d Some exit cleanup fixes for debug mesa ece3886 redo how cell data is handled and picking 3d0c728 Add support for picking indirection arrays 600a014 Convert Cocoa to default to OpenGL 3.2 cbd2272 Even more OSX 3.2 changes fb2314a Minor compiler warning fix bbf6cff Add missing releasegraphicsresources bd18cf2 Rebasing from master 1d77180 Fix compile error b063141 Make sure GL_R32F is available on old 2.1 context 633408b Fix for apple 0d2b34b Some fixes for mesa master runs ac7ea9f Fix some compiler warnings 2e33724 Some compile fixes for OpenGLES af81970 Fix a few issues exposed by PV testing 92f01b8 Fix two compiler warnings. be37a5b A couple more picking fixes these related to processor id ebf82b8 Better Tk support for OpenGL2 e1266ff Instanced arrays require OpenGL 3.3 not 3.2 04a1604 Remove old style rendering check 898f9ee Fix for cell normals to use RGBA32F textures 21aafbb Renamed XOpenGLRenderWindowInteractor back to original name ad3e947 Added valid image for Sphere widget 5558b6a Fix for independent components on mesa 93549a2 Pare down the test to be about 40% faster bc47058 Some X window fixes and make two slow tests faster 4546439 Update the alternate image as well 4a79030 Fix apple ifdef 985cead Fix for some systems 529f482 Type fix a713041 Some fixes for checking framebuffer depths 7e2c26d New valid image due to line widths 06a4ef1 Tiny fix for OpenGL ES 3 a08d678 And whoa I committed a png undo that 86327d1 Add method for external codes 9d7da54 Support use of FieldDataTupleId in scalar coloring opengl2 9387545 Add a geometry shader and some cleanup and fixes f22f6f7 Do not use GeometryShaders on ES 792e805 Test out ogl2 as the default for buildbot systems 268c199 More fixes based on test dashboard e5626d9 Fix a couple more issues a268a76 Duh fix bas cmake code d2d4c4b Always use our glew 937fbaa Update to backend logic bdf999d Fix check for multisample support f10eea0 Newer logic so apps can set a default rendering backend 517c6a9 Set default back to OpenGL1 for commit 37f3940 Clenup some OpenGL2 code f153530 More cleanups 844bdfc Rebased to master 1ea2f37 Maybe fix memory leak 773d834 Fix a compiler issue with PV 37c7078 Fix for compile issue on OpenGLES cf2c8b1 Test fix for applie AMD primitiveID bug b0568e3 Better warning message 2bb9901 Add support for 2D 0ab71c6 Another apple fix 3634071 Fix memory leak 0fd7c34 Another compiler fix caaba79 Another fix due to multiple VBOs 591bfac Make the VAO code bind the bufferobject aa413e1 Remove reference to old header file 143ee02 Trying something 52624db Sticking with basic approach bd8e0ac Fix an atom rendering performance regression aed1b0f Remove a leftover test setting d62e074 Some more code cleanups, this time shader related 7e33a8f Remove some unused ivars eef02a7 Add ability for PointGaussianMapper to also just draw points 2bfd5b8 Fix test that was creating an ill defined camera 6148806 Update test to have more debugging d6a2968 Support wide lines in the polydata mappers on 3.2 3d4cf61 Fix prim id issue on mac 6d16798 More cleanup and fixes for 2D this time 3edf1f1 Fixes for failing tests 1ce4ac6 Fix issue on Apple efc7e9f A couple minor fixes that PV exposed d6da179 More minor fixes 60df241 Some fixes for PV ColorOpacityTableEditing ec9015c Make sure PV texture fix hits the other use cases 58d3c34 Fix for clear depth call on es cc85e52 Thick lines only use a GS when the hardware lacks support 7718bd9 Fix compiler issue on gcc bf98e34 Update to fix failing tests aae43de Better handling of thick lines in a couple places 69a266c Fix some recent compile issues 31cbc69 Some compiler fixes for Android 4de813d Fix missing header d117992 Fix issue with compositepolydatamapper2 with scalar colors 687a1ba Add valid image for non AA systems b0239b2 Apply fix to the generic version as well. Lin Ma (6): 7700895 Tested merge 741a3c5 Added vector for memoizing c9ac988 Modified vtkMath::Factorial ab660b6 Recursive stored intermediate results 4ebe46a Fixed bugs 95d52db Changed map to vector Marcus D. Hanwell (4): dd718a3 Added support for writing TIFF volume stacks 610d6fc Fix compiler warning - unsigned int -> int 10d1db4 Removed unused sstream include, add Windows logic ce110d7 Fix bug with bad TIFF tag on char/short format Mathieu Westphal (20): 042d540 Reimplementing AppendData using vtkDataArrayIteratorMacro and std::copy b117a06 Adding surface streamlines d658e82 VTK Style 80693cb Adding Angular Periodic Filter and Angular Periodic Array to VTK. b975b6d Correcting multiple bugs with periodic data array 35495b5 AngularPeriodicDataArray : Use of sin instead of sinf c5f4437 Correcting bugs in vtkCell implementation 2bfd773 Correcting pcoords in vtkTriangle a7f36eb Add a degenerate Triangle test in IntersectWithLine d4765f8 Correcting degenerate triangle 24a1090 Missing initialization of a member 48752b4 Fixing coincident point in stream tracer output 0189719 Correcting a warning in vtkLargeInteger 998fedf Adding another image for test 41e2929 Checking for Null vtkPoints in Angular Periodic Filter 11929ae Fixing 14897 mantis bug, adding VTKTargets.cmake in install 93e821f fixup python testing 61e11ad Deprecating FrontBuffer member and double passing tests if necesssary e180b45 First bug fix fro periodic filter a94c1c8 Fixing parallel periodic filter MetaIO developers (1): 9db8026 MetaIO 2015-03-18 (ebdd30dd) Nathan Fabian (6): b08448f Fixed possible nulls when FieldData are string arrays. dbf9f28 Detect when we're writing sets and don't write them as blocks. 48f899d NodeSets finally write out. 0aa18f1 Side sets now write out correctly. 4df652b Replaced the missing const b84020d Replaces iterator pointers with SmartPointers to avoid possible leaks. Robert Maynard (7): 7493f03 FindTBB: Updated implementation to version proposed for CMake. 7371346 Get SynchronizedTemplates3D to work with more than 4GB. 40004b2 Get ThreadedSynchronizedTemplates3D to work with more than 4GB. 93a6062 CONTRIBUTING: Add an overview of the development process e43e3a1 You can't close a null tiff pointer. 7ae792f Mark the entire Accelerators Piston module as legacy as of 6.3 9486611 Mark the entire Accelerators Dax module as legacy as of 6.3 Rolf Eike Beer (2): 985e779 ExternalData: Replace MATCHES with STREQUAL where possible a035ef4 ExternalData: Clean up duplicate regex matches with CMAKE_MATCH_ Sankhesh Jhaveri (69): 4183e79 Clipping test with oblique clipping planes 8b074c8 Explicitly set sample distance for timing test 27b1629 Make sure most voxels are rendered for timing test 7beb6cc Make the AMR Volume mapper available for GL2 backend 6497141 Added test with shading 929c87e Fix volume cropping issue 08b9c9e Circumvent crash in volume mapper when context changes c6847d0 Added test for change related to releasing resources 84d9a92 Added ivar for ContextChanged 80dfc56 Laxed restrictions on input data required by OpenGL2 volume mapper c518197 GPU volume mapper test for two independent components 222c7ca Added interaction and baseline to the two independent components test 95d8f88 Fix error in OpenGL2 volume mapper for multiple components 6b846f4 Test for GPU volume mapper with three independent component scalar data 33ab12e Test for two dependent component scalar data 28802b0 Modify test for three components 032bebe Fix two dependent components case for volume mapper 9cbcbb4 Reset scale and bias after loading volume 3b83fb4 Take per component range for setting default transfer functions 8ef7ac7 Use the appropriate components for transfer functions 10026fb Fix crash due to wrong index fetching of tables 8f2af4d Use the right component for opacity functions 48ae50a Added baselines for new tests 364ca40 New baseline for the independent components MinIP test bb59cae Fix lights issue in external render environments e7b5c09 Set spot parameters on the newly created lights c5c0794 Changed GLUT test to remove VTK lights 1fd0e34 Added ability to automatically resize external window 67bfb78 Account for window position when drawing in external context b2106a7 Fix lighting for external rendering environments ceca59d Update the GLUT test baseline 82c7c07 Added Generic OpenGL RenderWindow to OpenGL2 pipeline 58e3414 Enable OpenGL2 support for vtkRenderingExternal module 5c56449 Provide extension manager support to external rendering module 879efa4 Removed redundant tests and fixed crop test 2c6faab Streamlined testing without VolumeOpenGLNew tests e931627 Remove trailing references to VolumeOpenGLNew e030c3b Remove module VolumeOpenGLNew f05c60a Remove context caching from the volume mapper 6ad386c Remove unused variable warning dcd2ee8 Add API for auto-adjust sample distances to smart volume mapper 2a76dc5 Add convenience API to smart volume mapper 841ab6b Fix data trunctation issues with 32 bit int types 807e61e Enforcing GPU breaks old mapper compatibility for test 792b663 Fix AMR volume mapper for recent smartvolume mapper changes 381ebae Remove debug print messages 0eb9b1e PrintSelf newly added variable d9d8f10 Add new external light object ee190de Ability to modify externally created lights in the external renderer 95945ac Modify existing lights each render call 20251e0 Documentation changes 1987cce Change default for vtkExternalLight eb190e6 Performance optimization in external renderer d40aecd Fix external window stereo mode position for OpenGL2 backend aff7eb3 Fix near plane offset clipping when camera inside bb656ed New test for camera inside volume calculations 201f587 Added camera inside test for small spacing cd8ffef Update comment to reflect documentation 3b22e28 Add resolution specification capability to circle glyphs a93ff1d Add test for glyph 2D circle resolution 59c9de7 Fix test failure due to vtkMath::Random 4a8529b Fix constant array size issue c3921c5 Fix crash due to un-set point ID 83bdd85 Fix compile error when compiling vtkRenderingExternal b34cba0 Added test for GPU volume mapper jagged edges issue b4c9fc9 Restore concept of InteractiveUpdateRate for vtkSmartVolumeMapper 1013a56 Compute initial sample distance based on dataset spacing 40ec94e Interactively adjust sample distance for vtkSmartVolumeMapper 9b2883a Improve documentation of new variable in vtkSmartVolumeMapper Scott Wittenburg (8): ca58cc9 Support pvweb color editor widget and use of local storage by apps. 74ca669 Add a completely standalone tool for generating color swatch images. f8ee75a Support retrieving geometry for all timesteps in paraviewweb. a786577 Change framerate stats to show two decimals places. Fix stat table. 81a6eb0 Update autobahn client/server as well as vtkweb connect for longpoll. 6648549 Allow clients to know when a render occurred that was not stale. 566dc51 Fix how we import our argparse fallback implementation. 914dc33 Add synchronous methods to Base64-encode image data as png or jpg. Sean McBride (88): b54bce1 Unified mixed unsigned char/int usage to bool 3e546c7 Unconfused cppcheck by removing unneeded null check a310907 Moved dereference to after null check 4a03ebd Fixed typo: - should be -> 3a95956 Fixed || that should be && ab65dee Fixed contradictory ?if? statements fd6923e Fix division by zero cppcheck warnings af1c03d Fix clang warnings about implicit float->bool 364f7a5 Add asserts to silence clang analyzer warning bf7dbc5 Return upon error, otherwise invalid file reference is used 9557459 Fixed memory leaks found by cppcheck ae942ec Fix incorrectStringCompare cppcheck warning 00834ec Fixed cppcheck signConversion warning 430ca63 Made various float to bool conversions explicit da2c429 Removed unneeded casting c0f818b Fixed stack allocation to be properly aligned b85b5f6 Replace size() with empty() 2f2c9e3 Copy-paste error, duplicate ORing 13ee5b9 Add parens for less ambiguity, fix cppcheck warning dd72b67 Refactor & simplify to avoid cppcheck false positive 5da8067 Reverse order of AND statements 82d3857 Removed simple dead stores/statements found by cppcheck 604952c Refactor old school alignment test to use offsetof() 4753261 Remove the addition of a few inappropriate vtkErrorMacro 18f4050 Fix more include guards to not start with __vtk a283cf6 Removed dead code found by cppcheck 3cf511d Removed unneeded c_str() usage b1d2871 Silence clang analyzer warning c10d56b Fixed minor format string mismatch f1f33bc Fixed possible array overrun found by cppcheck c107164 Move index ?i? check after usage dedac30 Removed _probably_ dead code 87ecf6f Reformulate assert to pacify cppcheck bcba6da Fix null deref, likely due to && vs || typo e0c279f Fixed cppcheck warning about all-const params to strncmp 9cee046 Check ResizeAndExtend error result and bail 43cb029 Fixed division by zero found by cppcheck d8b8c82 Merged private function into destructor bfa040a Removed code dead since 2001. 0793af7 Removed code dead since 2003. 11a25a0 Removed code dead since 2001. 8c9bd60 Removed code dead since 2010. 52178c8 Removed code dead since 2006. 4b6fb46 Added static to many private globals 0fdb9d2 Fixed -Wformat-pedantic warnings 0f0e9a7 Removed dead code 7a30b8d Fixed all -Wswitch-enum warnings 7e18c39 Revert warning fix that caused another warning 5700d2e Fixed mismatch between ivars and get/set macros 418c62c Changed many int to vtkIdType 1a191c9 Fixed implicit float/double to bool conversion a16e53d Added explicit casts to fix Wconversion warnings acf0c22 Fixed memory leak in Cocoa code (regression) acc044c Fixed dead code warning on OS X 6770f4c Fixed unused parameter warning 4b38ce2 Fixed warning caused by warning fixes from other branch b1899a4 Fixed compiler error with div() introduced with Wconversion fixes d9e2b61 Changed vtkWriter::Write()'s return value ea9ebe8 Fixed illegal left shift of negative number 5b5c1f0 Fixed some warnings from PGI compiler dashboard 932c021 Fixed blunder in merge request #51 aca10d2 Added missing #include, causing some bots to not build 1383d57 Fixed -Wextra-semi warnings within VTK macros 2031f57 Fixed -Wextra-semi warnings in ThirdParty/alglib 0894f9a Fixed -Wextra-semi warnings in ThirdParty/ftgl 0fed50d Fixed -Wextra-semi warnings in ThirdParty/utf8 3cc4d9f Fix -Wimplicit-fallthrough warnings; introduce VTK_FALLTHROUGH d9ec645 Modernized Cocoa code to use NSTrackingArea 5678f1c Removed many unneeded null checks before delete 50d22d0 Changed placeholder value from 0.0 to 1.0, fixing undefined behaviour 6bfea2b Disambiguated use of term ?kilobyte? 1e8db01 Fix possible null deref by bailing early a7b7b30 Workaround cppcheck warning by refactoring loop 8525d6f Removed dead store found by cppcheck e385f7d Fix warning about identical comparisons f63ff5b Avoid cppcheck division by 0 warning 47ff51d Fixed null deref found by cppcheck f65f048 Fixed division by zero 4a537d8 Fixed STLReader regression vs VTK 5.10.1 9843c53 Fixed mismatch array new/delete found by clang -Wmismatched-new-delete ac738c6 Removed branches for _MSC_VER <= 1400. 9285a6b Removed branches for gcc 4.0 and lower. 5da4b99 Added #error for known old unsupported compilers c0f64bb Restored support for Apple gcc 4.2 a8dc81f Hopefully suppress ?used uninitialized? warnings 51f1fbe Replace VTKGL2 define with VTK_OPENGL2 668c687 Fixed ?no newline at end of file? warnings 2fc88bb Added VTK_FALLTHROUGH in case without break Sebastien Jourdain (1): 4551c40 Allow GetTuple6 to be preperly Wrapped Shawn Waldon (7): 8bb1cd3 Handle datatypes other than single precision float c8c13dd Add overloads to parallel communication methods 2d448c8 Update the documentation on data array subclasses 8e70864 Make java wrapping give files to javac via a response file f14f271 Add higher timeouts for some long running tests ba6f952 Force tests to run in serial db85b40 Remove "have tcoords" print statement Steven Hahn (1): 655c4cf Change while loop condition for osx. Sujin Philip (19): 95dcf8c Fix for windows warning suppressions not working e83da62 Fix SMP compile warning in VC++ a7d288f vtkThreadedSynchronizedTemplatesCutter3D e5ee5e7 Remove double underscores from header guard. e731f7d Add support tbb in local build dirs, and from composer installs. 78a5fff Improvements to vtkAtomicInt 09c3da0 Fixes for vtkAtomicInt issues from dashboard tests 9b585ed Improve OS X support in FindTBB e6356d8 Fix errors detected on Windows dashboards f12026b Fix usage of CriticalSectionGuard c342a01 Change vtkAtomicInt to vtkAtomic 8b809d5 Re-enable use of long for 64-bit vtkIdType fda6a31 Added Improved FindOpenMP module 4d26636 OpenMP backend for SMP 82eec30 Add vtkAtomic support headers to list of sources a0b05b2 Fix testing of MTime in TestAtomic e2c63d3 Fix cmake error when ${POLICY_VAR} is empty 2a505d9 Fix "#pragma warning" warning in gcc f51d10d Intel compiler 11.1 template typedef issue Utkarsh Ayachit (36): 9892e7f Added fake-stereo mode. 36385b4 Modified Matrix when it changes. 26d178b Make PushImageToScreen() virtual. f814879 Add test to demonstrate TIFF reader issue. 0460b1e Support random access in compressed tiff files. 02c49fb Remove invalid error message. 1093ae9 Avoid modifying vtkAxis unless things changed. 6c877c2 Adding area plot (vtkPlotArea). bdb5b5b Fix leaks in vtkExtractArraysOverTime. 8e079d3 Add alternative baseline for dashlin1. 3b8db8d Add missing 'close' to vtkPythonStdStreamCaptureHelper. 33ba83a BUG #14721: Add support for quadratic pyramid for Exodus reader. ea6f018 Revert "FIX: We don't select 2D annotations." d4b9145 Overcome wrapping issue with client-server wrappings in ParaView. 5c7bb1b Fixed warnings. 5c663b7 Extending API to get information about picked location. 06d553f BUG #15438: Handle NaN when computing array range. bf7967d BUG #0015512: Added ability to hide plots from the legend. 27984c3 BUG #15321: Fix mode_shape array. e66cef8 Remove vtkExodusIIReader::UpdateTimeInformation(). 636fc93 Cleanup initialization of TimeStepRange/ModeShapeRange. ea532fa Expose mode-shape-range meta-data to downstream filters. e4c6f5c BUG #15155: Fix issues with temporal interpolator. e449dfe Use AllGather instead of custom implementation of the same. 1be51c3 BUG #15445: Handle empty input datasets in vtkDistributedDataFilter. 23dff2b BUG #14897: Fix periodic boundary issues with vtkNetCDFCAMReader. 6ccc95c Avoid segfaults for multiblocks of vtkTable. 0e902ee Fixed invalid #ifs in vtkByteSwap. d3dee7d Make vtkMultiBlockPLOT3DReader factory overridable. bc18ac7 Add vtkMPIMultiBlockPLOT3DReader -- MPI-IO enabled reader for Plot3D. 695b481 Adding a basic test to test vtkMPIMultiBlockPLOT3DReader. 44c7f0b Cleaning python testing macros. 0786909 Win64 fixes for vtkMultiBlockPLOT3DReader. d955537 Fix typo in call to superclass method. 557ec61 Error checking: check status of collective call. 1c78797 Fix uninitialized memory reported by valgrind. Vincent Chen (4): 289ba8d Fixing outptr traversal bug in vtkImageResize 7af7f96 Modify Stencil Iterator to work under block mode. 262ac56 vtkVolumeRayCastSpaceLeapingImageFilter, 096c0eb vtkImageBlend row traversal bug Vittorio Parrella (2): 2111954 Fixed crash in PokeMatrix(NULL) if not called before with valid data. 6d4f792 Refactoring of Set/Get filename to model reader classes. Will Schroeder (8): 7542037 Fixed HandleDirection issues. 7f36d44 Performance improvements via templating and SMP 274efff Cleaned up dashboard warnings 2be4261 New Guassian splatter class, added multithreading a623741 Using typename instead of class for templates a6e1420 Work around brain dead compiler d0ee979 Another method made public to work around compiler 19b42e3 Another method made public to work around compiler(2) peter karasev (19): b28b038 add obj importer with test. fetches textured mtl files for test. f88bcf5 re-add test file that was quashed unintentionally 0ee04ed cleanup style issues per comments in gitlab ca1b041 update cmake for external data usage 9328465 update style and remove console output 8547ec8 more robust handling of path to texture files b740219 update test robustness, use freely distributable model files 3a92b7a exclude header so that vtkSmartPointer can be used ... 8973055 update md5 files in repo 3f6e3f0 remove previous md5 refs e782156 touch data files to get dashboard greener ef27b0b remove previous files 010c8b6 dont show warning about comments in MTL file unless debug mode on c71a789 add support for mixing usemtl and vertex definitions, add test for this. 966ccb3 touch files; previous commit encountered gitlab error 3ad923a make a pass at cleaning up warnings on cdash 71a39d3 disable warning in impl file. bc011db add test files 55e2914 fix importing to work for no mtl file + no warnings for empty texture image From the.1.lily at hotmail.com Sat Jul 25 11:21:03 2015 From: the.1.lily at hotmail.com (the lily) Date: Sat, 25 Jul 2015 18:21:03 +0300 Subject: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64" In-Reply-To: <20150723203621.GA27025@megas.kitware.com> References: , <20150723203621.GA27025@megas.kitware.com> Message-ID: No I included almost all the necessary libraries, these are the libraries I'm including -lvtkIOImage-6.1 -lvtkRenderingImage-6.1 -lvtkCommonDataModel-6.1 -lvtkCommonExecutionModel-6.1 -lvtkCommonCore-6.1 -lvtkTestingRendering-6.1 -lvtkRenderingVolumeOpenGL-6.1 -lvtkRenderingVolume-6.1 -lvtkRenderingOpenGL-6.1 -lvtkRenderingLabel-6.1 -lvtkRenderingLIC-6.1 -lvtkRenderingCore-6.1 -lvtkInteractionWidgets-6.1 -lvtkInfovisLayout-6.1 -lvtkImagingColor-6.1 -lvtkIOVideo-6.1 -lvtkIOAMR-6.1 -lvtkGeovisCore-6.1 -lvtkFiltersParallel-6.1 -lvtkFiltersCore-6.1 -lvtkFiltersAMR-6.1 -lvtkCommonSystem-6.1 -lvtkViewsInfovis-6.1 -lvtkViewsGeovis-6.1 -lvtkViewsCore-6.1 -lvtkViewsContext2D-6.1 -lvtkTestingGenericBridge-6.1 -lvtkRenderingVolumeAMR-6.1 -lvtkRenderingLabel-6.1 -lvtkRenderingLOD-6.1 -lvtkRenderingLIC-6.1 -lvtkRenderingGL2PS-6.1 -lvtkRenderingFreeTypeOpenGL-6.1 -lvtkRenderingFreeType-6.1 -lvtkRenderingContext2D-6.1 -lvtkRenderingAnnotation-6.1 -lvtkParallelCore-6.1 -lvtkInteractionStyle-6.1 -lvtkInteractionImage-6.1 -lvtkInfovisLayout-6.1 -lvtkInfovisCore-6.1 -lvtkImagingStencil-6.1 -lvtkImagingStatistics-6.1 -lvtkImagingSources-6.1 -lvtkImagingMorphological-6.1 -lvtkImagingMath-6.1 -lvtkImagingHybrid-6.1 -lvtkImagingGeneral-6.1 -lvtkImagingFourier-6.1 -lvtkImagingCore-6.1 -lvtkImagingColor-6.1 -lvtkIOXMLParser-6.1 -lvtkChartsCore-6.1 -lvtkCommonColor-6.1 -lvtkCommonComputationalGeometry-6.1 -lvtkIOXML-6.1 -lvtkIOMovie-6.1 -lvtkCommonMisc-6.1 -lvtkCommonExecutionModel-6.1 -lvtkChartsCore-6.1 -lvtkCommonTransforms-6.1 -lvtkDomainsChemistry-6.1 -lvtkFiltersGeneral-6.1 -lvtkFiltersHybrid-6.1 -lvtkFiltersModeling-6.1 -lvtkFiltersSMP-6.1 -lvtkFiltersSources-6.1 -lvtkFiltersTexture-6.1 -lvtkIOExport-6.1 -lvtkIOGeometry-6.1 -lvtkIOImport-6.1 -lvtkIOMINC-6.1 -lvtkInfovisLayout-6.1 -lvtkRenderingLabel-6.1 -lvtkCommonMath-6.1 -lvtkCommonSystem-6.1 -lvtkFiltersGeometry-6.1 -lvtkIOCore-6.1 -lvtkIOExodus-6.1 -lvtkIOInfovis-6.1 -lvtkIOLSDyna-6.1 -lvtkIOLegacy-6.1 -lvtkIOMINC-6.1 -lvtkIONetCDF-6.1 -lvtkIOSQL-6.1 -lvtksys-6.1 -lvtkpng-6.1 Here is part of the error I'm getting "std::__1::basic_string, std::__1::allocator >::__init(char const*, unsigned long, unsigned long)", referenced from: std::__1::basic_string, std::__1::allocator > std::__1::operator+, std::__1::allocator >(std::__1::basic_string, std::__1::allocator > const&, char) in libvtksys-6.1.a(SystemTools.cxx.o) std::__1::basic_string, std::__1::allocator > std::__1::operator+, std::__1::allocator >(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&) in libvtksys-6.1.a(SystemTools.cxx.o) std::__1::basic_string, std::__1::allocator > std::__1::operator+, std::__1::allocator >(std::__1::basic_string, std::__1::allocator > const&, char const*) in libvtksys-6.1.a(SystemTools.cxx.o) and _vtk_png_reset_zstream in libvtkpng-6.1.a(png.c.o) ld: symbol(s) not found for architecture x86_64 > Date: Thu, 23 Jul 2015 16:36:21 -0400 > From: ben.boeckel at kitware.com > To: the.1.lily at hotmail.com > CC: vtkusers at vtk.org > Subject: Re: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64" > > On Thu, Jul 23, 2015 at 20:56:47 +0300, the lily wrote: > > I built VTK on OSX 10.9 using the following tutorial > > http://stackoverflow.com/questions/17329258/how-to-install-vtk-6-1-for-osx-10-8-with-cocoa-xcode-support > > I'm trying to use VTK in my code but I'm having trouble liking VTK my > > code. I'm not sure what is the problem. Is it the gcc version? or is > > it the way I'm linking the libraries? I'm using the following > > directory Users/lily/VTK/VTKBuild/libthis is part of the error I'm > > getting > > "_vtk_png_create_info_struct", referenced from: > > vtkPNGWriter::WriteSlice(vtkImageData*, int*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o) > > > What's the link line you're using? You're likely missing -lvtkpng-6.1. > > --Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From abdul.sw84 at gmail.com Sun Jul 26 11:24:37 2015 From: abdul.sw84 at gmail.com (Abdul Abdul) Date: Sun, 26 Jul 2015 17:24:37 +0200 Subject: [vtkusers] Iterating through vtkFloatArray Message-ID: Hello, I noticed that the return type of a function I'm calling is vtkFloatArray. I want to check the components of this array, but, not sure how to iterate through its components. Since when I tried to iterate through the elements, I got the following error: TypeError: 'vtkobject' object is not iterable Why am I getting such error? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Sun Jul 26 11:32:29 2015 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sun, 26 Jul 2015 15:32:29 +0000 (UTC) Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: <20150724190754.GA29467@megas.kitware.com> References: <20150724190754.GA29467@megas.kitware.com> Message-ID: <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> Hi to AllI built VTK 6.3.0 in win32 with Qt 5.5.0,tcl/tk 8.6.3 and Python 2.7 and test examples. All worksBut I don't know how to built vtkRenderingFreeTypeOpenGL-6.3.lib Thank you. Leonid From: Ben Boeckel To: vtk-developers at vtk.org; vtkusers at vtk.org Cc: Kitware Corporate Communications Sent: Friday, July 24, 2015 10:07 PM Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready The VTK developement team is happy to announce that VTK 6.3 has entered 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. The official release notes will be available when VTK final is released in the next few weeks. In the meantime here is a preview: ? - new OpenMP backend for vtkSMPTools; ? - new MPI-IO backend for PLOT3D reader; ? - new vtkPlotArea for rendering area (or range) plots; ? - multithreaded Gaussian splatter class; ? - multithreading support in the vtkSampleFunction; ? - compiler uplifts: gcc-4.1 and Visual Studio 2008 or newer are ? ? required; ? - the Piston and Dax accelerator modules are deprecated; ? - writing side and node sets in Exodus files; ? - skip NaN values in vtkDataArray::GetRange(); ? - reading compressed TIFF files with sub-extents; ? - support for OpenGL 3.2 in the (still experimental, but much less so) ? ? OpenGL2 backend; ? - text rendering now respects the DPI of the vtkWindow; ? - vtkAxis respects the TileScale setting of vtkWindow; And many bug fixes across the codebase. We hope you enjoy this release of VTK! As always, contact Kitware and the mailing lists for assistance. Thanks, --Ben _______________________________________________ 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 abdul.sw84 at gmail.com Sun Jul 26 11:38:12 2015 From: abdul.sw84 at gmail.com (Abdul Abdul) Date: Sun, 26 Jul 2015 17:38:12 +0200 Subject: [vtkusers] Testing contents of vtkFloatArray Message-ID: Hello, vtkFloatArray is an array of values of type float. How can I test that all contents of such array are numeric? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sayanmaity.10 at gmail.com Sun Jul 26 12:00:01 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Sun, 26 Jul 2015 09:00:01 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> <1437503473719-5733024.post@n5.nabble.com> Message-ID: <1437926401848-5733103.post@n5.nabble.com> Dear Cory, I have addressed the situation of Memory overflowing issue by bringing down the the z-dimension resolution resulted in less number of series images that can be easily visualized using VTK. Just wondering to follow your other suggestion of using "Tetgen" library, *is it possible to use the vtk Unstructured grid data in "Tetgen" library. Or, I have to read the entire sequence of the 2D series images by using functionalities from "Tetgen" library.* Any suggestion will be highly appreciated. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733103.html Sent from the VTK - Users mailing list archive at Nabble.com. From sayanmaity.10 at gmail.com Sun Jul 26 12:58:01 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Sun, 26 Jul 2015 09:58:01 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1437926401848-5733103.post@n5.nabble.com> References: <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> <1437503473719-5733024.post@n5.nabble.com> <1437926401848-5733103.post@n5.nabble.com> Message-ID: <1437929881971-5733104.post@n5.nabble.com> Hi Cory, I already build Tet-gen as a callable-library on Windows using CMake & then Visual Studio following the steps: http://lightspeedbanana.blogspot.com/2014/03/building-tetgen-as-library-on-windows.html *Please give me some suggestion how to include the Vtk Image data/ Unstructured grid data to visualize the 2D series *.tiff data. * Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733104.html Sent from the VTK - Users mailing list archive at Nabble.com. From abdul.sw84 at gmail.com Sun Jul 26 13:28:14 2015 From: abdul.sw84 at gmail.com (Abdul Abdul) Date: Sun, 26 Jul 2015 19:28:14 +0200 Subject: [vtkusers] Length of array Message-ID: Hello, Does the function GetNumberOfComponents() return the length of a vtk array? Or, there is another function that can be used in this regard? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Sun Jul 26 15:36:04 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Sun, 26 Jul 2015 15:36:04 -0400 Subject: [vtkusers] Length of array In-Reply-To: References: Message-ID: GetNumberOfTuples returns the number of entries in the array (the length). GetNumberOfComponents returns the number of elements in each entry. For example and array holding temperature would be 1, an array for wind direction could be 2, an array for RGB colors would be 3 etc. Multiply the two by GetDataTypeSize will give you the total number of bytes. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sun, Jul 26, 2015 at 1:28 PM, Abdul Abdul wrote: > Hello, > > Does the function GetNumberOfComponents() > > return the length of a vtk array? Or, there is another function that can be > used in this regard? > > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.melis at surfsara.nl Mon Jul 27 06:05:43 2015 From: paul.melis at surfsara.nl (Paul Melis) Date: Mon, 27 Jul 2015 12:05:43 +0200 Subject: [vtkusers] Python wrapping (outside VTK source tree), almost there Message-ID: <55B60277.5060201@surfsara.nl> Hi all, I'm trying to get a custom interactor (deriving from vtkInteractorStyle) wrapped in Python with VTK 6.2. This is with building the wrappers outside of the VTK source tree. I managed to piece together a set of cmake commands that at least generates wrapper code and compiles ok, based on http://www.vtk.org/Wiki/VTK/Python_Wrapping_FAQ and other sources. But it seems at least one of the Python-wrapped VTK libraries is not linked in, causing the module load in Python to fail: $ py -c 'import vtkGamepadPython' Traceback (most recent call last): File "", line 1, in ImportError: ./vtkGamepadPython.so: undefined symbol: PyVTKClass_vtkInteractorStyleNew The missing symbol is in the libvtkRenderingCorePython library: $ nm -C -D ~/software/vtk-6.2.0-opengl2/lib/libvtkRenderingCorePython27D-6.2.so|grep PyVTKClass_vtkInteractorStyleNew 0000000000161aa0 T PyVTKClass_vtkInteractorStyleNew But the other wrapping examples I find on the web don't seem to explicitly add linking of ...Python?D... libraries, so I figure I'm missing some variable or other in the cmake calls somewhere that implicitly adds extra dependencies. As the whole wrapping infrastructure feels quite fragile already, I'd rather not add all kinds of hacks to get it working :) So if somebody knows The Right Way (TM) to get VTK wrapping in this situation to work... The relevant cmake code is at https://github.com/paulmelis/vtk-wrapping-example/blob/master/src/CMakeLists.txt The full code (just a few files) is at https://github.com/paulmelis/vtk-wrapping-example Regards, Paul -- Paul Melis | Visualization group leader & developer | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | From david.lonie at kitware.com Mon Jul 27 08:29:58 2015 From: david.lonie at kitware.com (David Lonie) Date: Mon, 27 Jul 2015 08:29:58 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> References: <20150724190754.GA29467@megas.kitware.com> <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Sun, Jul 26, 2015 at 11:32 AM, Leonid Dulman wrote: > Hi to All > I built VTK 6.3.0 in win32 with Qt 5.5.0,tcl/tk 8.6.3 and Python 2.7 and > test examples. All works > But I don't know how to built vtkRenderingFreeTypeOpenGL-6.3.lib > Thank you. Leonid > The RenderingFreeTypeOpenGL module no longer exists -- it only implemented a single class (vtkFreeTypeOpenGLTextMapper), which has been reimplemented in vtkTextMapper to reuse the same rendering backend as the other text objects. Since the old implementation will not be compatible with the OpenGL2 backend, it has been removed. Best, Dave > *From:* Ben Boeckel > *To:* vtk-developers at vtk.org; vtkusers at vtk.org > *Cc:* Kitware Corporate Communications > *Sent:* Friday, July 24, 2015 10:07 PM > *Subject:* [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready > > The VTK developement team is happy to announce that VTK 6.3 has entered > 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. > > The official release notes will be available when VTK final is released > in the next few weeks. In the meantime here is a preview: > > - new OpenMP backend for vtkSMPTools; > - new MPI-IO backend for PLOT3D reader; > - new vtkPlotArea for rendering area (or range) plots; > - multithreaded Gaussian splatter class; > - multithreading support in the vtkSampleFunction; > - compiler uplifts: gcc-4.1 and Visual Studio 2008 or newer are > required; > - the Piston and Dax accelerator modules are deprecated; > - writing side and node sets in Exodus files; > - skip NaN values in vtkDataArray::GetRange(); > - reading compressed TIFF files with sub-extents; > - support for OpenGL 3.2 in the (still experimental, but much less so) > OpenGL2 backend; > - text rendering now respects the DPI of the vtkWindow; > - vtkAxis respects the TileScale setting of vtkWindow; > > And many bug fixes across the codebase. > > We hope you enjoy this release of VTK! As always, contact Kitware and > the mailing lists for assistance. > > Thanks, > > --Ben > > _______________________________________________ > 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 david.gobbi at gmail.com Mon Jul 27 09:03:47 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 27 Jul 2015 07:03:47 -0600 Subject: [vtkusers] Python wrapping (outside VTK source tree), almost there In-Reply-To: <55B60277.5060201@surfsara.nl> References: <55B60277.5060201@surfsara.nl> Message-ID: Hi Paul, The list of PythonD libraries that you need to link is not exported, but it can be built from a list of the modules that you derived your own classes from, e.g.: set(VTK_MODULES_USED vtkInteractionStyle) set(VTK_PYTHOND_LIBS) foreach(TMP_LIB ${VTK_MODULES_USED}) set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) endforeach() - David On Mon, Jul 27, 2015 at 4:05 AM, Paul Melis wrote: > Hi all, > > I'm trying to get a custom interactor (deriving from vtkInteractorStyle) > wrapped in Python with VTK 6.2. This is with building the wrappers outside > of the VTK source tree. > > I managed to piece together a set of cmake commands that at least > generates wrapper code and compiles ok, based on > http://www.vtk.org/Wiki/VTK/Python_Wrapping_FAQ and other sources. > > But it seems at least one of the Python-wrapped VTK libraries is not > linked in, causing the module load in Python to fail: > > $ py -c 'import vtkGamepadPython' > Traceback (most recent call last): > File "", line 1, in > ImportError: ./vtkGamepadPython.so: undefined symbol: > PyVTKClass_vtkInteractorStyleNew > > The missing symbol is in the libvtkRenderingCorePython library: > > $ nm -C -D ~/software/vtk-6.2.0-opengl2/lib/ > libvtkRenderingCorePython27D-6.2.so|grep PyVTKClass_vtkInteractorStyleNew > 0000000000161aa0 T PyVTKClass_vtkInteractorStyleNew > > But the other wrapping examples I find on the web don't seem to explicitly > add linking of ...Python?D... libraries, so I figure I'm missing some > variable or other in the cmake calls somewhere that implicitly adds extra > dependencies. > > As the whole wrapping infrastructure feels quite fragile already, I'd > rather not add all kinds of hacks to get it working :) > > So if somebody knows The Right Way (TM) to get VTK wrapping in this > situation to work... > > The relevant cmake code is at > > https://github.com/paulmelis/vtk-wrapping-example/blob/master/src/CMakeLists.txt > > The full code (just a few files) is at > https://github.com/paulmelis/vtk-wrapping-example > > Regards, > Paul > > -- > > Paul Melis > | Visualization group leader & developer | SURFsara | > | Science Park 140 | 1098 XG Amsterdam | > | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Jul 27 09:22:55 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 27 Jul 2015 09:22:55 -0400 Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: <1437929881971-5733104.post@n5.nabble.com> References: <1436832635014-5732876.post@n5.nabble.com> <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> <1437503473719-5733024.post@n5.nabble.com> <1437926401848-5733103.post@n5.nabble.com> <1437929881971-5733104.post@n5.nabble.com> Message-ID: Tetgen will generate an unstructured grid for you. You need to provide it a surface that defines the boundary of the mesh. tetgen does not read VTK files directly, but you could easily convert the surface you have from thresholding the volume to an STL or PLY file that tetgen can read. See, e.g. [1]. If you are going this route, you just need to get the surface of your volume - you can do this with the vtkContourFilter applied to your full 3D stack of images. [1] http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/WriteSTL On Sun, Jul 26, 2015 at 12:58 PM, Neel007 wrote: > Hi Cory, > > I already build Tet-gen as a callable-library on Windows using CMake & then > Visual Studio following the steps: > > http://lightspeedbanana.blogspot.com/2014/03/building-tetgen-as-library-on-windows.html > > *Please give me some suggestion how to include the Vtk Image data/ > Unstructured grid data to visualize the 2D series *.tiff data. > * > Thanks. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733104.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 paul.melis at surfsara.nl Mon Jul 27 09:33:46 2015 From: paul.melis at surfsara.nl (Paul Melis) Date: Mon, 27 Jul 2015 15:33:46 +0200 Subject: [vtkusers] Python wrapping (outside VTK source tree), almost there In-Reply-To: References: <55B60277.5060201@surfsara.nl> Message-ID: <55B6333A.9070706@surfsara.nl> Thanks for the quick reply, David. That indeed was the missing piece of information, it works now! Paul On 27-07-15 15:03, David Gobbi wrote: > Hi Paul, > > The list of PythonD libraries that you need to link is not exported, but > it can be built from a list of the modules that you derived your own > classes from, e.g.: > > set(VTK_MODULES_USED vtkInteractionStyle) > set(VTK_PYTHOND_LIBS) > foreach(TMP_LIB ${VTK_MODULES_USED}) > set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) > endforeach() > > - David > > On Mon, Jul 27, 2015 at 4:05 AM, Paul Melis > wrote: > > Hi all, > > I'm trying to get a custom interactor (deriving from > vtkInteractorStyle) wrapped in Python with VTK 6.2. This is with > building the wrappers outside of the VTK source tree. > > I managed to piece together a set of cmake commands that at least > generates wrapper code and compiles ok, based on > http://www.vtk.org/Wiki/VTK/Python_Wrapping_FAQ and other sources. > > But it seems at least one of the Python-wrapped VTK libraries is not > linked in, causing the module load in Python to fail: > > $ py -c 'import vtkGamepadPython' > Traceback (most recent call last): > File "", line 1, in > ImportError: ./vtkGamepadPython.so: undefined symbol: > PyVTKClass_vtkInteractorStyleNew > > The missing symbol is in the libvtkRenderingCorePython library: > > $ nm -C -D > ~/software/vtk-6.2.0-opengl2/lib/libvtkRenderingCorePython27D-6.2.so > |grep > PyVTKClass_vtkInteractorStyleNew > 0000000000161aa0 T PyVTKClass_vtkInteractorStyleNew > > But the other wrapping examples I find on the web don't seem to > explicitly add linking of ...Python?D... libraries, so I figure I'm > missing some variable or other in the cmake calls somewhere that > implicitly adds extra dependencies. > > As the whole wrapping infrastructure feels quite fragile already, > I'd rather not add all kinds of hacks to get it working :) > > So if somebody knows The Right Way (TM) to get VTK wrapping in this > situation to work... > > The relevant cmake code is at > https://github.com/paulmelis/vtk-wrapping-example/blob/master/src/CMakeLists.txt > > The full code (just a few files) is at > https://github.com/paulmelis/vtk-wrapping-example > > Regards, > Paul > > -- > > Paul Melis > | Visualization group leader & developer | SURFsara | > | Science Park 140 | 1098 XG Amsterdam | > | T 020 800 1312 | paul.melis at surfsara.nl > | www.surfsara.nl > | > > -- Paul Melis | Visualization group leader & developer | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | From ninarock at list.ru Mon Jul 27 09:41:54 2015 From: ninarock at list.ru (Butterfly) Date: Mon, 27 Jul 2015 06:41:54 -0700 (MST) Subject: [vtkusers] vtkSliderRepresentation2D bug? In-Reply-To: <1313746661276-4715056.post@n5.nabble.com> References: <1313746661276-4715056.post@n5.nabble.com> Message-ID: <1438004514560-5733117.post@n5.nabble.com> I have the same problem, I use VTK 6.2.0, the issue still repeats. Can anyone please help? Has anyone a fix for this or a workaround? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSliderRepresentation2D-bug-tp4715056p5733117.html Sent from the VTK - Users mailing list archive at Nabble.com. From sayanmaity.10 at gmail.com Mon Jul 27 09:45:12 2015 From: sayanmaity.10 at gmail.com (Neel007) Date: Mon, 27 Jul 2015 06:45:12 -0700 (MST) Subject: [vtkusers] Does vtkImageBlend or vtkAppendPolyData generate 3D / Volumetric representation of 2D Image Data or PolyData respectively In-Reply-To: References: <1437428604623-5733001.post@n5.nabble.com> <1437430956334-5733002.post@n5.nabble.com> <1437500791052-5733022.post@n5.nabble.com> <1437503473719-5733024.post@n5.nabble.com> <1437926401848-5733103.post@n5.nabble.com> <1437929881971-5733104.post@n5.nabble.com> Message-ID: <1438004712973-5733118.post@n5.nabble.com> Thanks a lot, will work on it and keep you posted. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkImageBlend-or-vtkAppendPolyData-generate-3D-Volumetric-representation-of-2D-Image-Data-or-Poy-tp5732834p5733118.html Sent from the VTK - Users mailing list archive at Nabble.com. From MEEHANBT at nv.doe.gov Mon Jul 27 10:48:35 2015 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Mon, 27 Jul 2015 14:48:35 +0000 Subject: [vtkusers] Iterating through vtkFloatArray In-Reply-To: <201507261524.t6QFOtVG030161-t6QFOtVH030161@mta-1.nv.doe.gov> References: <201507261524.t6QFOtVG030161-t6QFOtVH030161@mta-1.nv.doe.gov> Message-ID: The Wiki has some good examples of how to use vtkFloatArray: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/KnownLengthArray The source code documentation also has many examples of how to use it: http://www.vtk.org/doc/nightly/html/c2_vtk_e_2.html#c2_vtk_e_vtkFloatArray From: vtkusers > on behalf of Abdul Abdul > Date: Sunday, July 26, 2015 at 8:24 AM To: "vtkusers at vtk.org" > Subject: [vtkusers] Iterating through vtkFloatArray Hello, I noticed that the return type of a function I'm calling is vtkFloatArray. I want to check the components of this array, but, not sure how to iterate through its components. Since when I tried to iterate through the elements, I got the following error: TypeError: 'vtkobject' object is not iterable Why am I getting such error? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaorobertojr88 at gmail.com Mon Jul 27 10:56:33 2015 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Mon, 27 Jul 2015 07:56:33 -0700 (MST) Subject: [vtkusers] Renderer transparent background Message-ID: <1438008993100-5733120.post@n5.nabble.com> Dear VTK Users, Is it possible to apply opacity/transparency only to the renderer background? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Renderer-transparent-background-tp5733120.html Sent from the VTK - Users mailing list archive at Nabble.com. From jian.cheng.1983 at gmail.com Mon Jul 27 13:45:36 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Mon, 27 Jul 2015 13:45:36 -0400 Subject: [vtkusers] Fwd: webgl output of VTKPolyData.py In-Reply-To: <55B65C88.9010307@gmail.com> References: <55B65C88.9010307@gmail.com> Message-ID: <55B66E40.1030607@gmail.com> Hi, The webgl output of VTKPolyData.py has different color from the output of vtk renderer. The script VTKPolyData.py is from ITKExamples. See this blog by Matt. http://www.kitware.com/blog/home/post/680 http://itk.org/gitweb?p=ITKExamples.git;a=blob;f=Utilities/Visualization/VTKPolyData.py I would like to use VTKPolyData.py to visualize a vtk file test.vtk. The file can be downloaded from https://www.dropbox.com/s/asr05bdu67fttgl/test.vtk?dl=0 When I tried VTKPolyData.py test.vtk It showed But when I enabled webgl, tried VTKPolyData.py test.vtk --webgl abcde.html The output abcd.html in firefox and chrome is Is there anyone who can help me? Thanks. best, Jian -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 48387 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 51585 bytes Desc: not available URL: From jens.g.w.schmidt at gmx.de Mon Jul 27 13:46:10 2015 From: jens.g.w.schmidt at gmx.de (Jens Schmidt) Date: Mon, 27 Jul 2015 19:46:10 +0200 Subject: [vtkusers] Camera is not updated Message-ID: <55B66E62.8090305@gmx.de> 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 From sebastien.jourdain at kitware.com Mon Jul 27 14:13:48 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 27 Jul 2015 12:13:48 -0600 Subject: [vtkusers] Fwd: webgl output of VTKPolyData.py In-Reply-To: <55B66E40.1030607@gmail.com> References: <55B65C88.9010307@gmail.com> <55B66E40.1030607@gmail.com> Message-ID: Hi Jian, the reason here is that the data you try to look at is not a scalar field but a RGBA type of information. The WebGL exported is looking for a field (I think) and get confused. You may need to generate a field here and use a lookup table with it. You can also try to use ParaView to load and export the data in WebGL. Seb On Mon, Jul 27, 2015 at 11:45 AM, Jian Cheng wrote: > > Hi, > > The webgl output of VTKPolyData.py has different color from the output of > vtk renderer. > > The script VTKPolyData.py is from ITKExamples. See this blog by Matt. > http://www.kitware.com/blog/home/post/680 > > http://itk.org/gitweb?p=ITKExamples.git;a=blob;f=Utilities/Visualization/VTKPolyData.py > I would like to use VTKPolyData.py to visualize a vtk file test.vtk. The > file can be downloaded from > https://www.dropbox.com/s/asr05bdu67fttgl/test.vtk?dl=0 > > When I tried > VTKPolyData.py test.vtk > It showed > > > But when I enabled webgl, tried > VTKPolyData.py test.vtk --webgl abcde.html > The output abcd.html in firefox and chrome is > > > Is there anyone who can help me? Thanks. > > best, > Jian > > > > > _______________________________________________ > 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: not available Type: image/png Size: 48387 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 51585 bytes Desc: not available URL: From sean at rogue-research.com Mon Jul 27 14:31:13 2015 From: sean at rogue-research.com (Sean McBride) Date: Mon, 27 Jul 2015 14:31:13 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: References: <20150724190754.GA29467@megas.kitware.com> <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150727183113.249732046@mail.rogue-research.com> On Mon, 27 Jul 2015 08:29:58 -0400, David Lonie said: >> Hi to All >> I built VTK 6.3.0 in win32 with Qt 5.5.0,tcl/tk 8.6.3 and Python 2.7 and >> test examples. All works >> But I don't know how to built vtkRenderingFreeTypeOpenGL-6.3.lib >> Thank you. Leonid >> > >The RenderingFreeTypeOpenGL module no longer exists -- it only implemented >a single class (vtkFreeTypeOpenGLTextMapper), which has been reimplemented >in vtkTextMapper to reuse the same rendering backend as the other text >objects. Since the old implementation will not be compatible with the >OpenGL2 backend, it has been removed. This surprised me when I rebuilt a few weeks ago too. It might become a FAQ. I think it should be mentioned in the release notes, as quite a few of us use CMake to build VTK itself, but don't use it to build whatever we're linking VTK into. 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 cory.quammen at kitware.com Mon Jul 27 14:31:56 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 27 Jul 2015 14:31:56 -0400 Subject: [vtkusers] Camera is not updated In-Reply-To: <55B66E62.8090305@gmx.de> References: <55B66E62.8090305@gmx.de> Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Mon Jul 27 14:34:37 2015 From: david.lonie at kitware.com (David Lonie) Date: Mon, 27 Jul 2015 14:34:37 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: <20150727183113.249732046@mail.rogue-research.com> References: <20150724190754.GA29467@megas.kitware.com> <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> <20150727183113.249732046@mail.rogue-research.com> Message-ID: On Mon, Jul 27, 2015 at 2:31 PM, Sean McBride wrote: > On Mon, 27 Jul 2015 08:29:58 -0400, David Lonie said: > > >> Hi to All > >> I built VTK 6.3.0 in win32 with Qt 5.5.0,tcl/tk 8.6.3 and Python 2.7 and > >> test examples. All works > >> But I don't know how to built vtkRenderingFreeTypeOpenGL-6.3.lib > >> Thank you. Leonid > >> > > > >The RenderingFreeTypeOpenGL module no longer exists -- it only implemented > >a single class (vtkFreeTypeOpenGLTextMapper), which has been reimplemented > >in vtkTextMapper to reuse the same rendering backend as the other text > >objects. Since the old implementation will not be compatible with the > >OpenGL2 backend, it has been removed. > > This surprised me when I rebuilt a few weeks ago too. It might become a > FAQ. I think it should be mentioned in the release notes Agreed! This is on me, I missed that point when I was summarizing my changes for the release notes. Ben/DaveD, can we add this to the notes? - Removed the deprecated RenderingFreeTypeOpenGL module. The functionality of this module has been replaced by the vtkTextRenderer and vtkTextMapper classes in the RenderingCore module. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Jul 27 14:48:36 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 27 Jul 2015 14:48:36 -0400 Subject: [vtkusers] [vtk-developers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: References: <20150724190754.GA29467@megas.kitware.com> <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> <20150727183113.249732046@mail.rogue-research.com> Message-ID: Yep thanks. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Jul 27, 2015 at 2:34 PM, David Lonie wrote: > On Mon, Jul 27, 2015 at 2:31 PM, Sean McBride > wrote: > >> On Mon, 27 Jul 2015 08:29:58 -0400, David Lonie said: >> >> >> Hi to All >> >> I built VTK 6.3.0 in win32 with Qt 5.5.0,tcl/tk 8.6.3 and Python 2.7 >> and >> >> test examples. All works >> >> But I don't know how to built vtkRenderingFreeTypeOpenGL-6.3.lib >> >> Thank you. Leonid >> >> >> > >> >The RenderingFreeTypeOpenGL module no longer exists -- it only >> implemented >> >a single class (vtkFreeTypeOpenGLTextMapper), which has been >> reimplemented >> >in vtkTextMapper to reuse the same rendering backend as the other text >> >objects. Since the old implementation will not be compatible with the >> >OpenGL2 backend, it has been removed. >> >> This surprised me when I rebuilt a few weeks ago too. It might become a >> FAQ. I think it should be mentioned in the release notes > > > Agreed! This is on me, I missed that point when I was summarizing my > changes for the release notes. > > Ben/DaveD, can we add this to the notes? > > - Removed the deprecated RenderingFreeTypeOpenGL module. The functionality > of this module has been replaced by the vtkTextRenderer and vtkTextMapper > classes in the RenderingCore module. > > Dave > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Mon Jul 27 14:51:18 2015 From: sean at rogue-research.com (Sean McBride) Date: Mon, 27 Jul 2015 14:51:18 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: References: <20150724190754.GA29467@megas.kitware.com> <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> <20150727183113.249732046@mail.rogue-research.com> Message-ID: <20150727185118.1463852919@mail.rogue-research.com> On Mon, 27 Jul 2015 14:34:37 -0400, David Lonie said: >Agreed! This is on me, I missed that point when I was summarizing my >changes for the release notes. > >Ben/DaveD, can we add this to the notes? > >- Removed the deprecated RenderingFreeTypeOpenGL module. The functionality >of this module has been replaced by the vtkTextRenderer and vtkTextMapper >classes in the RenderingCore module. Am I right that this: also needs updating? "vtkRenderingFreeType" should be removed, yes? Also might be good to say that if using the experimental OGL2 stuff, that one must use "vtkRenderingOpenGL2". 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.lonie at kitware.com Mon Jul 27 14:54:28 2015 From: david.lonie at kitware.com (David Lonie) Date: Mon, 27 Jul 2015 14:54:28 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: <20150727185118.1463852919@mail.rogue-research.com> References: <20150724190754.GA29467@megas.kitware.com> <2073305583.2810128.1437924749471.JavaMail.yahoo@mail.yahoo.com> <20150727183113.249732046@mail.rogue-research.com> <20150727185118.1463852919@mail.rogue-research.com> Message-ID: On Mon, Jul 27, 2015 at 2:51 PM, Sean McBride wrote: > On Mon, 27 Jul 2015 14:34:37 -0400, David Lonie said: > > >Agreed! This is on me, I missed that point when I was summarizing my > >changes for the release notes. > > > >Ben/DaveD, can we add this to the notes? > > > >- Removed the deprecated RenderingFreeTypeOpenGL module. The functionality > >of this module has been replaced by the vtkTextRenderer and vtkTextMapper > >classes in the RenderingCore module. > > Am I right that this: > > > > also needs updating? "vtkRenderingFreeType" should be removed, yes? Also > might be good to say that if using the experimental OGL2 stuff, that one > must use "vtkRenderingOpenGL2". vtkRenderingFreeType should not be removed -- it is a different module from the one that got taken out (vtkRenderingFreeTypeOpenGL). However, the removed module is in the list, too. It is still needed for earlier 6.x releases. I'll let someone else make that call whether we remove it from that page or not, since it could go either way as I see it. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From jian.cheng.1983 at gmail.com Mon Jul 27 18:21:36 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Mon, 27 Jul 2015 18:21:36 -0400 Subject: [vtkusers] Fwd: webgl output of VTKPolyData.py In-Reply-To: References: <55B65C88.9010307@gmail.com> <55B66E40.1030607@gmail.com> Message-ID: <55B6AEF0.2030801@gmail.com> Hi Sebastien, Thanks very much for your reply. I think you gave a correct reason. Based on your suggestion on Paraview, I tried paraview 3.98.1 in my laptop, it visualized the vtk file correctly. However when I save the file into webgl, then opened the html file, the color of the result is not correct (i.e. not the rgba color), maybe because the same reason you just mentioned. For paraview 3.98.1, I noticed that no matter how I changed the second Drop-down menu (magnitude, 0,1,2,3), the visualization does not change. Then I downloaded the latest paraview 4.3.1, both the color of visualization in paraview and color of saved html file are not correct. I noticed that when I changed the second Drop-down menu (magnitude, 0,1,2,3), the visualization color now changes, because paraview uses one of the scalar values. Do you have any suggestion on how to solve the issue the paraview? Thanks. best, Jian Cheng On 07/27/2015 02:13 PM, Sebastien Jourdain wrote: > Hi Jian, > > the reason here is that the data you try to look at is not a scalar > field but a RGBA type of information. > The WebGL exported is looking for a field (I think) and get confused. > > You may need to generate a field here and use a lookup table with it. > You can also try to use ParaView to load and export the data in WebGL. > > Seb > > > _______________________________________________ > 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: ahhggebh.png Type: image/png Size: 3379 bytes Desc: not available URL: From sebastien.jourdain at kitware.com Mon Jul 27 18:50:29 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 27 Jul 2015 16:50:29 -0600 Subject: [vtkusers] Fwd: webgl output of VTKPolyData.py In-Reply-To: <55B6AEF0.2030801@gmail.com> References: <55B65C88.9010307@gmail.com> <55B66E40.1030607@gmail.com> <55B6AEF0.2030801@gmail.com> Message-ID: Hi Jian, You may create a field using the calculator and use a lookup table. This should work if you managed to get the color rights based on real scalar field. Seb On Mon, Jul 27, 2015 at 4:21 PM, Jian Cheng wrote: > Hi Sebastien, > > Thanks very much for your reply. > I think you gave a correct reason. > > Based on your suggestion on Paraview, I tried paraview 3.98.1 in my > laptop, it visualized the vtk file correctly. > However when I save the file into webgl, then opened the html file, the > color of the result is not correct (i.e. not the rgba color), maybe because > the same reason you just mentioned. > For paraview 3.98.1, I noticed that no matter how I changed the second Drop-down > menu (magnitude, 0,1,2,3), the visualization does not change. > > > Then I downloaded the latest paraview 4.3.1, both the color of > visualization in paraview and color of saved html file are not correct. > I noticed that when I changed the second Drop-down menu (magnitude, > 0,1,2,3), the visualization color now changes, because paraview uses one of > the scalar values. > > > Do you have any suggestion on how to solve the issue the paraview? Thanks. > > best, > Jian Cheng > > On 07/27/2015 02:13 PM, Sebastien Jourdain wrote: > > Hi Jian, > > the reason here is that the data you try to look at is not a scalar > field but a RGBA type of information. > The WebGL exported is looking for a field (I think) and get confused. > > You may need to generate a field here and use a lookup table with it. > You can also try to use ParaView to load and export the data in WebGL. > > Seb > > > _______________________________________________ >> 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: ahhggebh.png Type: image/png Size: 3379 bytes Desc: not available URL: From csaravanakumar2010 at gmail.com Mon Jul 27 23:25:13 2015 From: csaravanakumar2010 at gmail.com (saravanakumar) Date: Mon, 27 Jul 2015 20:25:13 -0700 (MST) Subject: [vtkusers] Draw a line Message-ID: <1438053913667-5733139.post@n5.nabble.com> Hi All, I am trying to draw two lines such as Horizontal and vertical on the Dicom image.Then I click the respective line and drag the line. Please give some idea. -- View this message in context: http://vtk.1045678.n5.nabble.com/Draw-a-line-tp5733139.html Sent from the VTK - Users mailing list archive at Nabble.com. From csaravanakumar2010 at gmail.com Mon Jul 27 23:50:32 2015 From: csaravanakumar2010 at gmail.com (saravanakumar) Date: Mon, 27 Jul 2015 20:50:32 -0700 (MST) Subject: [vtkusers] draw a cursor Message-ID: <1438055432724-5733140.post@n5.nabble.com> Hi All, I am trying to draw a cursor with drag able. I tried with CURSOR3D. it is working. I am only need two axis(i.e: X and Y axis). Please give some idea. -- View this message in context: http://vtk.1045678.n5.nabble.com/draw-a-cursor-tp5733140.html Sent from the VTK - Users mailing list archive at Nabble.com. From chpradeep.ith at gmail.com Tue Jul 28 01:47:39 2015 From: chpradeep.ith at gmail.com (roobaru) Date: Mon, 27 Jul 2015 22:47:39 -0700 (MST) Subject: [vtkusers] Can't get vtk modules to work in python - visual studio Message-ID: <1438062459456-5733141.post@n5.nabble.com> Hello, I am very new to python and vtk. I got a vtk windows installer and used the noob-friendly method to install it. I can see the VTK 6.2.0 folder in the program files. I also added the bin folder to system path with the hope that I can simply import vtk in python. I installed python in visual studio and when I use import vtk I get the error "No module named vtk". I added the bin folder into solution explorer but it didn't help. Please help how to add the vtk libraries to my existing python. I tried to search the forums, but couldn't find anything helpful. Sorry for the noob question. -- View this message in context: http://vtk.1045678.n5.nabble.com/Can-t-get-vtk-modules-to-work-in-python-visual-studio-tp5733141.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Tue Jul 28 08:53:47 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 28 Jul 2015 08:53:47 -0400 Subject: [vtkusers] CFP: SC '15 Scientific Visualization Showcase In-Reply-To: References: Message-ID: Update! The deadline for submission of your best scientific visualizations to the Supercomputing 2015 Showcase has been pushed back to August 7. hxxp://sc15.supercomputing.org/program/scientific-visualization-showcase Best, -berk On Tue, May 26, 2015 at 8:18 AM, Berk Geveci wrote: > Hi folks, > > The Call for Participation for the SC '15 Scientific Visualization > Showcase is out. This is a great opportunity for the community to highlight > the wonderful visualization work going on. Please consider submitting an > entry (or more). > > http://sc15.supercomputing.org/program/scientific-visualization-showcase > > SC15?s Visualization and Data Analytics Showcase Program provides a forum > for the year's most instrumental movies in HPC. Six finalists will compete > for the Best Visualization Award, and each finalist will present his or her > movie during a dedicated session at SC15 in a 15-minute presentation. > Movies are judged based on how their movie illuminates science, by the > quality of the movie, and for innovations in the process used for creating > the movie. > > Best, > -berk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Tue Jul 28 09:55:03 2015 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 28 Jul 2015 09:55:03 -0400 Subject: [vtkusers] Can't get vtk modules to work in python - visual studio In-Reply-To: <1438062459456-5733141.post@n5.nabble.com> References: <1438062459456-5733141.post@n5.nabble.com> Message-ID: I've had to figure this out before... here is what I remember: First you should make sure that the vtk binaries you installed were built with python. Then you need to add the VTK_INSTALL/lib and VTK_INSTALL/lib/PythonX/site-packages (replace X with python version, probably 2.7) folders to both your PATH and your PYTHONPATH environment variables. Then you should be able to import vtk. HTH, Shawn On Tue, Jul 28, 2015 at 1:47 AM, roobaru wrote: > Hello, > I am very new to python and vtk. I got a vtk windows installer and used the > noob-friendly method to install it. I can see the VTK 6.2.0 folder in the > program files. I also added the bin folder to system path with the hope > that > I can simply import vtk in python. I installed python in visual studio and > when I use import vtk I get the error "No module named vtk". I added the > bin > folder into solution explorer but it didn't help. Please help how to add > the > vtk libraries to my existing python. I tried to search the forums, but > couldn't find anything helpful. Sorry for the noob question. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Can-t-get-vtk-modules-to-work-in-python-visual-studio-tp5733141.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 marc.ruiz+vtk at gmail.com Tue Jul 28 10:19:40 2015 From: marc.ruiz+vtk at gmail.com (Marc Ruiz Altisent) Date: Tue, 28 Jul 2015 16:19:40 +0200 Subject: [vtkusers] Slow text rendering with vtkCornerAnnotation and big windows Message-ID: Hi, I'm the developer of a medical viewer that uses vtkCornerAnnotation to display image-related information in the corners of the window. I have found that updating the text for each frame is slow when the window is very big, like for example in a 5 MPixel medical display. Previously we used the vtkRenderingFreeTypeOpenGL module and annotation updates were instantaneous no matter the window size, but it doesn't support UTF-8, so we decided to not use it anymore. Now, with the default implementation in the vtkRenderingFreeType module, when the window is very big the updates take a considerable amount of time, to the point of making the application very laggy when scrolling through images. I have tried to limit the text size to a small number, but even then with a big window text rendering is slow and with a small window it's fast, so it's not directly related to text size. I don't know exactly what is causing the slowness, but according to profiling tests, the bottleneck is the vtkFreeTypeTools::RenderCharacter() method. Could the performance of text rendering be improved? Currently I could revert back to using the vtkRenderingFreeTypeOpenGL module, even with its limitations, but since it will disappear in VTK 6.3 this would just be a short-term workaround. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Jul 28 10:56:34 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 28 Jul 2015 10:56:34 -0400 Subject: [vtkusers] Testing contents of vtkFloatArray In-Reply-To: References: Message-ID: Hi, I'm not sure I understand your question. All components of a vtkFloatArray are floats, so they are numeric. Are you asking how to check that non of the components are NaN? Thanks, Cory On Sun, Jul 26, 2015 at 11:38 AM, Abdul Abdul wrote: > Hello, > > vtkFloatArray > is an array > of values of type float. How can I test that all contents of such array are > numeric? > > 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 > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chpradeep.ith at gmail.com Tue Jul 28 11:42:15 2015 From: chpradeep.ith at gmail.com (roobaru) Date: Tue, 28 Jul 2015 08:42:15 -0700 (MST) Subject: [vtkusers] Can't get vtk modules to work in python - visual studio In-Reply-To: References: <1438062459456-5733141.post@n5.nabble.com> Message-ID: <1438098135528-5733151.post@n5.nabble.com> @Shawn Thank you very much for the info. I figured it out now :) The keywords in your suggestion helped a lot. I looked around around more based on what you said and this http://vtk.1045678.n5.nabble.com/How-to-use-built-vtk-with-python-td1233130.html and this http://cpbotha.net/2009/08/13/python-2-6-enabled-vtk-5-4-windows-binaries/ links helped a lot. I did a little trial and error and it works now. I didn't have PYTHONPATH in my environment variables and I had to add it manually. -- View this message in context: http://vtk.1045678.n5.nabble.com/Can-t-get-vtk-modules-to-work-in-python-visual-studio-tp5733141p5733151.html Sent from the VTK - Users mailing list archive at Nabble.com. From leonid_dulman at yahoo.co.uk Tue Jul 28 12:04:19 2015 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Tue, 28 Jul 2015 16:04:19 +0000 (UTC) Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: <20150724190754.GA29467@megas.kitware.com> References: <20150724190754.GA29467@megas.kitware.com> Message-ID: <715219225.4272341.1438099459231.JavaMail.yahoo@mail.yahoo.com> Hi to all I tried to add FFMPEG support, but have got compilation errors How to solve this problems ? Thank you. Leonid Error?? ?1?? ?error C2039: 'clock_t' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?18 Error?? ?2?? ?error C2873: 'clock_t' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?18 Error?? ?3?? ?error C2039: 'asctime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?4?? ?error C2873: 'asctime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?5?? ?error C2039: 'clock' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?6?? ?error C2873: 'clock' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?7?? ?error C2039: 'ctime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?8?? ?error C2873: 'ctime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?9?? ?error C2039: 'difftime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?10?? ?error C2873: 'difftime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?11?? ?error C2039: 'gmtime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?12?? ?error C2873: 'gmtime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?13?? ?error C2039: 'localtime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?14?? ?error C2873: 'localtime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?15?? ?error C2039: 'mktime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?16?? ?error C2873: 'mktime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?17?? ?error C2039: 'strftime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?18?? ?error C2873: 'strftime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?19?? ?error C2039: 'time' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?20?? ?error C2873: 'time' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?21?? ?error C1083: Cannot open include file: 'libavformat/avformat.h': No such file or directory?? ?F:\VTK630\IO\FFMPEG\vtkFFMPEGWriter.cxx?? ?27 Error?? ?22?? ?error LNK1181: cannot open input file '..\..\lib\Release\vtkIOFFMPEG-6.3.lib'?? ?e:\VTK6.3\Wrapping\Python\LINK Error?? ?23?? ?error C2039: 'clock_t' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?18 Error?? ?24?? ?error C2873: 'clock_t' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?18 Error?? ?25?? ?error C2039: 'asctime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?26?? ?error C2873: 'asctime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?27?? ?error C2039: 'clock' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?28?? ?error C2873: 'clock' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?29?? ?error C2039: 'ctime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?30?? ?error C2873: 'ctime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?20 Error?? ?31?? ?error C2039: 'difftime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?32?? ?error C2873: 'difftime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?33?? ?error C2039: 'gmtime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?34?? ?error C2873: 'gmtime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?35?? ?error C2039: 'localtime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?36?? ?error C2873: 'localtime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?21 Error?? ?37?? ?error C2039: 'mktime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?38?? ?error C2873: 'mktime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?39?? ?error C2039: 'strftime' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?40?? ?error C2873: 'strftime' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?41?? ?error C2039: 'time' : is not a member of '`global namespace''?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 Error?? ?42?? ?error C2873: 'time' : symbol cannot be used in a using-declaration?? ?C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctime?? ?22 From: Ben Boeckel To: vtk-developers at vtk.org; vtkusers at vtk.org Cc: Kitware Corporate Communications Sent: Friday, July 24, 2015 10:07 PM Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready The VTK developement team is happy to announce that VTK 6.3 has entered 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. The official release notes will be available when VTK final is released in the next few weeks. In the meantime here is a preview: ? - new OpenMP backend for vtkSMPTools; ? - new MPI-IO backend for PLOT3D reader; ? - new vtkPlotArea for rendering area (or range) plots; ? - multithreaded Gaussian splatter class; ? - multithreading support in the vtkSampleFunction; ? - compiler uplifts: gcc-4.1 and Visual Studio 2008 or newer are ? ? required; ? - the Piston and Dax accelerator modules are deprecated; ? - writing side and node sets in Exodus files; ? - skip NaN values in vtkDataArray::GetRange(); ? - reading compressed TIFF files with sub-extents; ? - support for OpenGL 3.2 in the (still experimental, but much less so) ? ? OpenGL2 backend; ? - text rendering now respects the DPI of the vtkWindow; ? - vtkAxis respects the TileScale setting of vtkWindow; And many bug fixes across the codebase. We hope you enjoy this release of VTK! As always, contact Kitware and the mailing lists for assistance. Thanks, --Ben _______________________________________________ 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.lonie at kitware.com Tue Jul 28 12:29:27 2015 From: david.lonie at kitware.com (David Lonie) Date: Tue, 28 Jul 2015 12:29:27 -0400 Subject: [vtkusers] Slow text rendering with vtkCornerAnnotation and big windows In-Reply-To: References: Message-ID: Hi Marc, On Tue, Jul 28, 2015 at 10:19 AM, Marc Ruiz Altisent < marc.ruiz+vtk at gmail.com> wrote: > Hi, I'm the developer of a medical viewer that uses vtkCornerAnnotation to > display image-related information in the corners of the window. I have > found that updating the text for each frame is slow when the window is very > big, like for example in a 5 MPixel medical display. > > Previously we used the vtkRenderingFreeTypeOpenGL module and annotation > updates were instantaneous no matter the window size, but it doesn't > support UTF-8, so we decided to not use it anymore. > > Now, with the default implementation in the vtkRenderingFreeType module, > when the window is very big the updates take a considerable amount of time, > to the point of making the application very laggy when scrolling through > images. I have tried to limit the text size to a small number, but even > then with a big window text rendering is slow and with a small window it's > fast, so it's not directly related to text size. I don't know exactly what > is causing the slowness, but according to profiling tests, the bottleneck > is the vtkFreeTypeTools::RenderCharacter() method. > > Could the performance of text rendering be improved? Currently I could > revert back to using the vtkRenderingFreeTypeOpenGL module, even with its > limitations, but since it will disappear in VTK 6.3 this would just be a > short-term workaround. > I suspect that vtkFreeTypeTools::RenderCharacter is not a bottleneck, though it would be eating up a lot of time in a profiler as it's where most of the heavy-lifting is done during text rendering. After taking a quick skim through the code, the more likely problem is in vtkCornerAnnotation::RenderOpaqueGeometry, which has the following loops: while (... /*annotation size is too small*/ && fontSize < 100) { fontSize++; for (int i = 0; i < NumTextPositions; i++) { this->TextMapper[i]->GetTextProperty()->SetFontSize(fontSize); this->TextMapper[i]->GetSize(viewport, tempi + i * 2); } /* Recompute dimensions of annotation */ } /* Followed by the same thing, but decrease font size to fit */ So it basically renders the text repeatedly, attempting to fit it to a box. Combining a high density display with the new DPI support in VTK and repeatedly rendering to fit a box like this will likely eat up a lot of time and thrash memory pretty hard. It looks like it's currently not possible to 'seed' the fontsize via the vtkCornerAnnotation API -- it just grabs the default font size from an unmodified vtkTextProperty object (line 460) as a starting point. Can you file a bug for this? At the very least the initial fontsize should be able to be set, and at best this class should be refactored to use newer text renderering APIs like vtkTextRenderer::GetBoundingBox, which won't actually generate a texture but just compute the dimensions of the resulting image. Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Jul 28 21:48:18 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 28 Jul 2015 21:48:18 -0400 Subject: [vtkusers] Camera is not updated In-Reply-To: <55B76A9D.405@gmx.de> References: <55B66E62.8090305@gmx.de> <55B76A9D.405@gmx.de> Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Wed Jul 29 05:29:31 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Wed, 29 Jul 2015 14:59:31 +0530 Subject: [vtkusers] How to apply color map for each horizontal slice of a rectilinear grid Message-ID: Hi All I have rectilinear grid read from a netcdf ocean data file with X, Y, Z axes. Currently I have applied a color map for entire rectilinear grid by finding out its min and max values. currently my code looks like this. ============================================= #Read file in the NetCDF foramat netCdfReader = vtkNetCDFCFReader() netCdfReader.SetFileName("netCdfFilename.nc") netCdfReader.SphericalCoordinatesOff() netCdfReader.SetReplaceFillValueWithNan(1) netCdfReader.Update() #Find the min max range of values a, b= netCdfReader.GetOutput().GetPointData().GetScalars().GetRange() #create a look up table for color mapping lut = vtk.vtkColorTransferFunction() lut.AddRGBPoint(a, 0.0, 0.0, 1.0) 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.7,0.7,0.7)#gray color gridMapper = vtkDataSetMapper() gridMapper.SetInputData( netCdfReader.GetOutput() ) gridMapper.SetScalarModeToUsePointData() gridMapper.SetLookupTable(lut) ============================================ Now I would like to find (min, max) values of each horizontal slice (for each value of Z). I want get (min, max) values for each value of Z axes and apply the color map that particular slice, according the obtained (min, max) range. Could anyone help me on this. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.ruiz+vtk at gmail.com Wed Jul 29 08:27:14 2015 From: marc.ruiz+vtk at gmail.com (Marc Ruiz Altisent) Date: Wed, 29 Jul 2015 14:27:14 +0200 Subject: [vtkusers] Slow text rendering with vtkCornerAnnotation and big windows In-Reply-To: References: Message-ID: Thank you David. I have made the bug report: http://www.vtk.org/Bug/view.php?id=15603 2015-07-28 18:29 GMT+02:00 David Lonie : > Hi Marc, > > On Tue, Jul 28, 2015 at 10:19 AM, Marc Ruiz Altisent < > marc.ruiz+vtk at gmail.com> wrote: > >> Hi, I'm the developer of a medical viewer that uses vtkCornerAnnotation >> to display image-related information in the corners of the window. I have >> found that updating the text for each frame is slow when the window is very >> big, like for example in a 5 MPixel medical display. >> >> Previously we used the vtkRenderingFreeTypeOpenGL module and annotation >> updates were instantaneous no matter the window size, but it doesn't >> support UTF-8, so we decided to not use it anymore. >> >> Now, with the default implementation in the vtkRenderingFreeType module, >> when the window is very big the updates take a considerable amount of time, >> to the point of making the application very laggy when scrolling through >> images. I have tried to limit the text size to a small number, but even >> then with a big window text rendering is slow and with a small window it's >> fast, so it's not directly related to text size. I don't know exactly what >> is causing the slowness, but according to profiling tests, the bottleneck >> is the vtkFreeTypeTools::RenderCharacter() method. >> >> Could the performance of text rendering be improved? Currently I could >> revert back to using the vtkRenderingFreeTypeOpenGL module, even with its >> limitations, but since it will disappear in VTK 6.3 this would just be a >> short-term workaround. >> > > I suspect that vtkFreeTypeTools::RenderCharacter is not a bottleneck, > though it would be eating up a lot of time in a profiler as it's where most > of the heavy-lifting is done during text rendering. > > After taking a quick skim through the code, the more likely problem is in > vtkCornerAnnotation::RenderOpaqueGeometry, which has the following loops: > > while (... /*annotation size is too small*/ && fontSize < 100) > > { > > fontSize++; > > for (int i = 0; i < NumTextPositions; i++) > > { > > this->TextMapper[i]->GetTextProperty()->SetFontSize(fontSize); > > this->TextMapper[i]->GetSize(viewport, tempi + i * 2); > > } > > /* Recompute dimensions of annotation */ > > } > > > /* Followed by the same thing, but decrease font size to fit */ > > > So it basically renders the text repeatedly, attempting to fit it to a > box. Combining a high density display with the new DPI support in VTK and > repeatedly rendering to fit a box like this will likely eat up a lot of > time and thrash memory pretty hard. > > It looks like it's currently not possible to 'seed' the fontsize via the > vtkCornerAnnotation API -- it just grabs the default font size from an > unmodified vtkTextProperty object (line 460) as a starting point. > > Can you file a bug for this? At the very least the initial fontsize should > be able to be set, and at best this class should be refactored to use newer > text renderering APIs like vtkTextRenderer::GetBoundingBox, which won't > actually generate a texture but just compute the dimensions of the > resulting image. > > Thanks, > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cicciodepa at libero.it Wed Jul 29 09:39:04 2015 From: cicciodepa at libero.it (cicciodepa at libero.it) Date: Wed, 29 Jul 2015 15:39:04 +0200 (CEST) Subject: [vtkusers] texture interpolation Message-ID: <937459408.5693741438177144520.JavaMail.httpd@webmail-59.iol.local> Hi,I've a textured mesh saved in a .vtu file; how can I retrieve RGB information from every vertex? In particular, i want interpolate the texture of one mesh to another mesh (that is a result of thin plate spline transform and has an higher resolution). thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Jul 29 11:49:56 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 29 Jul 2015 11:49:56 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: <715219225.4272341.1438099459231.JavaMail.yahoo@mail.yahoo.com> References: <20150724190754.GA29467@megas.kitware.com> <715219225.4272341.1438099459231.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150729154956.GA32199@megas.kitware.com> On Tue, Jul 28, 2015 at 16:04:19 +0000, Leonid Dulman wrote: > I tried to add FFMPEG support, but have got compilation errors > How to solve this problems ? Hrm. We test with VS9 (2008) and VS12 (2013), but not VS11. I guess there could be something wrong, but I think the problem is... > Error?? ?21?? ?error C1083: Cannot open include file: 'libavformat/avformat.h': No such file or directory?? ?F:\VTK630\IO\FFMPEG\vtkFFMPEGWriter.cxx?? ?27 ...you're missing FFmpeg (or haven't told VTK where it is). --Ben From adufour at pasteur.fr Wed Jul 29 13:24:13 2015 From: adufour at pasteur.fr (Alexandre Dufour) Date: Wed, 29 Jul 2015 19:24:13 +0200 Subject: [vtkusers] "Proper" way to export a scene to X? Message-ID: <05C3EC4E-581E-43AF-A67E-6DE2CC612FA6@pasteur.fr> Hi, A collaborator of mine would like to load surface mesh (VTK) files produced by our software (Icy) into MeshLab, but it seems VTK files aren?t supported by MeshLab. As a backup solution, I am trying to export the VTK polydata files into other formats (OBJ or X3D) using the various exporter classes, but I?m not sure how to do this the ?proper? way. The vtkExporter class seems to only work with SetInput(vtkRenderWindow), which seems a bit weird if the meshes are not being displayed in a window. The documentation seems to agree with me by stating that "These methods are provided for backward compatibility. Will disappear soon.? Any ideas? Cheers Alexandre @ VTK 6.1 via Java 6 -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Wed Jul 29 13:36:58 2015 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Wed, 29 Jul 2015 17:36:58 +0000 (UTC) Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready In-Reply-To: <20150729154956.GA32199@megas.kitware.com> References: <20150729154956.GA32199@megas.kitware.com> Message-ID: <602745335.5144415.1438191418989.JavaMail.yahoo@mail.yahoo.com> Thank you. It's my fall. I built FFMPEG support. From: Ben Boeckel To: Leonid Dulman Cc: "vtk-developers at vtk.org" ; "vtkusers at vtk.org" ; Kitware Corporate Communications Sent: Wednesday, July 29, 2015 6:49 PM Subject: Re: [vtkusers] Announce: vtk 6.3.0 release candidate 1 is ready On Tue, Jul 28, 2015 at 16:04:19 +0000, Leonid Dulman wrote: > I tried to add FFMPEG support, but have got compilation errors > How to solve this problems ? Hrm. We test with VS9 (2008) and VS12 (2013), but not VS11. I guess there could be something wrong, but I think the problem is... > Error?? ?21?? ?error C1083: Cannot open include file: 'libavformat/avformat.h': No such file or directory?? ?F:\VTK630\IO\FFMPEG\vtkFFMPEGWriter.cxx?? ?27 ...you're missing FFmpeg (or haven't told VTK where it is). --Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattryan232 at gmail.com Wed Jul 29 13:49:23 2015 From: mattryan232 at gmail.com (Matt Ryan) Date: Wed, 29 Jul 2015 18:49:23 +0100 Subject: [vtkusers] 3DConnexion and VTK 6.2 Problem Message-ID: Hi All, I?ve been trying to get a 3D Connexion SpaceExplorer to work with my VTK application with Qt, but to no avail. I?ve followed the instructions outlined in http://www.vtk.org/Wiki/VTK/3DConnexion_Devices_Support (instructing the QVTKWidget to listen for TDx events) and there is no response to 3D mouse movements, not in my app nor when using the app built in /Examples/GUI/Qt/Events. My platform is Mac OSX 10.9.5 and I?m running VTK 6.2 with OpenGL2 enabled. I?m using the latest 3DConnexion driver. (I also tried a legacy driver and that didn?t work.) Has something gone wrong with TDx support in 6.2 or with OpenGL2? (I came across this line: ?Removed the TDx classes from OpenGL 2? in the 6.2 candidate release announcement: http://www.vtk.org/pipermail/vtkusers/2015-February/090184.html) Any insights or recommendations appreciated. Thanks a lot, Matt From marco.dev.open at gmail.com Thu Jul 30 04:42:11 2015 From: marco.dev.open at gmail.com (Marco Dev) Date: Thu, 30 Jul 2015 13:12:11 +0430 Subject: [vtkusers] Different 3D View Message-ID: Hi dears, why we have different 3D view from reading .mhd file or reading dicom files through FixedPointVolumeRayCastMapperCT for example : dicom reader --> vtkDICOMImageReader *dicomReader = vtkDICOMImageReader:: New(); dicomReader->SetDirectoryName(dirname); dicomReader->Update(); input=dicomReader->GetOutput(); reader=dicomReader; . . .. colorFun->AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 ); colorFun->AddRGBPoint( -1000, .62, .36, .18, 0.5, 0.0 ); colorFun->AddRGBPoint( -500, .88, .60, .29, 0.33, 0.45 ); colorFun->AddRGBPoint( 3071, .83, .66, 1, 0.5, 0.0 ); opacityFun->AddPoint(-3024, 0, 0.5, 0.0 ); opacityFun->AddPoint(-1000, 0, 0.5, 0.0 ); opacityFun->AddPoint(-500, 1.0, 0.33, 0.45 ); opacityFun->AddPoint(3071, 1.0, 0.5, 0.0); mapper->SetBlendModeToComposite(); property->ShadeOn(); property->SetAmbient(0.1); property->SetDiffuse(0.9); property->SetSpecular(0.2); property->SetSpecularPower(10.0); property->SetScalarOpacityUnitDistance(0.8919); =========================================================== mhd reader -- > vtkMetaImageReader *metaReader = vtkMetaImageReader::New(); metaReader->SetFileName(fileName); metaReader->Update(); input=metaReader->GetOutput(); reader=metaReader; . . . . . colorFun->AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 ); colorFun->AddRGBPoint( -1000, .62, .36, .18, 0.5, 0.0 ); colorFun->AddRGBPoint( -500, .88, .60, .29, 0.33, 0.45 ); colorFun->AddRGBPoint( 3071, .83, .66, 1, 0.5, 0.0 ); opacityFun->AddPoint(-3024, 0, 0.5, 0.0 ); opacityFun->AddPoint(-1000, 0, 0.5, 0.0 ); opacityFun->AddPoint(-500, 1.0, 0.33, 0.45 ); opacityFun->AddPoint(3071, 1.0, 0.5, 0.0); mapper->SetBlendModeToComposite(); property->ShadeOn(); property->SetAmbient(0.1); property->SetDiffuse(0.9); property->SetSpecular(0.2); property->SetSpecularPower(10.0); property->SetScalarOpacityUnitDistance(0.8919); -------------- next part -------------- An HTML attachment was scrubbed... URL: From darya.yelshyna at gmail.com Thu Jul 30 05:58:08 2015 From: darya.yelshyna at gmail.com (Darya Yelshyna) Date: Thu, 30 Jul 2015 10:58:08 +0100 Subject: [vtkusers] Tutorial Step1: NotImplementedError Message-ID: Hello everyone, I am sorry for inconvenience, but I can't execute the tutorial steps contained in the Examples folder. I pretend to use python for development of a 3D Slicer module. When I run the Cone.py, I get the following error: Generic Warning: In /home/darya/Documents/Slicer-SuperBuild/VTKv6/Rendering/Core/vtkPolyDataMapper.cxx, line 28 Error: no override found for 'vtkPolyDataMapper'. Traceback (most recent call last): File "/home/darya/Documents/LiClipse Workspace/VTKtutorials/src/Step1.py", line 14, in coneMapper = vtk.vtkPolyDataMapper() NotImplementedError: no concrete implementation exists for this class vtkDebugLeaks has detected LEAKS! Class "vtkPolyDataMapper" has 1 instance still around. I could not find a solution for this, the only information I found was concerning C++ programming. Thank you in advance. Sincerely, Darya Yelshyna -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jul 30 12:13:20 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 30 Jul 2015 10:13:20 -0600 Subject: [vtkusers] Tutorial Step1: NotImplementedError In-Reply-To: References: Message-ID: Hi Darya, The concrete implementation for vtkPolyDataMapper is vtkOpenGLPolyDataMapper. The NotImplementedError probably means that the vtkRenderingOpenGLPython.so module is not loading, because it is the module that contains vtkOpenGLPolyDataMapper. I cannot be sure why this module is not loading on your system, but you can try loading it manually from python: >>> from vtkRenderingOpenGLPython import * >>> mapper = vtkOpenGLPolyDataMapper() >>> print mapper.GetClassName() >>> >>> from vtkRenderingCore import * >>> mapper2 = vtkPolyDataMapper() >>> print mapper2.GetClassName() - David On Thu, Jul 30, 2015 at 3:58 AM, Darya Yelshyna wrote: > Hello everyone, > > I am sorry for inconvenience, but I can't execute the tutorial steps > contained in the Examples folder. I pretend to use python for development > of a 3D Slicer module. When I run the Cone.py, I get the following error: > > Generic Warning: In > /home/darya/Documents/Slicer-SuperBuild/VTKv6/Rendering/Core/vtkPolyDataMapper.cxx, > line 28 > Error: no override found for 'vtkPolyDataMapper'. > > Traceback (most recent call last): > File "/home/darya/Documents/LiClipse > Workspace/VTKtutorials/src/Step1.py", line 14, in > coneMapper = vtk.vtkPolyDataMapper() > NotImplementedError: no concrete implementation exists for this class > vtkDebugLeaks has detected LEAKS! > Class "vtkPolyDataMapper" has 1 instance still around. > > I could not find a solution for this, the only information I found was > concerning C++ programming. > Thank you in advance. > > Sincerely, > Darya Yelshyna > -------------- next part -------------- An HTML attachment was scrubbed... URL: From waldo.valenzuela at hotmail.com Thu Jul 30 13:22:05 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Thu, 30 Jul 2015 19:22:05 +0200 Subject: [vtkusers] About vtkImageReslice Message-ID: Hi guys, I have a problem with the class vtkImageReslice. I created a 3D image of 7x7x7 voxels, and after apply the vtkImageReslice (I used the example of VTK for this class), all the voxels that are in the borders of the image are cut to the half, I loaded the same image in ITK-SNAP and the visualisation is ok. I attached the example with the image, and the screenshot of ITK-SNAP and the vtk application. How I could visualise the 2D image correctly?, I need additional configuration to the filter? Any help is welcome. Cheers, Waldo -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkversion.png Type: image/png Size: 32037 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: ImageReslice.zip Type: application/zip Size: 5422 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ITK-SNAP.png Type: image/png Size: 129917 bytes Desc: not available URL: From darya.yelshyna at gmail.com Thu Jul 30 13:31:26 2015 From: darya.yelshyna at gmail.com (Darya Yelshyna) Date: Thu, 30 Jul 2015 18:31:26 +0100 Subject: [vtkusers] Tutorial Step1: NotImplementedError In-Reply-To: References: Message-ID: When I try to run 'from vtkRenderingOpenGLPython import *' I get the following: ImportError: No module named vtkRenderingOpenGLPython Thank you, Darya On Thu, Jul 30, 2015 at 5:13 PM, David Gobbi wrote: > Hi Darya, > > The concrete implementation for vtkPolyDataMapper is > vtkOpenGLPolyDataMapper. The NotImplementedError probably means that the > vtkRenderingOpenGLPython.so module is not loading, because it is the module > that contains vtkOpenGLPolyDataMapper. > > I cannot be sure why this module is not loading on your system, but you > can try loading it manually from python: > > >>> from vtkRenderingOpenGLPython import * > >>> mapper = vtkOpenGLPolyDataMapper() > >>> print mapper.GetClassName() > >>> > >>> from vtkRenderingCore import * > >>> mapper2 = vtkPolyDataMapper() > >>> print mapper2.GetClassName() > > - David > > On Thu, Jul 30, 2015 at 3:58 AM, Darya Yelshyna > wrote: > >> Hello everyone, >> >> I am sorry for inconvenience, but I can't execute the tutorial steps >> contained in the Examples folder. I pretend to use python for development >> of a 3D Slicer module. When I run the Cone.py, I get the following error: >> >> Generic Warning: In >> /home/darya/Documents/Slicer-SuperBuild/VTKv6/Rendering/Core/vtkPolyDataMapper.cxx, >> line 28 >> Error: no override found for 'vtkPolyDataMapper'. >> >> Traceback (most recent call last): >> File "/home/darya/Documents/LiClipse >> Workspace/VTKtutorials/src/Step1.py", line 14, in >> coneMapper = vtk.vtkPolyDataMapper() >> NotImplementedError: no concrete implementation exists for this class >> vtkDebugLeaks has detected LEAKS! >> Class "vtkPolyDataMapper" has 1 instance still around. >> >> I could not find a solution for this, the only information I found was >> concerning C++ programming. >> Thank you in advance. >> >> Sincerely, >> Darya Yelshyna >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jul 30 13:45:53 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 30 Jul 2015 11:45:53 -0600 Subject: [vtkusers] Tutorial Step1: NotImplementedError In-Reply-To: References: Message-ID: Does it also fail when you try to import vtkRenderingCorePython? Also try importing vtkCommonCorePython to see if that one works. On Thu, Jul 30, 2015 at 11:31 AM, Darya Yelshyna wrote: > When I try to run 'from vtkRenderingOpenGLPython import *' I get the > following: > > ImportError: No module named vtkRenderingOpenGLPython > > > Thank you, > > Darya > > On Thu, Jul 30, 2015 at 5:13 PM, David Gobbi > wrote: > >> Hi Darya, >> >> The concrete implementation for vtkPolyDataMapper is >> vtkOpenGLPolyDataMapper. The NotImplementedError probably means that the >> vtkRenderingOpenGLPython.so module is not loading, because it is the module >> that contains vtkOpenGLPolyDataMapper. >> >> I cannot be sure why this module is not loading on your system, but you >> can try loading it manually from python: >> >> >>> from vtkRenderingOpenGLPython import * >> >>> mapper = vtkOpenGLPolyDataMapper() >> >>> print mapper.GetClassName() >> >>> >> >>> from vtkRenderingCore import * >> >>> mapper2 = vtkPolyDataMapper() >> >>> print mapper2.GetClassName() >> >> - David >> >> On Thu, Jul 30, 2015 at 3:58 AM, Darya Yelshyna > > wrote: >> >>> Hello everyone, >>> >>> I am sorry for inconvenience, but I can't execute the tutorial steps >>> contained in the Examples folder. I pretend to use python for development >>> of a 3D Slicer module. When I run the Cone.py, I get the following error: >>> >>> Generic Warning: In >>> /home/darya/Documents/Slicer-SuperBuild/VTKv6/Rendering/Core/vtkPolyDataMapper.cxx, >>> line 28 >>> Error: no override found for 'vtkPolyDataMapper'. >>> >>> Traceback (most recent call last): >>> File "/home/darya/Documents/LiClipse >>> Workspace/VTKtutorials/src/Step1.py", line 14, in >>> coneMapper = vtk.vtkPolyDataMapper() >>> NotImplementedError: no concrete implementation exists for this class >>> vtkDebugLeaks has detected LEAKS! >>> Class "vtkPolyDataMapper" has 1 instance still around. >>> >>> I could not find a solution for this, the only information I found was >>> concerning C++ programming. >>> Thank you in advance. >>> >>> Sincerely, >>> Darya Yelshyna >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jul 30 14:55:06 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 30 Jul 2015 14:55:06 -0400 Subject: [vtkusers] "Proper" way to export a scene to X? In-Reply-To: <05C3EC4E-581E-43AF-A67E-6DE2CC612FA6@pasteur.fr> References: <05C3EC4E-581E-43AF-A67E-6DE2CC612FA6@pasteur.fr> Message-ID: I don't think the exporters are going away soon. What specific method was that message from? Exporters are for scenes. The intent is to take everything you can see in the a vtkRenderWindow's vtkRenderer and export it so that some other rendering system (renderman, etc) can reproduce the picture in a different way. For individual objects in the scene, like a polydata mesh, use one of the writer classes. They take one thing in the pipeline and export it to some file format so that you can process it later with vtk or some other project. Exporters sometimes use writers. Try https://github.com/daviddoria/vtkOBJWriter in this case. cheers David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Jul 29, 2015 at 1:24 PM, Alexandre Dufour wrote: > Hi, > > A collaborator of mine would like to load surface mesh (VTK) files > produced by our software (Icy ) into > MeshLab, but it seems VTK files aren?t supported by MeshLab. As a backup > solution, I am trying to export the VTK polydata files into other formats > (OBJ or X3D) using the various exporter classes, but I?m not sure how to do > this the ?proper? way. > > The vtkExporter class seems to only work with SetInput(vtkRenderWindow), > which seems a bit weird if the meshes are not being displayed in a window. > The documentation seems to agree with me by stating that "These methods are > provided for backward compatibility. Will disappear soon.? > > Any ideas? > > Cheers > Alexandre @ VTK 6.1 via Java 6 > > _______________________________________________ > 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 Jul 30 15:12:44 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 30 Jul 2015 13:12:44 -0600 Subject: [vtkusers] About vtkImageReslice In-Reply-To: References: Message-ID: Hi Waldo, It is a mapper setting. Use actor->GetMapper()->BorderOn(). - David On Thu, Jul 30, 2015 at 11:22 AM, Waldo Valenzuela < waldo.valenzuela at hotmail.com> wrote: > Hi guys, > > I have a problem with the class vtkImageReslice. I created a 3D image of > 7x7x7 voxels, and after apply the vtkImageReslice (I used the example of > VTK for this class), all the voxels that are in the borders of the image > are cut to the half, I loaded the same image in ITK-SNAP and the > visualisation is ok. > > I attached the example with the image, and the screenshot of ITK-SNAP and > the vtk application. > > How I could visualise the 2D image correctly?, I need additional > configuration to the filter? > > Any help is welcome. > > Cheers, > > Waldo > On Thu, Jul 30, 2015 at 11:22 AM, Waldo Valenzuela < waldo.valenzuela at hotmail.com> wrote: > Hi guys, > > I have a problem with the class vtkImageReslice. I created a 3D image of > 7x7x7 voxels, and after apply the vtkImageReslice (I used the example of > VTK for this class), all the voxels that are in the borders of the image > are cut to the half, I loaded the same image in ITK-SNAP and the > visualisation is ok. > > I attached the example with the image, and the screenshot of ITK-SNAP and > the vtk application. > > How I could visualise the 2D image correctly?, I need additional > configuration to the filter? > > Any help is welcome. > > Cheers, > > Waldo > > > > _______________________________________________ > 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 adufour at pasteur.fr Fri Jul 31 04:23:30 2015 From: adufour at pasteur.fr (Alexandre Dufour) Date: Fri, 31 Jul 2015 10:23:30 +0200 Subject: [vtkusers] "Proper" way to export a scene to X? In-Reply-To: References: <05C3EC4E-581E-43AF-A67E-6DE2CC612FA6@pasteur.fr> Message-ID: Hi David, On 30 Jul 2015, at 20:55, David E DeMarle wrote: > I don't think the exporters are going away soon. What specific method was that message from? From here: http://www.vtk.org/doc/nightly/html/classvtkExporter.html#a62e93f031f451016e22dc13bde789e64 > Exporters are for scenes. The intent is to take everything you can see in the a vtkRenderWindow's vtkRenderer and export it so that some other rendering system (renderman, etc) can reproduce the picture in a different way. Ok, this makes total sense, I now wonder why this method is documented that way :) I?ve also noticed that the e > For individual objects in the scene, like a polydata mesh, use one of the writer classes. They take one thing in the pipeline and export it to some file format so that you can process it later with vtk or some other project. Exporters sometimes use writers. > > Try https://github.com/daviddoria/vtkOBJWriter in this case. Oh? right? I had expected these classes to be in the core of VTK (which would have made our life much easier since we call the API from Java). Any simple way to integrate this (other than manual JNI-ing + building on all platforms, which requires me to have the full VTK source at hand?) Actually I?ve just noticed that the nightly build does contain classes such as vtkX3DExporterWriter (we?d have to upgrade our VTK binaries though), but is this also a valid alternative? In the meantime, I think I?d be better (or rather, faster) off writing the export myself in pure Java. Thanks anyway for your help! Alexandre -------------- next part -------------- An HTML attachment was scrubbed... URL: From waldo.valenzuela at hotmail.com Fri Jul 31 05:07:01 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Fri, 31 Jul 2015 11:07:01 +0200 Subject: [vtkusers] About vtkImageReslice In-Reply-To: References: Message-ID: Hi David, Thanks very much, works perfect, but now with the interactor (vtkInteractorStyleImage) is not changing the window/level of the borders. Do you know if I need to do additional configuration to interactor? Cheers, Waldo. On 30 Jul 2015, at 21:12, David Gobbi wrote: > Hi Waldo, > > It is a mapper setting. Use actor->GetMapper()->BorderOn(). > > - David > > > On Thu, Jul 30, 2015 at 11:22 AM, Waldo Valenzuela wrote: > Hi guys, > > I have a problem with the class vtkImageReslice. I created a 3D image of 7x7x7 voxels, and after apply the vtkImageReslice (I used the example of VTK for this class), all the voxels that are in the borders of the image are cut to the half, I loaded the same image in ITK-SNAP and the visualisation is ok. > > I attached the example with the image, and the screenshot of ITK-SNAP and the vtk application. > > How I could visualise the 2D image correctly?, I need additional configuration to the filter? > > Any help is welcome. > > Cheers, > > Waldo > > On Thu, Jul 30, 2015 at 11:22 AM, Waldo Valenzuela wrote: > Hi guys, > > I have a problem with the class vtkImageReslice. I created a 3D image of 7x7x7 voxels, and after apply the vtkImageReslice (I used the example of VTK for this class), all the voxels that are in the borders of the image are cut to the half, I loaded the same image in ITK-SNAP and the visualisation is ok. > > I attached the example with the image, and the screenshot of ITK-SNAP and the vtk application. > > How I could visualise the 2D image correctly?, I need additional configuration to the filter? > > Any help is welcome. > > Cheers, > > Waldo > > > > _______________________________________________ > 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 waldo.valenzuela at hotmail.com Fri Jul 31 08:53:57 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Fri, 31 Jul 2015 14:53:57 +0200 Subject: [vtkusers] About 2D/3D image contrast using Window/Level Message-ID: Hi guys, I have a problem to transfer the values of Window/Level of vtkImageMapToWindowLevelColors class from 2D viewer to 3D viewer. Also, the image in 2D become transparent with vtkInteractorStyleImage. I attached the screenshot to show the problem and also an application that reproduce this issue. Any help is more than welcome. Cheers, Waldo. -------------- next part -------------- A non-text attachment was scrubbed... Name: nomal.png Type: image/png Size: 35273 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: issue_1.png Type: image/png Size: 31607 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: issue_2.png Type: image/png Size: 34985 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tranparency.png Type: image/png Size: 35645 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SideBySideRenderWindowsQt.zip Type: application/zip Size: 7294 bytes Desc: not available URL: From david.gobbi at gmail.com Fri Jul 31 09:04:16 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 31 Jul 2015 07:04:16 -0600 Subject: [vtkusers] About vtkImageReslice In-Reply-To: References: Message-ID: Hi Waldo, You will have to explain in more detail. Do you mean that the window/level does not work if you click and drag on the border of the image? If you click and drag near the center of the image, do you see the brightness change everywhere except for the border? - David On Fri, Jul 31, 2015 at 3:07 AM, Waldo Valenzuela < waldo.valenzuela at hotmail.com> wrote: > Hi David, > > Thanks very much, works perfect, but now with the interactor > (vtkInteractorStyleImage) is not changing the window/level of the borders. > Do you know if I need to do additional configuration to interactor? > > Cheers, > > Waldo. > > > On 30 Jul 2015, at 21:12, David Gobbi wrote: > > Hi Waldo, > > It is a mapper setting. Use actor->GetMapper()->BorderOn(). > > - David > > > On Thu, Jul 30, 2015 at 11:22 AM, Waldo Valenzuela < > waldo.valenzuela at hotmail.com> wrote: > >> Hi guys, >> >> I have a problem with the class vtkImageReslice. I created a 3D image of >> 7x7x7 voxels, and after apply the vtkImageReslice (I used the example of >> VTK for this class), all the voxels that are in the borders of the image >> are cut to the half, I loaded the same image in ITK-SNAP and the >> visualisation is ok. >> >> I attached the example with the image, and the screenshot of ITK-SNAP and >> the vtk application. >> >> How I could visualise the 2D image correctly?, I need additional >> configuration to the filter? >> >> Any help is welcome. >> >> Cheers, >> >> Waldo >> > > On Thu, Jul 30, 2015 at 11:22 AM, Waldo Valenzuela < > waldo.valenzuela at hotmail.com> wrote: > >> Hi guys, >> >> I have a problem with the class vtkImageReslice. I created a 3D image of >> 7x7x7 voxels, and after apply the vtkImageReslice (I used the example of >> VTK for this class), all the voxels that are in the borders of the image >> are cut to the half, I loaded the same image in ITK-SNAP and the >> visualisation is ok. >> >> I attached the example with the image, and the screenshot of ITK-SNAP and >> the vtk application. >> >> How I could visualise the 2D image correctly?, I need additional >> configuration to the filter? >> >> Any help is welcome. >> >> Cheers, >> >> Waldo > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gustav.lundin at saabgroup.com Fri Jul 31 10:18:19 2015 From: gustav.lundin at saabgroup.com (quadprob) Date: Fri, 31 Jul 2015 07:18:19 -0700 (MST) Subject: [vtkusers] Speed up cell allocation Message-ID: <1438352299291-5733208.post@n5.nabble.com> 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. From vaper at ukr.net Fri Jul 31 11:16:19 2015 From: vaper at ukr.net (Ievgen Petrashchuk) Date: Fri, 31 Jul 2015 18:16:19 +0300 Subject: [vtkusers] Exporting vtkVolume to STL/PLY Message-ID: <1438355606.807488125.efn0t1ip@frv40.fwdcdn.com> 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->SetSize(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(); ? ? 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->Render(); ? ? // 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; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Jul 31 11:45:38 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 31 Jul 2015 11:45:38 -0400 Subject: [vtkusers] Exporting vtkVolume to STL/PLY In-Reply-To: <1438355606.807488125.efn0t1ip@frv40.fwdcdn.com> References: <1438355606.807488125.efn0t1ip@frv40.fwdcdn.com> Message-ID: 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 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: