From ben.boeckel at kitware.com Wed Jun 1 08:39:22 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 1 Jun 2016 08:39:22 -0400 Subject: [vtk-developers] Commit log guidelines In-Reply-To: References: <20160517212133.956938156@mail.rogue-research.com> <20160531215910.GB26286@megas.kitware.com> Message-ID: <20160601123922.GB16753@megas.kitware.com> On Tue, May 31, 2016 at 16:23:25 -0600, David Gobbi wrote: > These are very nice sentences that express complete ideas. Perhaps > they are compacted somewhat by removal of articles "the", "a", etc. > but that's no reason to deprive them of their sentence-ness by removing > the capitalization. Well, the removal of the period at the end makes it look weirder to me. But I guess the base feeling is that: vtkCore: fix linking looks better than: vtkCore: Fix linking to me. *shrug* I'm not too worried about commit style as much as just good commit messages. --Ben From sean at rogue-research.com Wed Jun 1 10:48:02 2016 From: sean at rogue-research.com (Sean McBride) Date: Wed, 1 Jun 2016 10:48:02 -0400 Subject: [vtk-developers] Overriding member functions warnings with recent versions of clang/LLVM. In-Reply-To: References: Message-ID: <20160601144802.2004721314@mail.rogue-research.com> On Wed, 1 Jun 2016 09:44:29 +1000, Andrew Maclean said: >If you build VTK on OX X El Capitan with LLVM 7.3.0 you will get lots of >these warnings: >------- >warning: 'PrintSelf' overrides a member function but is not marked >'override' [-Winconsistent-missing-override] > > virtual void PrintSelf(ostream& os, vtkIndent indent); >------- >To suppress them just add: >-Wno-inconsistent-missing-override to CMAKE_CXX_FLAGS. > >Apparently the -Winconsistent-missing-override flag now automatically gets >added with -Wall on recent versions of clang. Andrew, The warning has been default for a while now, you're seeing them now because I merged the first use of 'override' in VTK a while ago, as discussed on this list. Until VTK fully uses 'override' everywhere as appropriate, you'll need to disable that warning. I'm investigating using clang-tidy's modernize-use-override to automate it: 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 sean at rogue-research.com Wed Jun 1 12:14:54 2016 From: sean at rogue-research.com (Sean McBride) Date: Wed, 1 Jun 2016 12:14:54 -0400 Subject: [vtk-developers] Removing the BTX/ETX markers from VTK code In-Reply-To: References: Message-ID: <20160601161454.817886501@mail.rogue-research.com> On Thu, 26 May 2016 10:08:18 -0600, David Gobbi said: >On Thu, May 26, 2016 at 9:58 AM, Ken Martin wrote: > >> Very nice David! >> > >So you didn't have any particular attachment to them? ;) > >Now that they're gone, there's still "#ifndef __WRAP__" for hiding code from >the wrappers. And I plan to expand this into the following: > >__VTK_WRAP__ // pre-defined by all wrapping tools >__VTK_WRAP_PYTHON___ // pre-defined by vtkWrapPython > >etc. for the other wrapper tools, so that you know what tool is processing >the >header file. David, If you could get rid of the double underscores while you're at it, that'd be great. :) Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From david.gobbi at gmail.com Wed Jun 1 14:08:15 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 1 Jun 2016 12:08:15 -0600 Subject: [vtk-developers] Removing the BTX/ETX markers from VTK code In-Reply-To: <20160601161454.817886501@mail.rogue-research.com> References: <20160601161454.817886501@mail.rogue-research.com> Message-ID: On Wed, Jun 1, 2016 at 10:14 AM, Sean McBride wrote: > On Thu, 26 May 2016 10:08:18 -0600, David Gobbi said: > > >the wrappers. And I plan to expand this into the following: > > > >__VTK_WRAP__ // pre-defined by all wrapping tools > >__VTK_WRAP_PYTHON___ // pre-defined by vtkWrapPython > > > >etc. for the other wrapper tools, so that you know what tool is processing > >the > >header file. > > David, > > If you could get rid of the double underscores while you're at it, that'd > be great. :) > I hate to break it to you, but vtkWrapPython pre-defines a whole bunch of double-underscore macros. It has to, otherwise it wouldn't work. Examples: __STDC__ __cplusplus And on OS X: __APPLE__ __DARWIN__ It's absolutely necessary for the wrapping tool executables to pre-define such macros, because otherwise they cannot mimic a compiler. When I see a macro like "VTK_WRAP", I'd assume it's defined in a header somewhere. So the use of __VTK_WRAP__ clearly indicates that the macro is pre-defined by the executable. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Jun 6 10:51:00 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 6 Jun 2016 08:51:00 -0600 Subject: [vtk-developers] New way of doing wrapper hints Message-ID: Hi All, I've put a proposal on the wiki for adding wrapping hints to the method declarations in the header files: http://www.vtk.org/Wiki/VTK/Wrapping_hints In this proposal, hinting would be done like this: VTK_SIZEHINT(3) double* GetPoint(); and we could get rid of the "hints" file. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Mon Jun 6 11:12:10 2016 From: david.thompson at kitware.com (David Thompson) Date: Mon, 6 Jun 2016 11:12:10 -0400 Subject: [vtk-developers] New way of doing wrapper hints In-Reply-To: References: Message-ID: <92194B3F-2D95-452B-A527-CBF7F6FE3062@kitware.com> +1! 1. I assume that attributes are allowed prior to function parameters... from the spec it was not immediately obvious. For example, what about this method: VTK_SIZEHINT(sz) double* findOrAddEntries( int key, int sz, VTK_SIZEHINT(sz) double* vals); that both accepts and returns a variable-length array (of length sz, one of the other parameters)? 2. Would you put them in the declaration or implementation? I have a mild preference for the implementation so that the declaration is short and easy to skim. David > I've put a proposal on the wiki for adding wrapping hints to the > method declarations in the header files: > > http://www.vtk.org/Wiki/VTK/Wrapping_hints > > In this proposal, hinting would be done like this: > > VTK_SIZEHINT(3) double* GetPoint(); > > and we could get rid of the "hints" file. > > - 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Mon Jun 6 11:13:31 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 6 Jun 2016 11:13:31 -0400 Subject: [vtk-developers] New way of doing wrapper hints In-Reply-To: References: Message-ID: <5755931B.8030006@kitware.com> On 06/06/2016 10:51 AM, David Gobbi wrote: > In this proposal, hinting would be done like this: > > VTK_SIZEHINT(3) double* GetPoint(); > > and we could get rid of the "hints" file. Neat. I suggest using a prefix like `VTK_HINT_` for all such macros, and corresponding attribute names with a prefix like `vtk::hint::`. That will reserve space for other attributes to be added later for reasons other than hints. -Brad From utkarsh.ayachit at kitware.com Mon Jun 6 11:27:51 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Mon, 6 Jun 2016 11:27:51 -0400 Subject: [vtk-developers] New way of doing wrapper hints In-Reply-To: References: Message-ID: > In this proposal, hinting would be done like this: > VTK_SIZEHINT(3) double* GetPoint(); > and we could get rid of the "hints" file. This is awesome! +1. From david.lonie at kitware.com Mon Jun 6 12:03:08 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 6 Jun 2016 12:03:08 -0400 Subject: [vtk-developers] New way of doing wrapper hints In-Reply-To: <92194B3F-2D95-452B-A527-CBF7F6FE3062@kitware.com> References: <92194B3F-2D95-452B-A527-CBF7F6FE3062@kitware.com> Message-ID: +1 to the idea and Brad's suggestion! On Mon, Jun 6, 2016 at 11:12 AM, David Thompson wrote: > 1. I assume that attributes are allowed prior to function parameters... > from the spec it was not immediately obvious. For example, what about this > method: > > VTK_SIZEHINT(sz) double* findOrAddEntries( > int key, int sz, VTK_SIZEHINT(sz) double* vals); > > that both accepts and returns a variable-length array (of length sz, one > of the other parameters)? > Does this sort of pattern occur in VTK a lot? AIUI, the current hints file only allows fixed-length arrays and is not dependent on other variables to get the size. For (fixed-size) array parameters, it seems the parser should be able to pull the information out of the declaration if the 'type var[sz]' notation is used instead just 'type *var': void SetPoint(vtkIdType i, float point[3]); would let the parser know that 'point' is an array of 3 floats. Not sure if it does this already? Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Mon Jun 6 12:31:31 2016 From: david.thompson at kitware.com (David Thompson) Date: Mon, 6 Jun 2016 12:31:31 -0400 Subject: [vtk-developers] New way of doing wrapper hints In-Reply-To: References: <92194B3F-2D95-452B-A527-CBF7F6FE3062@kitware.com> Message-ID: <1ED64F2A-4902-4DEB-BC0C-B0A72E897AED@kitware.com> >> ... For example, what about this method: >> >> VTK_SIZEHINT(sz) double* findOrAddEntries( >> int key, int sz, VTK_SIZEHINT(sz) double* vals); >> >> that both accepts and returns a variable-length array (of length sz, one of the other parameters)? >> > Does this sort of pattern occur in VTK a lot? Some but not a lot. It might happen more if it was easier to wrap. One place it does occur is InsertNextCell(int npts, vtkIdType* conn). It would provide a hint to the wrapper that would (1) let us avoid constructing a vtkIdList to call a different variant and (2) let us check that the length of the array passed to the Python (or other) interpreter matches the length value passed as the first parameter. David From david.gobbi at gmail.com Mon Jun 6 12:45:26 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 6 Jun 2016 10:45:26 -0600 Subject: [vtk-developers] New way of doing wrapper hints In-Reply-To: <92194B3F-2D95-452B-A527-CBF7F6FE3062@kitware.com> References: <92194B3F-2D95-452B-A527-CBF7F6FE3062@kitware.com> Message-ID: On Mon, Jun 6, 2016 at 9:12 AM, David Thompson wrote: > > 1. I assume that attributes are allowed prior to function parameters... > from the spec it was not immediately obvious. For example, what about this > method: > > VTK_SIZEHINT(sz) double* findOrAddEntries( > int key, int sz, VTK_SIZEHINT(sz) double* vals); > > that both accepts and returns a variable-length array (of length sz, one > of the other parameters)? > Yes, the hints can be used in either location. The hint attaches to the type. > 2. Would you put them in the declaration or implementation? I have a mild > preference for the implementation so that the declaration is short and easy > to skim. > The wrappers only see the declaration. They never see the .cxx file. On Mon, Jun 6, 2016 at 9:13 AM, Brad King wrote: > > > Neat. I suggest using a prefix like `VTK_HINT_` for all such macros, > and corresponding attribute names with a prefix like `vtk::hint::`. > That will reserve space for other attributes to be added later for > reasons other than hints. My preference is for "VTK_SIZEHINT" because it's easier to say... I can ask Joe in the cubicle next me me "Hey Joe, what's the size hint for that method?" In comparison, "VTK_HINT_SIZE" just doesn't roll off the tongue. In all seriousness, though, I'll go with the latter if people feel it's the better choice. Regarding "vtk::hint::", in C++ Section 7.6.1 "Attribute syntax and semantics", the grammar does not allow more than one "::". Apparently attribute namespaces cannot be nested. On Mon, Jun 6, 2016 at 10:03 AM, David Lonie wrote: > +1 to the idea and Brad's suggestion! > Grumble. > Does this sort of pattern occur in VTK a lot? AIUI, the current hints file > only allows fixed-length arrays and is not dependent on other variables to > get the size. > We want to allow more flexibility than what the current hints file offers. For example, sometimes a size hint should refer to one of the object's methods or even to one of the other parameters: void InsertNextCell(int npts, VTK_SIZEHINT(npts) vtkIdType* conn) void SetTuple(VTK_SIZEHINT(GetNumberOfComponents()) double* tuple); Ideally, the size hint could be an expression that would be evaluated to compute the size. There would be some limitations, of course, but there are tons of possibilities. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Jun 6 13:02:41 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 6 Jun 2016 13:02:41 -0400 Subject: [vtk-developers] [RFC] Merge request spring cleaning Message-ID: <20160606170241.GA20315@megas.kitware.com> Hi, We're up to 60+ open merge requests again. Pretty much anything after the first page was opened at least 2 months ago (and I suspect this would be true for pretty much any default page size). With the goal of keeping things clearer, I'd like to propose the following: - end of each month, close MRs with no new activity (code, forward progression in a discussion, etc.) in the previous 2 months; - beginning of the month, message that there has been no activity in the past month and is slated for cleanup. MRs closed this way would get a label of "stale", "old", or something similar so that picking out MRs closed this way is easier (the label would be removed when reopened or resolved as either merged or unnecessary). Thoughts? --Ben From dave.demarle at kitware.com Mon Jun 6 13:09:33 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 6 Jun 2016 13:09:33 -0400 Subject: [vtk-developers] [RFC] Merge request spring cleaning In-Reply-To: <20160606170241.GA20315@megas.kitware.com> References: <20160606170241.GA20315@megas.kitware.com> Message-ID: +1 David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Jun 6, 2016 at 1:02 PM, Ben Boeckel wrote: > Hi, > > We're up to 60+ open merge requests again. Pretty much anything after > the first page was opened at least 2 months ago (and I suspect this > would be true for pretty much any default page size). With the goal of > keeping things clearer, I'd like to propose the following: > > - end of each month, close MRs with no new activity (code, forward > progression in a discussion, etc.) in the previous 2 months; > - beginning of the month, message that there has been no activity in > the past month and is slated for cleanup. > > MRs closed this way would get a label of "stale", "old", or something > similar so that picking out MRs closed this way is easier (the label > would be removed when reopened or resolved as either merged or > unnecessary). > > Thoughts? > > --Ben > _______________________________________________ > 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 david.gobbi at gmail.com Mon Jun 6 13:55:55 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 6 Jun 2016 11:55:55 -0600 Subject: [vtk-developers] New way of doing wrapper hints In-Reply-To: References: <92194B3F-2D95-452B-A527-CBF7F6FE3062@kitware.com> Message-ID: Here's an MR for hinting "new instance" methods, since it's easier than the size hints: https://gitlab.kitware.com/vtk/vtk/merge_requests/1535 - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Jun 9 13:37:15 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 9 Jun 2016 13:37:15 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory Message-ID: Hi all, Does anybody have seen or has advice on fixing the following bug. Thank you. http://www.vtk.org/Bug/view.php?id=16744 I paste here a portion of the test I am using. The whole test is in mantis. 10000 iterations of Render leak about 20MB according the reports from the OS. The render window is kept around and the renderer and all other objects are deleted and and re-added at each iteration. The same program does not leak for onscreen OpenGL or offscreen/onscreen OpenGL2. void iteration(int i, vtkRenderWindow* renderWindow) { vtkSmartPointer cylinder = vtkSmartPointer::New(); cylinder->SetResolution(8); vtkSmartPointer cylinderMapper = vtkSmartPointer::New(); cylinderMapper->SetInputConnection(cylinder->GetOutputPort()); vtkSmartPointer cylinderActor = vtkSmartPointer::New(); cylinderActor->SetMapper(cylinderMapper); cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784); cylinderActor->RotateX(30.0); cylinderActor->RotateY(-45.0); vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(cylinderActor); renderer->SetBackground(0.1, 0.2, 0.4); // Zoom in a little by accessing the camera and invoking its "Zoom" method. renderer->ResetCamera(); renderWindow->AddRenderer(renderer); renderWindow->Render(); renderWindow->RemoveRenderer(renderer); } int main() { vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->SetSize(200, 200); //renderWindow->OffScreenRenderingOn(); for (int i = 0; i < 10000; ++i) { iteration(i, renderWindow); if (i % 10 == 0) { std::cout << i << " ==== Iteration ====" << std::endl; os_memory_usage(); } } return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Jun 9 14:24:10 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 9 Jun 2016 14:24:10 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: If you are on linux, can you run valgrind on this? Bill On Thu, Jun 9, 2016 at 1:37 PM, Dan Lipsa wrote: > Hi all, > Does anybody have seen or has advice on fixing the following bug. > Thank you. > > http://www.vtk.org/Bug/view.php?id=16744 > > I paste here a portion of the test I am using. The whole test is in mantis. > > 10000 iterations of Render leak about 20MB according the reports from the > OS. The render window is kept around and the renderer and all other objects > are deleted and and re-added at each iteration. > > The same program does not leak for onscreen OpenGL or offscreen/onscreen > OpenGL2. > > > > void iteration(int i, vtkRenderWindow* renderWindow) > { > vtkSmartPointer cylinder = > vtkSmartPointer::New(); > cylinder->SetResolution(8); > > vtkSmartPointer cylinderMapper = > vtkSmartPointer::New(); > cylinderMapper->SetInputConnection(cylinder->GetOutputPort()); > > vtkSmartPointer cylinderActor = > vtkSmartPointer::New(); > cylinderActor->SetMapper(cylinderMapper); > cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784); > cylinderActor->RotateX(30.0); > cylinderActor->RotateY(-45.0); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > renderer->AddActor(cylinderActor); > renderer->SetBackground(0.1, 0.2, 0.4); > // Zoom in a little by accessing the camera and invoking its "Zoom" > method. > renderer->ResetCamera(); > > renderWindow->AddRenderer(renderer); > renderWindow->Render(); > renderWindow->RemoveRenderer(renderer); > } > > int main() > { > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->SetSize(200, 200); > //renderWindow->OffScreenRenderingOn(); > for (int i = 0; i < 10000; ++i) > { > iteration(i, renderWindow); > if (i % 10 == 0) > { > std::cout << i << " ==== Iteration ====" << std::endl; > os_memory_usage(); > } > } > return 0; > } > > > _______________________________________________ > 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 > > -- Unpaid intern in BillsBasement at noware dot com From dan.lipsa at kitware.com Thu Jun 9 14:45:48 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 9 Jun 2016 14:45:48 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: I did run it, it does not report anything. This is the report for 10 iterations. It was similar for 10000. Maybe the memory is allocated by the driver and not caught by valgrind. =24195== HEAP SUMMARY: ==24195== in use at exit: 113 bytes in 3 blocks ==24195== total heap usage: 28,105 allocs, 28,102 frees, 18,108,607 bytes allocated ==24195== ==24195== LEAK SUMMARY: ==24195== definitely lost: 0 bytes in 0 blocks ==24195== indirectly lost: 0 bytes in 0 blocks ==24195== possibly lost: 0 bytes in 0 blocks ==24195== still reachable: 113 bytes in 3 blocks ==24195== suppressed: 0 bytes in 0 blocks ==24195== Reachable blocks (those to which a pointer was found) are not shown. ==24195== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==24195== ==24195== For counts of detected and suppressed errors, rerun with: -v ==24195== Use --track-origins=yes to see where uninitialised values come from ==24195== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from 0) On Thu, Jun 9, 2016 at 2:24 PM, Bill Lorensen wrote: > If you are on linux, can you run valgrind on this? > > Bill > > On Thu, Jun 9, 2016 at 1:37 PM, Dan Lipsa wrote: > > Hi all, > > Does anybody have seen or has advice on fixing the following bug. > > Thank you. > > > > http://www.vtk.org/Bug/view.php?id=16744 > > > > I paste here a portion of the test I am using. The whole test is in > mantis. > > > > 10000 iterations of Render leak about 20MB according the reports from the > > OS. The render window is kept around and the renderer and all other > objects > > are deleted and and re-added at each iteration. > > > > The same program does not leak for onscreen OpenGL or offscreen/onscreen > > OpenGL2. > > > > > > > > void iteration(int i, vtkRenderWindow* renderWindow) > > { > > vtkSmartPointer cylinder = > > vtkSmartPointer::New(); > > cylinder->SetResolution(8); > > > > vtkSmartPointer cylinderMapper = > > vtkSmartPointer::New(); > > cylinderMapper->SetInputConnection(cylinder->GetOutputPort()); > > > > vtkSmartPointer cylinderActor = > > vtkSmartPointer::New(); > > cylinderActor->SetMapper(cylinderMapper); > > cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784); > > cylinderActor->RotateX(30.0); > > cylinderActor->RotateY(-45.0); > > > > vtkSmartPointer renderer = > > vtkSmartPointer::New(); > > renderer->AddActor(cylinderActor); > > renderer->SetBackground(0.1, 0.2, 0.4); > > // Zoom in a little by accessing the camera and invoking its "Zoom" > > method. > > renderer->ResetCamera(); > > > > renderWindow->AddRenderer(renderer); > > renderWindow->Render(); > > renderWindow->RemoveRenderer(renderer); > > } > > > > int main() > > { > > vtkSmartPointer renderWindow = > > vtkSmartPointer::New(); > > renderWindow->SetSize(200, 200); > > //renderWindow->OffScreenRenderingOn(); > > for (int i = 0; i < 10000; ++i) > > { > > iteration(i, renderWindow); > > if (i % 10 == 0) > > { > > std::cout << i << " ==== Iteration ====" << std::endl; > > os_memory_usage(); > > } > > } > > return 0; > > } > > > > > > _______________________________________________ > > 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 > > > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Jun 9 15:46:03 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 9 Jun 2016 15:46:03 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: Did you run with this option? (See the message below) To see them, rerun with: --leak-check=full --show-leak-kinds=all On Thu, Jun 9, 2016 at 2:45 PM, Dan Lipsa wrote: > I did run it, it does not report anything. This is the report for 10 > iterations. It was similar for 10000. > Maybe the memory is allocated by the driver and not caught by valgrind. > > =24195== HEAP SUMMARY: > ==24195== in use at exit: 113 bytes in 3 blocks > ==24195== total heap usage: 28,105 allocs, 28,102 frees, 18,108,607 > bytes allocated > ==24195== > ==24195== LEAK SUMMARY: > ==24195== definitely lost: 0 bytes in 0 blocks > ==24195== indirectly lost: 0 bytes in 0 blocks > ==24195== possibly lost: 0 bytes in 0 blocks > ==24195== still reachable: 113 bytes in 3 blocks > ==24195== suppressed: 0 bytes in 0 blocks > ==24195== Reachable blocks (those to which a pointer was found) are not > shown. > ==24195== To see them, rerun with: --leak-check=full --show-leak-kinds=all > ==24195== > ==24195== For counts of detected and suppressed errors, rerun with: -v > ==24195== Use --track-origins=yes to see where uninitialised values come > from > ==24195== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from 0) > > > On Thu, Jun 9, 2016 at 2:24 PM, Bill Lorensen > wrote: > >> If you are on linux, can you run valgrind on this? >> >> Bill >> >> On Thu, Jun 9, 2016 at 1:37 PM, Dan Lipsa wrote: >> > Hi all, >> > Does anybody have seen or has advice on fixing the following bug. >> > Thank you. >> > >> > http://www.vtk.org/Bug/view.php?id=16744 >> > >> > I paste here a portion of the test I am using. The whole test is in >> mantis. >> > >> > 10000 iterations of Render leak about 20MB according the reports from >> the >> > OS. The render window is kept around and the renderer and all other >> objects >> > are deleted and and re-added at each iteration. >> > >> > The same program does not leak for onscreen OpenGL or offscreen/onscreen >> > OpenGL2. >> > >> > >> > >> > void iteration(int i, vtkRenderWindow* renderWindow) >> > { >> > vtkSmartPointer cylinder = >> > vtkSmartPointer::New(); >> > cylinder->SetResolution(8); >> > >> > vtkSmartPointer cylinderMapper = >> > vtkSmartPointer::New(); >> > cylinderMapper->SetInputConnection(cylinder->GetOutputPort()); >> > >> > vtkSmartPointer cylinderActor = >> > vtkSmartPointer::New(); >> > cylinderActor->SetMapper(cylinderMapper); >> > cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784); >> > cylinderActor->RotateX(30.0); >> > cylinderActor->RotateY(-45.0); >> > >> > vtkSmartPointer renderer = >> > vtkSmartPointer::New(); >> > renderer->AddActor(cylinderActor); >> > renderer->SetBackground(0.1, 0.2, 0.4); >> > // Zoom in a little by accessing the camera and invoking its "Zoom" >> > method. >> > renderer->ResetCamera(); >> > >> > renderWindow->AddRenderer(renderer); >> > renderWindow->Render(); >> > renderWindow->RemoveRenderer(renderer); >> > } >> > >> > int main() >> > { >> > vtkSmartPointer renderWindow = >> > vtkSmartPointer::New(); >> > renderWindow->SetSize(200, 200); >> > //renderWindow->OffScreenRenderingOn(); >> > for (int i = 0; i < 10000; ++i) >> > { >> > iteration(i, renderWindow); >> > if (i % 10 == 0) >> > { >> > std::cout << i << " ==== Iteration ====" << std::endl; >> > os_memory_usage(); >> > } >> > } >> > return 0; >> > } >> > >> > >> > _______________________________________________ >> > 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 >> > >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> > > > _______________________________________________ > 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 > > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Jun 9 16:24:18 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 9 Jun 2016 16:24:18 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: I did not have --show-leak-kinds=all. This is the new result: ==492== HEAP SUMMARY: ==492== in use at exit: 113 bytes in 3 blocks ==492== total heap usage: 28,104 allocs, 28,101 frees, 18,108,567 bytes allocated ==492== ==492== 24 bytes in 1 blocks are still reachable in loss record 1 of 3 ==492== at 0x4C2C857: malloc (vg_replace_malloc.c:291) ==492== by 0xE42680D: XextCreateExtension (in /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0) ==492== by 0x8AEBF37: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) ==492== by 0x105A05DF: ??? ==492== ==492== 32 bytes in 1 blocks are still reachable in loss record 2 of 3 ==492== at 0x4C2AAE8: calloc (vg_replace_malloc.c:618) ==492== by 0xE62D68F: _dlerror_run (dlerror.c:141) ==492== by 0xE62D197: dlsym (dlsym.c:70) ==492== by 0x8B1410D: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) ==492== by 0x8D4471F: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) ==492== by 0x8D7561F: ??? ==492== by 0x8B2AAF4: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) ==492== ==492== 57 bytes in 1 blocks are still reachable in loss record 3 of 3 ==492== at 0x4C2C857: malloc (vg_replace_malloc.c:291) ==492== by 0x8B1134C: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) ==492== by 0x61642F656D6F682E: ??? ==492== by 0x732F617370696C6D: ??? ==492== by 0x61646376752F6371: ??? ==492== by 0x6C706D6178652D73: ??? ==492== by 0x2F6B61656C2F7364: ??? ==492== by 0x74762F646C697561: ??? ==492== by 0x79726F6D656D2D6A: ??? ==492== ==492== LEAK SUMMARY: ==492== definitely lost: 0 bytes in 0 blocks ==492== indirectly lost: 0 bytes in 0 blocks ==492== possibly lost: 0 bytes in 0 blocks ==492== still reachable: 113 bytes in 3 blocks ==492== suppressed: 0 bytes in 0 blocks ==492== ==492== For counts of detected and suppressed errors, rerun with: -v ==492== Use --track-origins=yes to see where uninitialised values come from ==492== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from 0) On Thu, Jun 9, 2016 at 3:46 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Did you run with this option? (See the message below) > > To see them, rerun with: --leak-check=full --show-leak-kinds=all > > On Thu, Jun 9, 2016 at 2:45 PM, Dan Lipsa wrote: > >> I did run it, it does not report anything. This is the report for 10 >> iterations. It was similar for 10000. >> Maybe the memory is allocated by the driver and not caught by valgrind. >> >> =24195== HEAP SUMMARY: >> ==24195== in use at exit: 113 bytes in 3 blocks >> ==24195== total heap usage: 28,105 allocs, 28,102 frees, 18,108,607 >> bytes allocated >> ==24195== >> ==24195== LEAK SUMMARY: >> ==24195== definitely lost: 0 bytes in 0 blocks >> ==24195== indirectly lost: 0 bytes in 0 blocks >> ==24195== possibly lost: 0 bytes in 0 blocks >> ==24195== still reachable: 113 bytes in 3 blocks >> ==24195== suppressed: 0 bytes in 0 blocks >> ==24195== Reachable blocks (those to which a pointer was found) are not >> shown. >> ==24195== To see them, rerun with: --leak-check=full --show-leak-kinds=all >> ==24195== >> ==24195== For counts of detected and suppressed errors, rerun with: -v >> ==24195== Use --track-origins=yes to see where uninitialised values come >> from >> ==24195== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from 0) >> >> >> On Thu, Jun 9, 2016 at 2:24 PM, Bill Lorensen >> wrote: >> >>> If you are on linux, can you run valgrind on this? >>> >>> Bill >>> >>> On Thu, Jun 9, 2016 at 1:37 PM, Dan Lipsa wrote: >>> > Hi all, >>> > Does anybody have seen or has advice on fixing the following bug. >>> > Thank you. >>> > >>> > http://www.vtk.org/Bug/view.php?id=16744 >>> > >>> > I paste here a portion of the test I am using. The whole test is in >>> mantis. >>> > >>> > 10000 iterations of Render leak about 20MB according the reports from >>> the >>> > OS. The render window is kept around and the renderer and all other >>> objects >>> > are deleted and and re-added at each iteration. >>> > >>> > The same program does not leak for onscreen OpenGL or >>> offscreen/onscreen >>> > OpenGL2. >>> > >>> > >>> > >>> > void iteration(int i, vtkRenderWindow* renderWindow) >>> > { >>> > vtkSmartPointer cylinder = >>> > vtkSmartPointer::New(); >>> > cylinder->SetResolution(8); >>> > >>> > vtkSmartPointer cylinderMapper = >>> > vtkSmartPointer::New(); >>> > cylinderMapper->SetInputConnection(cylinder->GetOutputPort()); >>> > >>> > vtkSmartPointer cylinderActor = >>> > vtkSmartPointer::New(); >>> > cylinderActor->SetMapper(cylinderMapper); >>> > cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784); >>> > cylinderActor->RotateX(30.0); >>> > cylinderActor->RotateY(-45.0); >>> > >>> > vtkSmartPointer renderer = >>> > vtkSmartPointer::New(); >>> > renderer->AddActor(cylinderActor); >>> > renderer->SetBackground(0.1, 0.2, 0.4); >>> > // Zoom in a little by accessing the camera and invoking its "Zoom" >>> > method. >>> > renderer->ResetCamera(); >>> > >>> > renderWindow->AddRenderer(renderer); >>> > renderWindow->Render(); >>> > renderWindow->RemoveRenderer(renderer); >>> > } >>> > >>> > int main() >>> > { >>> > vtkSmartPointer renderWindow = >>> > vtkSmartPointer::New(); >>> > renderWindow->SetSize(200, 200); >>> > //renderWindow->OffScreenRenderingOn(); >>> > for (int i = 0; i < 10000; ++i) >>> > { >>> > iteration(i, renderWindow); >>> > if (i % 10 == 0) >>> > { >>> > std::cout << i << " ==== Iteration ====" << std::endl; >>> > os_memory_usage(); >>> > } >>> > } >>> > return 0; >>> > } >>> > >>> > >>> > _______________________________________________ >>> > 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 >>> > >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >> >> >> _______________________________________________ >> 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 >> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Fri Jun 10 08:32:58 2016 From: david.lonie at kitware.com (David Lonie) Date: Fri, 10 Jun 2016 08:32:58 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: Hey Dan, Not sure what would be causing that, especially since valgrind isn't complaining. Some ideas: What drivers have you noticed this on? Is there a pattern to them? I could see a leaking texture handle etc. on a software driver doing something like this. Has this been tested on all the major drivers? This would help narrow down whether it's something on our side or theirs. This is a shot in the dark, but try running this through apitrace ( https://github.com/apitrace/apitrace), then playback the trace and monitor memory usage + the error log. Maybe something's funky in the OpenGL command stream. Beyond that, the debugging tools are failing us and I don't see many other options than to start cutting out bits of the code to locate the problem. See if the leak goes away when, e.g. vtkOpenGLRenderer::DeviceRender is bypassed and go from there. HTH, Dave On Thu, Jun 9, 2016 at 4:24 PM, Dan Lipsa wrote: > I did not have --show-leak-kinds=all. This is the new result: > > ==492== HEAP SUMMARY: > ==492== in use at exit: 113 bytes in 3 blocks > ==492== total heap usage: 28,104 allocs, 28,101 frees, 18,108,567 bytes > allocated > ==492== > ==492== 24 bytes in 1 blocks are still reachable in loss record 1 of 3 > ==492== at 0x4C2C857: malloc (vg_replace_malloc.c:291) > ==492== by 0xE42680D: XextCreateExtension (in > /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0) > ==492== by 0x8AEBF37: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) > ==492== by 0x105A05DF: ??? > ==492== > ==492== 32 bytes in 1 blocks are still reachable in loss record 2 of 3 > ==492== at 0x4C2AAE8: calloc (vg_replace_malloc.c:618) > ==492== by 0xE62D68F: _dlerror_run (dlerror.c:141) > ==492== by 0xE62D197: dlsym (dlsym.c:70) > ==492== by 0x8B1410D: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) > ==492== by 0x8D4471F: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) > ==492== by 0x8D7561F: ??? > ==492== by 0x8B2AAF4: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) > ==492== > ==492== 57 bytes in 1 blocks are still reachable in loss record 3 of 3 > ==492== at 0x4C2C857: malloc (vg_replace_malloc.c:291) > ==492== by 0x8B1134C: ??? (in /usr/lib/nvidia-304/libGL.so.304.131) > ==492== by 0x61642F656D6F682E: ??? > ==492== by 0x732F617370696C6D: ??? > ==492== by 0x61646376752F6371: ??? > ==492== by 0x6C706D6178652D73: ??? > ==492== by 0x2F6B61656C2F7364: ??? > ==492== by 0x74762F646C697561: ??? > ==492== by 0x79726F6D656D2D6A: ??? > ==492== > ==492== LEAK SUMMARY: > ==492== definitely lost: 0 bytes in 0 blocks > ==492== indirectly lost: 0 bytes in 0 blocks > ==492== possibly lost: 0 bytes in 0 blocks > ==492== still reachable: 113 bytes in 3 blocks > ==492== suppressed: 0 bytes in 0 blocks > ==492== > ==492== For counts of detected and suppressed errors, rerun with: -v > ==492== Use --track-origins=yes to see where uninitialised values come from > ==492== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from 0) > > > On Thu, Jun 9, 2016 at 3:46 PM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Did you run with this option? (See the message below) >> >> To see them, rerun with: --leak-check=full --show-leak-kinds=all >> >> On Thu, Jun 9, 2016 at 2:45 PM, Dan Lipsa wrote: >> >>> I did run it, it does not report anything. This is the report for 10 >>> iterations. It was similar for 10000. >>> Maybe the memory is allocated by the driver and not caught by valgrind. >>> >>> =24195== HEAP SUMMARY: >>> ==24195== in use at exit: 113 bytes in 3 blocks >>> ==24195== total heap usage: 28,105 allocs, 28,102 frees, 18,108,607 >>> bytes allocated >>> ==24195== >>> ==24195== LEAK SUMMARY: >>> ==24195== definitely lost: 0 bytes in 0 blocks >>> ==24195== indirectly lost: 0 bytes in 0 blocks >>> ==24195== possibly lost: 0 bytes in 0 blocks >>> ==24195== still reachable: 113 bytes in 3 blocks >>> ==24195== suppressed: 0 bytes in 0 blocks >>> ==24195== Reachable blocks (those to which a pointer was found) are not >>> shown. >>> ==24195== To see them, rerun with: --leak-check=full >>> --show-leak-kinds=all >>> ==24195== >>> ==24195== For counts of detected and suppressed errors, rerun with: -v >>> ==24195== Use --track-origins=yes to see where uninitialised values come >>> from >>> ==24195== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from >>> 0) >>> >>> >>> On Thu, Jun 9, 2016 at 2:24 PM, Bill Lorensen >>> wrote: >>> >>>> If you are on linux, can you run valgrind on this? >>>> >>>> Bill >>>> >>>> On Thu, Jun 9, 2016 at 1:37 PM, Dan Lipsa >>>> wrote: >>>> > Hi all, >>>> > Does anybody have seen or has advice on fixing the following bug. >>>> > Thank you. >>>> > >>>> > http://www.vtk.org/Bug/view.php?id=16744 >>>> > >>>> > I paste here a portion of the test I am using. The whole test is in >>>> mantis. >>>> > >>>> > 10000 iterations of Render leak about 20MB according the reports from >>>> the >>>> > OS. The render window is kept around and the renderer and all other >>>> objects >>>> > are deleted and and re-added at each iteration. >>>> > >>>> > The same program does not leak for onscreen OpenGL or >>>> offscreen/onscreen >>>> > OpenGL2. >>>> > >>>> > >>>> > >>>> > void iteration(int i, vtkRenderWindow* renderWindow) >>>> > { >>>> > vtkSmartPointer cylinder = >>>> > vtkSmartPointer::New(); >>>> > cylinder->SetResolution(8); >>>> > >>>> > vtkSmartPointer cylinderMapper = >>>> > vtkSmartPointer::New(); >>>> > cylinderMapper->SetInputConnection(cylinder->GetOutputPort()); >>>> > >>>> > vtkSmartPointer cylinderActor = >>>> > vtkSmartPointer::New(); >>>> > cylinderActor->SetMapper(cylinderMapper); >>>> > cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784); >>>> > cylinderActor->RotateX(30.0); >>>> > cylinderActor->RotateY(-45.0); >>>> > >>>> > vtkSmartPointer renderer = >>>> > vtkSmartPointer::New(); >>>> > renderer->AddActor(cylinderActor); >>>> > renderer->SetBackground(0.1, 0.2, 0.4); >>>> > // Zoom in a little by accessing the camera and invoking its "Zoom" >>>> > method. >>>> > renderer->ResetCamera(); >>>> > >>>> > renderWindow->AddRenderer(renderer); >>>> > renderWindow->Render(); >>>> > renderWindow->RemoveRenderer(renderer); >>>> > } >>>> > >>>> > int main() >>>> > { >>>> > vtkSmartPointer renderWindow = >>>> > vtkSmartPointer::New(); >>>> > renderWindow->SetSize(200, 200); >>>> > //renderWindow->OffScreenRenderingOn(); >>>> > for (int i = 0; i < 10000; ++i) >>>> > { >>>> > iteration(i, renderWindow); >>>> > if (i % 10 == 0) >>>> > { >>>> > std::cout << i << " ==== Iteration ====" << std::endl; >>>> > os_memory_usage(); >>>> > } >>>> > } >>>> > return 0; >>>> > } >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>>> > >>>> > >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > _______________________________________________ > 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 dan.lipsa at kitware.com Fri Jun 10 09:40:00 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 10 Jun 2016 09:40:00 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: Thanks Dave. This is a great idea. I will test this and report back. Beyond that, the debugging tools are failing us and I don't see many other > options than to start cutting out bits of the code to locate the problem. > See if the leak goes away when, e.g. vtkOpenGLRenderer::DeviceRender is > bypassed and go from there. > Indeed. Thanks for the pointer. Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From cheng at scandy.co Fri Jun 10 12:28:21 2016 From: cheng at scandy.co (chengguo1987) Date: Fri, 10 Jun 2016 09:28:21 -0700 (MST) Subject: [vtk-developers] vtkPointCloud remote module In-Reply-To: References: Message-ID: <1465576101699-5738628.post@n5.nabble.com> Will Schroeder-2 wrote > > *Surface extraction (in VTK/Remote/vtkPointCloud):* > We've build a pipeline of objects that perform rudimentary surface > extraction from a point cloud. There are three major parts: > 1. Generating normals - currently use vtkPCANormalEstimation, including > graph traversal to create consistently oriented normals. > 2. Compute the TSDF using vtkSignedDistance. > 3. Extract zero-crossing isocontour to generate surface > (vtkExtractSurface). I have a problem when using the source files in the GitLab repo, could you please provide the source code of vtkPointCloudModule.h and vktPointCloudModule.cxx? I went through the code and saw that the header file is required for exporting macro. But I could not find it in the GitLab repo. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkPointCloud-remote-module-tp5736213p5738628.html Sent from the VTK - Dev mailing list archive at Nabble.com. From luis.vieira at vektore.com Fri Jun 10 12:45:15 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Fri, 10 Jun 2016 12:45:15 -0400 Subject: [vtk-developers] Rendering Image and Picking Points Message-ID: <1858801d1c337$7766d2e0$663478a0$@vektore.com> Hello Guys!! First of all, I have to say that I appreciate any help! I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). Following my code. Thank you very much!! Luis MainWindow.cpp void MainWindow::ProcessImage(QString _model, QString _image) { double bounds[6] = { +1, -1, +1, -1, +1, -1 }; qvtkWidget->setVisible(true); std::string iname = _model.toStdString();//model is a *.obj Cylinder of Solid rock with h1024xw1024"; std::string imagename = _image.toStdString() ;//is the texture *.bmp file that wraps up the cylinder"; vtkRenderer* renderer = vtkRenderer::New(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); renderWindow->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. qvtkWidget->SetUseTDx(true); qvtkWidget->SetRenderWindow(renderWindow); //renderWindow->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = qvtkWidget->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // Read the image which will be the texture QMenu* popup1 = new QMenu(qvtkWidget); popup1->addAction("Draw Line"); popup1->addAction("Draw Plane"); popup1->addAction("Draw Clip"); popup1->addAction("Background White"); popup1->addAction("Background Black"); popup1->addAction("Stereo Rendering"); connect(popup1, SIGNAL(triggered(QAction*)), this, SLOT(ProcessUserViewPortInteraction(QAction*))); std::cout << "Reading image " << imagename << "..." << std::endl; vtkBMPReader* bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(imagename.c_str()); bmpReader->Update(); std::cout << "Done" << std::endl; // Creating the texture std::cout << "Making a texture out of the image... " << std::endl; vtkTexture* texture = vtkTexture::New(); texture->SetInputConnection(bmpReader->GetOutputPort()); std::cout << "Done" << std::endl; // Import geometry from a VRML file vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(bmpReader->GetOutputPort()); //imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSize(600, 600); vtkDataSet *pDataset; // Import geometry from an OBJ file std::cout << "Reading OBJ file " << iname << "..." << std::endl; vtkOBJReader* reader = vtkOBJReader::New(); reader->SetFileName(iname.c_str()); reader->Update(); vtkPolyData *polyData2 = reader->GetOutput(); std::cout << "Obj reader = " << polyData2->GetNumberOfPoints() << std::endl; std::cout << "Obj point data = " << polyData2->GetPointData()->GetNumberOfArrays() << std::endl; std::cout << "Obj point data tuples = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfTuples() << std::endl; std::cout << "Obj point data compon = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfComponents() << std::endl; // //// Renderer vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputData(polyData2); vtkActor* texturedQuad = vtkActor::New(); texturedQuad->SetMapper(mapper); texturedQuad->SetTexture(texture); //texturedQuad->SetPosition(0, 0, 0); // Create Normal Vectors to enhance smoothness & illumination vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputData(polyData2); normals->SetFeatureAngle(60.0); // Mapper vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); SolidMapper->SetInputData(normals->GetOutput()); SolidMapper->ScalarVisibilityOff(); // Actor vtkActor *SolidActor = vtkActor::New(); SolidActor->SetMapper(SolidMapper); vtkImageData* image = imageViewer->GetInput(); int dim[3]; image->GetDimensions(dim); double spacing[3]; image->GetSpacing(spacing); double origin[3]; image->GetOrigin(origin); renderer->ComputeVisiblePropBounds(bounds); Renderer->AddActor(SolidActor); Renderer->AddActor(texturedQuad); float Cx = (dim[0] * spacing[0]) / 2. + origin[0]; float Cy = (dim[1] * spacing[1]) / 2. + origin[1]; vtkCamera* m_Camera = vtkCamera::New(); m_Camera->SetPosition(Cx, Cy, 1); m_Camera->SetFocalPoint(Cx, Cy, 0); m_Camera->SetViewUp(0, 1, 0); m_Camera->GetDirectionOfProjection(); m_Camera->ParallelProjectionOn(); Renderer->SetActiveCamera(m_Camera); Renderer->SetBackground(0, 0, 0); // Background color white Renderer->ResetCamera(); qvtkWidget->GetRenderWindow()->AddRenderer(Renderer); qvtkWidget->GetRenderWindow()->Render(); //renderer->ResetCamera(); vtkIPWCallback* myCallback = vtkIPWCallback::New(); myCallback->renderer = Renderer; myCallback->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); myCallback->readerClip = vtkOBJReader::New(); myCallback->readerClip = reader; this->styleCallback = myCallback; //renderer->ResetCamera(); this->stylePicker->normalsKore = vtkSmartPointer::New(); this->stylePicker->normalsKore = normals; this->stylePicker->renderer = vtkSmartPointer::New(); this->stylePicker->actor = vtkActor::New(); this->stylePicker->mapper = vtkPolyDataMapper::New(); this->stylePicker->points = vtkSmartPointer::New(); this->stylePicker->vertices = vtkSmartPointer::New(); this->stylePicker->renderer = Renderer; this->stylePicker->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); vtkSmartPointer pointPicker = vtkSmartPointer::New(); qvtkWidget->GetRenderWindow()->GetInteractor()->SetPicker(pointPicker); qvtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(this->sty lePicker); viewPortAxActor = vtkSmartPointer::New(); viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); viewPortOMWidget = vtkSmartPointer::New(); viewPortOMWidget->SetOrientationMarker(viewPortAxActor); viewPortOMWidget->SetViewport(0.0, 0.0, 0.25, 0.25); Connections = vtkEventQtSlotConnect::New(); Connections->Connect(qvtkWidget->GetRenderWindow()->GetInteractor(), vtkCommand::KeyPressEvent, this, SLOT(popup(vtkObject*, unsigned long, void*, void*, vtkCommand*)), popup1, 1.0); } MainWindow.h //Point PickFunction class MouseInteractorStyle2 : public vtkInteractorStyleTrackballCamera { public: std::vector pointList; std::vector pointListPlane; vtkSmartPointer matrix; vtkSmartPointer normalsKore = vtkSmartPointer::New(); vtkSmartPointer spherePickSource; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer vertices = vtkSmartPointer::New(); vtkSmartPointer polydata; vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkActor* actor; vtkPolyDataMapper* mapper; static MouseInteractorStyle2* New() { return new MouseInteractorStyle2; } //vtkTypeMacro(MouseInteractorStyle2, vtkInteractorStyleTrackballCamera); virtual void OnRightButtonDown() { //std::cout << "Picking pixel: " << this->Interactor->GetEventPosition()[0] << " " << this->Interactor->GetEventPosition()[1] << std::endl; //this->Interactor->GetPicker()->Pick(this->Interactor->GetEventPosition()[0 ], // this->Interactor->GetEventPosition()[1], // 0, // always zero. // this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()); //double picked[3]; //this->Interactor->GetPicker()->GetPickPosition(picked); //std::cout << "Picked value: " << picked[0] << " " << picked[1] << " " << picked[2] << std::endl; int* clickPos = this->renderWindowInteractor->GetEventPosition(); // Pick from this location. vtkPropPicker* picker = vtkPropPicker::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); //vtkSmartPointer picker = // vtkSmartPointer::New(); ////picker->SetTolerance(0.005); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); double* pos = picker->GetPickPosition(); std::cout << "Pick position (world coordinates) is: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; std::cout << "Picked actor: " << picker->GetActor() << std::endl; // Add label array. polydata = vtkSmartPointer::New(); spherePickSource = vtkSmartPointer::New(); spherePickSource->SetRadius(0.030); spherePickSource->SetCenter(pos[0], pos[1], pos[2]); if (pointList.size() < 2) { //pointList.clear(); pointList.push_back(picked); } if (pointListPlane.size() < 30) { pointListPlane.push_back(picked); } //Create a mapper and actor mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(spherePickSource->GetOutputPort()); actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); actor->GetProperty()->SetColor(1, 1, 1); this->renderer->AddActor(actor); vtkInteractorStyleTrackballCamera::OnRightButtonDown(); } private: }; Luis Vieira, B.SC. Consultant, Software Engineer Vektore Exploration Consulting Corporation Av. Nove de Julho 1953 suite 1401, Sao Paulo CEP 01313001 - Brazil ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Fri Jun 10 12:52:01 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Fri, 10 Jun 2016 12:52:01 -0400 Subject: [vtk-developers] Rectification Rendering Image and Picking Points Message-ID: <192f501d1c338$693f0e20$3bbd2a60$@vektore.com> Hello Guys!! First of all, I have to say that I appreciate any help! I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). Following my code. Thank you very much!! Luis MainWindow.cpp void MainWindow::ProcessImage(QString _model, QString _image) { double bounds[6] = { +1, -1, +1, -1, +1, -1 }; qvtkWidget->setVisible(true); std::string iname = _model.toStdString();//model is a *.obj Cylinder of Solid rock with h1024xw1024"; std::string imagename = _image.toStdString() ;//is the texture *.bmp file that wraps up the cylinder"; vtkRenderer* renderer = vtkRenderer::New(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); renderWindow->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. qvtkWidget->SetUseTDx(true); qvtkWidget->SetRenderWindow(renderWindow); //renderWindow->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = qvtkWidget->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // Read the image which will be the texture QMenu* popup1 = new QMenu(qvtkWidget); popup1->addAction("Draw Line"); popup1->addAction("Draw Plane"); popup1->addAction("Draw Clip"); popup1->addAction("Background White"); popup1->addAction("Background Black"); popup1->addAction("Stereo Rendering"); connect(popup1, SIGNAL(triggered(QAction*)), this, SLOT(ProcessUserViewPortInteraction(QAction*))); std::cout << "Reading image " << imagename << "..." << std::endl; vtkBMPReader* bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(imagename.c_str()); bmpReader->Update(); std::cout << "Done" << std::endl; // Creating the texture std::cout << "Making a texture out of the image... " << std::endl; vtkTexture* texture = vtkTexture::New(); texture->SetInputConnection(bmpReader->GetOutputPort()); std::cout << "Done" << std::endl; // Import geometry from a VRML file vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(bmpReader->GetOutputPort()); //imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSize(600, 600); vtkDataSet *pDataset; // Import geometry from an OBJ file std::cout << "Reading OBJ file " << iname << "..." << std::endl; vtkOBJReader* reader = vtkOBJReader::New(); reader->SetFileName(iname.c_str()); reader->Update(); vtkPolyData *polyData2 = reader->GetOutput(); std::cout << "Obj reader = " << polyData2->GetNumberOfPoints() << std::endl; std::cout << "Obj point data = " << polyData2->GetPointData()->GetNumberOfArrays() << std::endl; std::cout << "Obj point data tuples = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfTuples() << std::endl; std::cout << "Obj point data compon = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfComponents() << std::endl; // //// Renderer vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputData(polyData2); vtkActor* texturedQuad = vtkActor::New(); texturedQuad->SetMapper(mapper); texturedQuad->SetTexture(texture); //texturedQuad->SetPosition(0, 0, 0); // Create Normal Vectors to enhance smoothness & illumination vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputData(polyData2); normals->SetFeatureAngle(60.0); // Mapper vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); SolidMapper->SetInputData(normals->GetOutput()); SolidMapper->ScalarVisibilityOff(); // Actor vtkActor *SolidActor = vtkActor::New(); SolidActor->SetMapper(SolidMapper); vtkImageData* image = imageViewer->GetInput(); int dim[3]; image->GetDimensions(dim); double spacing[3]; image->GetSpacing(spacing); double origin[3]; image->GetOrigin(origin); renderer->ComputeVisiblePropBounds(bounds); Renderer->AddActor(SolidActor); Renderer->AddActor(texturedQuad); float Cx = (dim[0] * spacing[0]) / 2. + origin[0]; float Cy = (dim[1] * spacing[1]) / 2. + origin[1]; vtkCamera* m_Camera = vtkCamera::New(); m_Camera->SetPosition(Cx, Cy, 1); m_Camera->SetFocalPoint(Cx, Cy, 0); m_Camera->SetViewUp(0, 1, 0); m_Camera->GetDirectionOfProjection(); m_Camera->ParallelProjectionOn(); Renderer->SetActiveCamera(m_Camera); Renderer->SetBackground(0, 0, 0); // Background color white Renderer->ResetCamera(); qvtkWidget->GetRenderWindow()->AddRenderer(Renderer); qvtkWidget->GetRenderWindow()->Render(); //renderer->ResetCamera(); vtkIPWCallback* myCallback = vtkIPWCallback::New(); myCallback->renderer = Renderer; myCallback->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); myCallback->readerClip = vtkOBJReader::New(); myCallback->readerClip = reader; this->styleCallback = myCallback; //renderer->ResetCamera(); this->stylePicker->normalsKore = vtkSmartPointer::New(); this->stylePicker->normalsKore = normals; this->stylePicker->renderer = vtkSmartPointer::New(); this->stylePicker->actor = vtkActor::New(); this->stylePicker->mapper = vtkPolyDataMapper::New(); this->stylePicker->points = vtkSmartPointer::New(); this->stylePicker->vertices = vtkSmartPointer::New(); this->stylePicker->renderer = Renderer; this->stylePicker->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); vtkSmartPointer pointPicker = vtkSmartPointer::New(); qvtkWidget->GetRenderWindow()->GetInteractor()->SetPicker(pointPicker); qvtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(this->sty lePicker); viewPortAxActor = vtkSmartPointer::New(); viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); viewPortOMWidget = vtkSmartPointer::New(); viewPortOMWidget->SetOrientationMarker(viewPortAxActor); viewPortOMWidget->SetViewport(0.0, 0.0, 0.25, 0.25); Connections = vtkEventQtSlotConnect::New(); Connections->Connect(qvtkWidget->GetRenderWindow()->GetInteractor(), vtkCommand::KeyPressEvent, this, SLOT(popup(vtkObject*, unsigned long, void*, void*, vtkCommand*)), popup1, 1.0); } MainWindow.h //Point PickFunction class MouseInteractorStyle2 : public vtkInteractorStyleTrackballCamera { public: std::vector pointList; std::vector pointListPlane; vtkSmartPointer matrix; vtkSmartPointer normalsKore = vtkSmartPointer::New(); vtkSmartPointer spherePickSource; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer vertices = vtkSmartPointer::New(); vtkSmartPointer polydata; vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkActor* actor; vtkPolyDataMapper* mapper; static MouseInteractorStyle2* New() { return new MouseInteractorStyle2; } //vtkTypeMacro(MouseInteractorStyle2, vtkInteractorStyleTrackballCamera); virtual void OnRightButtonDown() { //std::cout << "Picking pixel: " << this->Interactor->GetEventPosition()[0] << " " << this->Interactor->GetEventPosition()[1] << std::endl; //this->Interactor->GetPicker()->Pick(this->Interactor->GetEventPosition()[0 ], // this->Interactor->GetEventPosition()[1], // 0, // always zero. // this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()); //double picked[3]; //this->Interactor->GetPicker()->GetPickPosition(picked); //std::cout << "Picked value: " << picked[0] << " " << picked[1] << " " << picked[2] << std::endl; int* clickPos = this->renderWindowInteractor->GetEventPosition(); // Pick from this location. vtkPropPicker* picker = vtkPropPicker::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); //vtkSmartPointer picker = // vtkSmartPointer::New(); ////picker->SetTolerance(0.005); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); double* pos = picker->GetPickPosition(); std::cout << "Pick position (world coordinates) is: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; std::cout << "Picked actor: " << picker->GetActor() << std::endl; // Add label array. polydata = vtkSmartPointer::New(); spherePickSource = vtkSmartPointer::New(); spherePickSource->SetRadius(0.030); spherePickSource->SetCenter(pos[0], pos[1], pos[2]); if (pointList.size() < 2) { //pointList.clear(); pointList.push_back(pos); } if (pointListPlane.size() < 30) { pointListPlane.push_back(pos); } //Create a mapper and actor mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(spherePickSource->GetOutputPort()); actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); actor->GetProperty()->SetColor(1, 1, 1); this->renderer->AddActor(actor); vtkInteractorStyleTrackballCamera::OnRightButtonDown(); } private: }; Luis Vieira, B.SC. Consultant, Software Engineer Vektore Exploration Consulting Corporation Av. Nove de Julho 1953 suite 1401, Sao Paulo CEP 01313001 - Brazil ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Fri Jun 10 13:07:05 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Fri, 10 Jun 2016 13:07:05 -0400 Subject: [vtk-developers] vtkPointCloud remote module In-Reply-To: <1465576101699-5738628.post@n5.nabble.com> References: <1465576101699-5738628.post@n5.nabble.com> Message-ID: Hi chengguo1987, The vtk*Module.h files are generated by CMake when it configures the module. Look in the build tree in the same relative location as the source directory of that module. Since these are generated files, they do not live in the source tree and will not be on Gitlab. HTH, Shawn On Fri, Jun 10, 2016 at 12:28 PM, chengguo1987 wrote: > Will Schroeder-2 wrote > > > > *Surface extraction (in VTK/Remote/vtkPointCloud):* > > We've build a pipeline of objects that perform rudimentary surface > > extraction from a point cloud. There are three major parts: > > 1. Generating normals - currently use vtkPCANormalEstimation, including > > graph traversal to create consistently oriented normals. > > 2. Compute the TSDF using vtkSignedDistance. > > 3. Extract zero-crossing isocontour to generate surface > > (vtkExtractSurface). > > I have a problem when using the source files in the GitLab repo, could you > please > provide the source code of vtkPointCloudModule.h and > vktPointCloudModule.cxx? > > I went through the code and saw that the header file is required for > exporting macro. > But I could not find it in the GitLab repo. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkPointCloud-remote-module-tp5736213p5738628.html > Sent from the VTK - Dev 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 > > 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 dan.lipsa at kitware.com Fri Jun 10 15:54:17 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 10 Jun 2016 15:54:17 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: We tried the test program on two platforms: 1. OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 256 bits) OpenGL version string: 2.1 Mesa 11.0.7 Here the leak is about 70MB for 10000. Here our collaborator run the equivalent python program. He connected to a linux machine using TigerVNC. 2. OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: Quadro K2000/PCIe/SSE2 OpenGL core profile version string: 4.2.0 NVIDIA 304.131 OpenGL core profile shading language version string: 4.20 NVIDIA via Cg compiler Here the leak is about 20 MB for 10000 iterations. On Fri, Jun 10, 2016 at 9:40 AM, Dan Lipsa wrote: > Thanks Dave. This is a great idea. I will test this and report back. > > Beyond that, the debugging tools are failing us and I don't see many other >> options than to start cutting out bits of the code to locate the problem. >> See if the leak goes away when, e.g. vtkOpenGLRenderer::DeviceRender is >> bypassed and go from there. >> > > Indeed. Thanks for the pointer. > > Dan > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Mon Jun 13 04:38:20 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 13 Jun 2016 10:38:20 +0200 Subject: [vtk-developers] Midas doawload fail In-Reply-To: References: Message-ID: Hi This exact issue is still here ("Timeout was reached"), from a completelly different computer and cmake ( cmake 3.3.0 on osx ) This time compiling vtk, but on the same file (comp.out.10) which is 61.5Mb. Of course you need to activate the download of data and baselines to see it. Regards Mathieu Westphal On Wed, Mar 23, 2016 at 3:04 PM, Mathieu Westphal < mathieu.westphal at kitware.com> wrote: > midas fails with timeout today on the following item : > > [glow at snowman ~/work/kitware/VTK/vtkCea/vtk_build_dashlin]$ make > [ 0%] Generating > /home/glow/work/kitware/VTK/vtkCea/vtk_build_dashlin/ExternalData/Testing/Data/WindBladeReader/field/comp.out.10 > -- Fetching " > http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=e1bc2bf8f0e85161cfab9440d20c93b9&algorithm=MD5 > " > -- [download 100% complete] > -- [download 0% complete] > -- [download 1% complete] > -- [download 2% complete] > -- [download 3% complete] > -- [download 4% complete] > -- [download 5% complete] > -- [download 6% complete] > -- [download 7% complete] > -- [download 8% complete] > -- [download 9% complete] > -- [download 10% complete] > -- [download 11% complete] > -- [download 12% complete] > -- [download 13% complete] > -- [download 14% complete] > -- [download 15% complete] > -- [download 16% complete] > -- [download 17% complete] > -- [download 18% complete] > -- [download 19% complete] > -- [download 20% complete] > -- [download 21% complete] > -- [download 22% complete] > -- [download 23% complete] > -- [download 24% complete] > -- [download 25% complete] > -- [download 26% complete] > -- [download 27% complete] > -- [download 28% complete] > -- [download 29% complete] > -- [download 30% complete] > -- [download 31% complete] > -- [download 32% complete] > -- [download 33% complete] > -- [download 34% complete] > -- [download 35% complete] > -- [download 36% complete] > -- [download 37% complete] > -- [download 38% complete] > -- [download 39% complete] > -- [download 40% complete] > -- Fetching " > http://www.vtk.org/files/ExternalData/MD5/e1bc2bf8f0e85161cfab9440d20c93b9 > " > -- [download 0% complete] > -- [download 1% complete] > -- [download 2% complete] > -- [download 3% complete] > -- [download 4% complete] > -- [download 5% complete] > -- [download 6% complete] > -- [download 7% complete] > -- [download 8% complete] > -- [download 9% complete] > -- [download 10% complete] > -- [download 11% complete] > -- [download 12% complete] > -- [download 13% complete] > -- [download 14% complete] > -- [download 15% complete] > -- [download 16% complete] > -- [download 17% complete] > -- [download 18% complete] > -- [download 19% complete] > -- [download 20% complete] > -- [download 21% complete] > -- [download 22% complete] > -- [download 23% complete] > -- [download 24% complete] > -- [download 25% complete] > -- [download 26% complete] > -- [download 27% complete] > -- [download 28% complete] > -- [download 29% complete] > -- [download 30% complete] > -- [download 31% complete] > -- [download 32% complete] > -- [download 33% complete] > -- [download 34% complete] > -- [download 35% complete] > -- [download 36% complete] > -- [download 37% complete] > -- [download 38% complete] > -- [download 39% complete] > -- [download 40% complete] > -- [download 41% complete] > -- [download 42% complete] > -- [download 43% complete] > CMake Error at > /home/glow/work/kitware/VTK/vtkCea/vtk/CMake/ExternalData.cmake:1005 > (message): > Object MD5=e1bc2bf8f0e85161cfab9440d20c93b9 not found at: > > > http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=e1bc2bf8f0e85161cfab9440d20c93b9&algorithm=MD5 > ("Timeout was reached") > > http://www.vtk.org/files/ExternalData/MD5/e1bc2bf8f0e85161cfab9440d20c93b9 > ("Timeout was reached") > Call Stack (most recent call first): > /home/glow/work/kitware/VTK/vtkCea/vtk/CMake/ExternalData.cmake:1027 > (_ExternalData_download_object) > > > > > Mathieu Westphal > > On Wed, Feb 17, 2016 at 9:35 AM, Mathieu Westphal < > mathieu.westphal at kitware.com> wrote: > >> Hi >> >> he cmake i use is the one provided by the ArchLinux package : >> cmake 3.4.3-1, i do not know if it has built-in ssl support. >> >> I tried again this morning and it worked without any problem. >> >> Here is how to (sometimes) reproduce the issue : >> >> [glow at snowman ~/testMidas]$ git clone >> https://gitlab.kitware.com/paraview/paraview.git >> Cloning into 'paraview'... >> ... >> [glow at snowman ~/testMidas]$ cd paraview/ >> [glow at snowman ~/testMidas/paraview]$ git submodule update --init >> ... >> [glow at snowman ~/testMidas/paraview]$ cd .. >> [glow at snowman ~/testMidas/paraview]$ mkdir paraview_build >> [glow at snowman ~/testMidas/paraview]$ cd paraview_build >> [glow at snowman ~/testMidas/paraview]$ cmake ../paraview >> .... >> [glow at snowman ~/testMidas/paraview]$ make -j 7 >> >> >> Mathieu Westphal >> >> On Tue, Feb 16, 2016 at 6:59 PM, Jean-Christophe Fillion-Robin < >> jchris.fillionr at kitware.com> wrote: >> >>> + Where did you get your CMake binaries ? With or Without built-in SSL >>> support ? >>> >>> Hth >>> Jc >>> >>> On Tue, Feb 16, 2016 at 12:07 PM, Jake Stookey >> > wrote: >>> >>>> I compiled ParaView from the internal network and did not notice any >>>> problems. I used these instructions: >>>> http://www.paraview.org/Wiki/ParaView:Build_And_Install >>>> >>>> If you can provide additional details it might help: >>>> >>>> - What output do you see that shows what was attempted and the >>>> corresponding error message? >>>> - Were you on a Kitware internal network or external? >>>> - What was your ip address when the failure occurred? >>>> - Exactly what time did the failure occur? >>>> >>>> Jake >>>> >>>> On Tue, Feb 16, 2016 at 11:17 AM, Jake Stookey < >>>> jake.stookey at kitware.com> wrote: >>>> >>>>> (added a few members of the ParaView team to the cc list) >>>>> >>>>> Jake >>>>> >>>>> On Tue, Feb 16, 2016 at 10:55 AM, Mathieu Westphal < >>>>> mathieu.westphal at kitware.com> wrote: >>>>> >>>>>> Hello >>>>>> >>>>>> When i am trying to compile paraview the first time, there is a lot >>>>>> of image that can't be downloaded from midas for short amount of time. >>>>>> >>>>>> Only by retrying multiples times am i able to get all the images. >>>>>> >>>>>> Mathieu Westphal >>>>>> >>>>> >>>>> >>>> >>> >>> >>> -- >>> +1 919 869 8849 >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Jun 13 08:12:03 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 13 Jun 2016 08:12:03 -0400 Subject: [vtk-developers] Midas doawload fail In-Reply-To: References: Message-ID: <20160613121203.GC14295@megas.kitware.com> On Mon, Jun 13, 2016 at 10:38:20 +0200, Mathieu Westphal wrote: > This exact issue is still here ("Timeout was reached"), from a completelly > different computer and cmake ( cmake 3.3.0 on osx ) > This time compiling vtk, but on the same file (comp.out.10) which is 61.5Mb. > > Of course you need to activate the download of data and baselines to see it. The test(s) using this file should probably be guarded by VTK_USE_LARGE_DATA. --Ben From mathieu.westphal at kitware.com Mon Jun 13 08:59:08 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 13 Jun 2016 14:59:08 +0200 Subject: [vtk-developers] Midas doawload fail In-Reply-To: <20160613121203.GC14295@megas.kitware.com> References: <20160613121203.GC14295@megas.kitware.com> Message-ID: It is already the case comp.out.10 (62mb) is used by TestPWindBladeReader.cxx test.pop.nc (100mb) is used by TestNetCDFPOPReader.cxx and TestPNetCDFPOPReader.cxx Still not suposed to force users to manually download them and genarate manually a .md5-stamp to go with it. (which is what I am doing to compile). Mathieu Westphal On Mon, Jun 13, 2016 at 2:12 PM, Ben Boeckel wrote: > On Mon, Jun 13, 2016 at 10:38:20 +0200, Mathieu Westphal wrote: > > This exact issue is still here ("Timeout was reached"), from a > completelly > > different computer and cmake ( cmake 3.3.0 on osx ) > > This time compiling vtk, but on the same file (comp.out.10) which is > 61.5Mb. > > > > Of course you need to activate the download of data and baselines to see > it. > > The test(s) using this file should probably be guarded by > VTK_USE_LARGE_DATA. > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Jun 13 11:23:18 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 13 Jun 2016 11:23:18 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: I merged in a fix for this https://gitlab.kitware.com/vtk/vtk/merge_requests/1556 On Fri, Jun 10, 2016 at 3:54 PM, Dan Lipsa wrote: > We tried the test program on two platforms: > > 1. OpenGL vendor string: VMware, Inc. > OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 256 bits) > OpenGL version string: 2.1 Mesa 11.0.7 > > Here the leak is about 70MB for 10000. Here our collaborator run the > equivalent python program. > He connected to a linux machine using TigerVNC. > > 2. OpenGL vendor string: NVIDIA Corporation > OpenGL renderer string: Quadro K2000/PCIe/SSE2 > OpenGL core profile version string: 4.2.0 NVIDIA 304.131 > OpenGL core profile shading language version string: 4.20 NVIDIA via Cg > compiler > > Here the leak is about 20 MB for 10000 iterations. > > On Fri, Jun 10, 2016 at 9:40 AM, Dan Lipsa wrote: > >> Thanks Dave. This is a great idea. I will test this and report back. >> >> Beyond that, the debugging tools are failing us and I don't see many >>> other options than to start cutting out bits of the code to locate the >>> problem. See if the leak goes away when, e.g. >>> vtkOpenGLRenderer::DeviceRender is bypassed and go from there. >>> >> >> Indeed. Thanks for the pointer. >> >> Dan >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Mon Jun 13 12:32:20 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 13 Jun 2016 12:32:20 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: Awesome Dan. How did you end up debugging? ?Sankhesh On Mon, Jun 13, 2016 at 11:23 AM, Dan Lipsa wrote: > I merged in a fix for this > https://gitlab.kitware.com/vtk/vtk/merge_requests/1556 > > > On Fri, Jun 10, 2016 at 3:54 PM, Dan Lipsa wrote: > >> We tried the test program on two platforms: >> >> 1. OpenGL vendor string: VMware, Inc. >> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 256 bits) >> OpenGL version string: 2.1 Mesa 11.0.7 >> >> Here the leak is about 70MB for 10000. Here our collaborator run the >> equivalent python program. >> He connected to a linux machine using TigerVNC. >> >> 2. OpenGL vendor string: NVIDIA Corporation >> OpenGL renderer string: Quadro K2000/PCIe/SSE2 >> OpenGL core profile version string: 4.2.0 NVIDIA 304.131 >> OpenGL core profile shading language version string: 4.20 NVIDIA via Cg >> compiler >> >> Here the leak is about 20 MB for 10000 iterations. >> >> On Fri, Jun 10, 2016 at 9:40 AM, Dan Lipsa wrote: >> >>> Thanks Dave. This is a great idea. I will test this and report back. >>> >>> Beyond that, the debugging tools are failing us and I don't see many >>>> other options than to start cutting out bits of the code to locate the >>>> problem. See if the leak goes away when, e.g. >>>> vtkOpenGLRenderer::DeviceRender is bypassed and go from there. >>>> >>> >>> Indeed. Thanks for the pointer. >>> >>> Dan >>> >>> >> > > _______________________________________________ > 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 dan.lipsa at kitware.com Mon Jun 13 12:42:49 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 13 Jun 2016 12:42:49 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: As Dave suggested: comment bits out, rerun the test, repeat. The leak was caused by display lists not being freed when the renderer was removed from the render window. On Mon, Jun 13, 2016 at 12:32 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Awesome Dan. > > How did you end up debugging? > > ?Sankhesh > > > > On Mon, Jun 13, 2016 at 11:23 AM, Dan Lipsa wrote: > >> I merged in a fix for this >> https://gitlab.kitware.com/vtk/vtk/merge_requests/1556 >> >> >> On Fri, Jun 10, 2016 at 3:54 PM, Dan Lipsa wrote: >> >>> We tried the test program on two platforms: >>> >>> 1. OpenGL vendor string: VMware, Inc. >>> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 256 bits) >>> OpenGL version string: 2.1 Mesa 11.0.7 >>> >>> Here the leak is about 70MB for 10000. Here our collaborator run the >>> equivalent python program. >>> He connected to a linux machine using TigerVNC. >>> >>> 2. OpenGL vendor string: NVIDIA Corporation >>> OpenGL renderer string: Quadro K2000/PCIe/SSE2 >>> OpenGL core profile version string: 4.2.0 NVIDIA 304.131 >>> OpenGL core profile shading language version string: 4.20 NVIDIA via Cg >>> compiler >>> >>> Here the leak is about 20 MB for 10000 iterations. >>> >>> On Fri, Jun 10, 2016 at 9:40 AM, Dan Lipsa >>> wrote: >>> >>>> Thanks Dave. This is a great idea. I will test this and report back. >>>> >>>> Beyond that, the debugging tools are failing us and I don't see many >>>>> other options than to start cutting out bits of the code to locate the >>>>> problem. See if the leak goes away when, e.g. >>>>> vtkOpenGLRenderer::DeviceRender is bypassed and go from there. >>>>> >>>> >>>> Indeed. Thanks for the pointer. >>>> >>>> Dan >>>> >>>> >>> >> >> _______________________________________________ >> 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 david.lonie at kitware.com Mon Jun 13 13:50:32 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 13 Jun 2016 13:50:32 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: On Mon, Jun 13, 2016 at 12:42 PM, Dan Lipsa wrote: > As Dave suggested: comment bits out, rerun the test, repeat. > The leak was caused by display lists not being freed when the renderer was > removed from the render window. > Nice! Something still seems a little strange though. Was this code path not used for on-screen rendering? -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Jun 13 19:09:13 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 13 Jun 2016 19:09:13 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: I'll take a look. On Mon, Jun 13, 2016 at 1:50 PM, David Lonie wrote: > On Mon, Jun 13, 2016 at 12:42 PM, Dan Lipsa wrote: > >> As Dave suggested: comment bits out, rerun the test, repeat. >> The leak was caused by display lists not being freed when the renderer >> was removed from the render window. >> > > Nice! Something still seems a little strange though. Was this code path > not used for on-screen rendering? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Tue Jun 14 10:24:10 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 14 Jun 2016 10:24:10 -0400 Subject: [vtk-developers] Rendering Image and Picking Points Message-ID: <1d4e01d1c648$6b3a41a0$41aec4e0$@vektore.com> Hello Guys!! First of all, I have to say that I appreciate any help! I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). Following my code and attached picture. Thank you very much!! Luis MainWindow.cpp void MainWindow::ProcessImage(QString _model, QString _image) { double bounds[6] = { +1, -1, +1, -1, +1, -1 }; qvtkWidget->setVisible(true); std::string iname = _model.toStdString();//model is a *.obj Cylinder of Solid rock with h1024xw1024"; std::string imagename = _image.toStdString() ;//is the texture *.bmp file that wraps up the cylinder"; vtkRenderer* renderer = vtkRenderer::New(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); renderWindow->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. qvtkWidget->SetUseTDx(true); qvtkWidget->SetRenderWindow(renderWindow); //renderWindow->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = qvtkWidget->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // Read the image which will be the texture QMenu* popup1 = new QMenu(qvtkWidget); popup1->addAction("Draw Line"); popup1->addAction("Draw Plane"); popup1->addAction("Draw Clip"); popup1->addAction("Background White"); popup1->addAction("Background Black"); popup1->addAction("Stereo Rendering"); connect(popup1, SIGNAL(triggered(QAction*)), this, SLOT(ProcessUserViewPortInteraction(QAction*))); std::cout << "Reading image " << imagename << "..." << std::endl; vtkBMPReader* bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(imagename.c_str()); bmpReader->Update(); std::cout << "Done" << std::endl; // Creating the texture std::cout << "Making a texture out of the image... " << std::endl; vtkTexture* texture = vtkTexture::New(); texture->SetInputConnection(bmpReader->GetOutputPort()); std::cout << "Done" << std::endl; // Import geometry from a VRML file vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(bmpReader->GetOutputPort()); //imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSize(600, 600); vtkDataSet *pDataset; // Import geometry from an OBJ file std::cout << "Reading OBJ file " << iname << "..." << std::endl; vtkOBJReader* reader = vtkOBJReader::New(); reader->SetFileName(iname.c_str()); reader->Update(); vtkPolyData *polyData2 = reader->GetOutput(); std::cout << "Obj reader = " << polyData2->GetNumberOfPoints() << std::endl; std::cout << "Obj point data = " << polyData2->GetPointData()->GetNumberOfArrays() << std::endl; std::cout << "Obj point data tuples = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfTuples() << std::endl; std::cout << "Obj point data compon = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfComponents() << std::endl; // //// Renderer vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputData(polyData2); vtkActor* texturedQuad = vtkActor::New(); texturedQuad->SetMapper(mapper); texturedQuad->SetTexture(texture); //texturedQuad->SetPosition(0, 0, 0); // Create Normal Vectors to enhance smoothness & illumination vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputData(polyData2); normals->SetFeatureAngle(60.0); // Mapper vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); SolidMapper->SetInputData(normals->GetOutput()); SolidMapper->ScalarVisibilityOff(); // Actor vtkActor *SolidActor = vtkActor::New(); SolidActor->SetMapper(SolidMapper); vtkImageData* image = imageViewer->GetInput(); int dim[3]; image->GetDimensions(dim); double spacing[3]; image->GetSpacing(spacing); double origin[3]; image->GetOrigin(origin); renderer->ComputeVisiblePropBounds(bounds); Renderer->AddActor(SolidActor); Renderer->AddActor(texturedQuad); float Cx = (dim[0] * spacing[0]) / 2. + origin[0]; float Cy = (dim[1] * spacing[1]) / 2. + origin[1]; vtkCamera* m_Camera = vtkCamera::New(); m_Camera->SetPosition(Cx, Cy, 1); m_Camera->SetFocalPoint(Cx, Cy, 0); m_Camera->SetViewUp(0, 1, 0); m_Camera->GetDirectionOfProjection(); m_Camera->ParallelProjectionOn(); Renderer->SetActiveCamera(m_Camera); Renderer->SetBackground(0, 0, 0); // Background color white Renderer->ResetCamera(); qvtkWidget->GetRenderWindow()->AddRenderer(Renderer); qvtkWidget->GetRenderWindow()->Render(); //renderer->ResetCamera(); vtkIPWCallback* myCallback = vtkIPWCallback::New(); myCallback->renderer = Renderer; myCallback->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); myCallback->readerClip = vtkOBJReader::New(); myCallback->readerClip = reader; this->styleCallback = myCallback; //renderer->ResetCamera(); this->stylePicker->normalsKore = vtkSmartPointer::New(); this->stylePicker->normalsKore = normals; this->stylePicker->renderer = vtkSmartPointer::New(); this->stylePicker->actor = vtkActor::New(); this->stylePicker->mapper = vtkPolyDataMapper::New(); this->stylePicker->points = vtkSmartPointer::New(); this->stylePicker->vertices = vtkSmartPointer::New(); this->stylePicker->renderer = Renderer; this->stylePicker->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); vtkSmartPointer pointPicker = vtkSmartPointer::New(); qvtkWidget->GetRenderWindow()->GetInteractor()->SetPicker(pointPicker); qvtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(this->sty lePicker); Connections = vtkEventQtSlotConnect::New(); Connections->Connect(qvtkWidget->GetRenderWindow()->GetInteractor(), vtkCommand::KeyPressEvent, this, SLOT(popup(vtkObject*, unsigned long, void*, void*, vtkCommand*)), popup1, 1.0); } MainWindow.h //Point PickFunction class MouseInteractorStyle2 : public vtkInteractorStyleTrackballCamera { public: std::vector pointList; std::vector pointListPlane; vtkSmartPointer matrix; vtkSmartPointer normalsKore = vtkSmartPointer::New(); vtkSmartPointer spherePickSource; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer vertices = vtkSmartPointer::New(); vtkSmartPointer polydata; vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkActor* actor; vtkPolyDataMapper* mapper; static MouseInteractorStyle2* New() { return new MouseInteractorStyle2; } //vtkTypeMacro(MouseInteractorStyle2, vtkInteractorStyleTrackballCamera); virtual void OnRightButtonDown() { int* clickPos = this->renderWindowInteractor->GetEventPosition(); // Pick from this location. vtkPropPicker* picker = vtkPropPicker::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); double* pos = picker->GetPickPosition(); std::cout << "Pick position (world coordinates) is: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; std::cout << "Picked actor: " << picker->GetActor() << std::endl; // Add label array. polydata = vtkSmartPointer::New(); spherePickSource = vtkSmartPointer::New(); spherePickSource->SetRadius(0.030); spherePickSource->SetCenter(pos[0], pos[1], pos[2]); if (pointList.size() < 2) { //pointList.clear(); pointList.push_back(pos); } if (pointListPlane.size() < 30) { pointListPlane.push_back(pos); } //Create a mapper and actor mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(spherePickSource->GetOutputPort()); actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); actor->GetProperty()->SetColor(1, 1, 1); this->renderer->AddActor(actor); vtkInteractorStyleTrackballCamera::OnRightButtonDown(); } private: }; Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Cylinder.png Type: image/png Size: 46028 bytes Desc: not available URL: From david.thompson at kitware.com Tue Jun 14 10:36:35 2016 From: david.thompson at kitware.com (David Thompson) Date: Tue, 14 Jun 2016 10:36:35 -0400 Subject: [vtk-developers] Rendering Image and Picking Points In-Reply-To: <1d4e01d1c648$6b3a41a0$41aec4e0$@vektore.com> References: <1d4e01d1c648$6b3a41a0$41aec4e0$@vektore.com> Message-ID: Hi Luis, > ...I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. > > 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; > > 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). ... It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. The pick coordinates will be points on the VRML geometry, not image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. David From luis.vieira at vektore.com Tue Jun 14 11:16:52 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 14 Jun 2016 11:16:52 -0400 Subject: [vtk-developers] Contents of vtk-developers Digest, Vol 146, Issue 15 Message-ID: <2e1e01d1c64f$c84360f0$58ca22d0$@vektore.com> Hi David, Also, I have tried, unsuccessfully, as well as following: renderer->ComputeVisiblePropBounds(bounds); vtkCamera* cam = renderer->GetActiveCamera(); cam->SetFocalPoint((bounds[0] + bounds[1]) / 2.0, (bounds[2] + bounds[3]) / 2.0, (bounds[4] + bounds[5]) / 2.0); cam->SetPosition((bounds[0] + bounds[1]) / 2.0, (bounds[2] + bounds[3]) / 2.0, bounds[4] + bounds[5]); cam->SetViewUp(0, 1, 0); Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -----Original Message----- From: David Thompson [mailto:david.thompson at kitware.com] Sent: June 14, 2016 10:37 AM To: Luis Vieira Cc: vtk-developers at vtk.org Subject: Re: [vtk-developers] Rendering Image and Picking Points Hi Luis, > ...I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. > > 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; > > 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). ... It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. The pick coordinates will be points on the VRML geometry, not image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. David From luis.vieira at vektore.com Tue Jun 14 11:37:45 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 14 Jun 2016 11:37:45 -0400 Subject: [vtk-developers] Contents of vtk-developers Digest, Vol 146, Issue 15 Message-ID: <423b01d1c652$b33f19d0$19bd4d70$@vektore.com> Hi David, Also, I have tried, unsuccessfully, as well as following: >> It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. >> renderer->ComputeVisiblePropBounds(bounds); vtkCamera* cam = renderer->GetActiveCamera(); cam->SetFocalPoint((bounds[0] + bounds[1]) / 2.0, (bounds[2] + cam->bounds[3]) / 2.0, (bounds[4] + bounds[5]) / 2.0); cam->SetPosition((bounds[0] + bounds[1]) / 2.0, (bounds[2] + bounds[3]) cam->/ 2.0, bounds[4] + bounds[5]); SetViewUp(0, 1, 0); Please, could you be more clear about this? >> The pick coordinates will be points on the VRML geometry, not image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. >>> Tks, Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -----Original Message----- From: David Thompson [mailto:david.thompson at kitware.com] Sent: June 14, 2016 10:37 AM To: Luis Vieira Cc: vtk-developers at vtk.org Subject: Re: [vtk-developers] Rendering Image and Picking Points Hi Luis, > ...I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. > > 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; > > 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). ... It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. The pick coordinates will be points on the VRML geometry, not image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. David Hello Guys!! First of all, I have to say that I appreciate any help! I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). Following my code and attached picture. Thank you very much!! Luis MainWindow.cpp void MainWindow::ProcessImage(QString _model, QString _image) { double bounds[6] = { +1, -1, +1, -1, +1, -1 }; qvtkWidget->setVisible(true); std::string iname = _model.toStdString();//model is a *.obj Cylinder of Solid rock with h1024xw1024"; std::string imagename = _image.toStdString() ;//is the texture *.bmp file that wraps up the cylinder"; vtkRenderer* renderer = vtkRenderer::New(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); renderWindow->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. qvtkWidget->SetUseTDx(true); qvtkWidget->SetRenderWindow(renderWindow); //renderWindow->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = qvtkWidget->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // Read the image which will be the texture QMenu* popup1 = new QMenu(qvtkWidget); popup1->addAction("Draw Line"); popup1->addAction("Draw Plane"); popup1->addAction("Draw Clip"); popup1->addAction("Background White"); popup1->addAction("Background Black"); popup1->addAction("Stereo Rendering"); connect(popup1, SIGNAL(triggered(QAction*)), this, SLOT(ProcessUserViewPortInteraction(QAction*))); std::cout << "Reading image " << imagename << "..." << std::endl; vtkBMPReader* bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(imagename.c_str()); bmpReader->Update(); std::cout << "Done" << std::endl; // Creating the texture std::cout << "Making a texture out of the image... " << std::endl; vtkTexture* texture = vtkTexture::New(); texture->SetInputConnection(bmpReader->GetOutputPort()); std::cout << "Done" << std::endl; // Import geometry from a VRML file vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(bmpReader->GetOutputPort()); //imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSize(600, 600); vtkDataSet *pDataset; // Import geometry from an OBJ file std::cout << "Reading OBJ file " << iname << "..." << std::endl; vtkOBJReader* reader = vtkOBJReader::New(); reader->SetFileName(iname.c_str()); reader->Update(); vtkPolyData *polyData2 = reader->GetOutput(); std::cout << "Obj reader = " << polyData2->GetNumberOfPoints() << std::endl; std::cout << "Obj point data = " << polyData2->GetPointData()->GetNumberOfArrays() << std::endl; std::cout << "Obj point data tuples = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfTuples() << std::endl; std::cout << "Obj point data compon = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfComponents() << std::endl; // //// Renderer vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputData(polyData2); vtkActor* texturedQuad = vtkActor::New(); texturedQuad->SetMapper(mapper); texturedQuad->SetTexture(texture); //texturedQuad->SetPosition(0, 0, 0); // Create Normal Vectors to enhance smoothness & illumination vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputData(polyData2); normals->SetFeatureAngle(60.0); // Mapper vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); SolidMapper->SetInputData(normals->GetOutput()); SolidMapper->ScalarVisibilityOff(); // Actor vtkActor *SolidActor = vtkActor::New(); SolidActor->SetMapper(SolidMapper); vtkImageData* image = imageViewer->GetInput(); int dim[3]; image->GetDimensions(dim); double spacing[3]; image->GetSpacing(spacing); double origin[3]; image->GetOrigin(origin); renderer->ComputeVisiblePropBounds(bounds); Renderer->AddActor(SolidActor); Renderer->AddActor(texturedQuad); float Cx = (dim[0] * spacing[0]) / 2. + origin[0]; float Cy = (dim[1] * spacing[1]) / 2. + origin[1]; vtkCamera* m_Camera = vtkCamera::New(); m_Camera->SetPosition(Cx, Cy, 1); m_Camera->SetFocalPoint(Cx, Cy, 0); m_Camera->SetViewUp(0, 1, 0); m_Camera->GetDirectionOfProjection(); m_Camera->ParallelProjectionOn(); Renderer->SetActiveCamera(m_Camera); Renderer->SetBackground(0, 0, 0); // Background color white Renderer->ResetCamera(); qvtkWidget->GetRenderWindow()->AddRenderer(Renderer); qvtkWidget->GetRenderWindow()->Render(); //renderer->ResetCamera(); vtkIPWCallback* myCallback = vtkIPWCallback::New(); myCallback->renderer = Renderer; myCallback->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); myCallback->readerClip = vtkOBJReader::New(); myCallback->readerClip = reader; this->styleCallback = myCallback; //renderer->ResetCamera(); this->stylePicker->normalsKore = vtkSmartPointer::New(); this->stylePicker->normalsKore = normals; this->stylePicker->renderer = vtkSmartPointer::New(); this->stylePicker->actor = vtkActor::New(); this->stylePicker->mapper = vtkPolyDataMapper::New(); this->stylePicker->points = vtkSmartPointer::New(); this->stylePicker->vertices = vtkSmartPointer::New(); this->stylePicker->renderer = Renderer; this->stylePicker->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); vtkSmartPointer pointPicker = vtkSmartPointer::New(); qvtkWidget->GetRenderWindow()->GetInteractor()->SetPicker(pointPicker); qvtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(this->sty lePicker); Connections = vtkEventQtSlotConnect::New(); Connections->Connect(qvtkWidget->GetRenderWindow()->GetInteractor(), vtkCommand::KeyPressEvent, this, SLOT(popup(vtkObject*, unsigned long, void*, void*, vtkCommand*)), popup1, 1.0); } MainWindow.h //Point PickFunction class MouseInteractorStyle2 : public vtkInteractorStyleTrackballCamera { public: std::vector pointList; std::vector pointListPlane; vtkSmartPointer matrix; vtkSmartPointer normalsKore = vtkSmartPointer::New(); vtkSmartPointer spherePickSource; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer vertices = vtkSmartPointer::New(); vtkSmartPointer polydata; vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkActor* actor; vtkPolyDataMapper* mapper; static MouseInteractorStyle2* New() { return new MouseInteractorStyle2; } //vtkTypeMacro(MouseInteractorStyle2, vtkInteractorStyleTrackballCamera); virtual void OnRightButtonDown() { int* clickPos = this->renderWindowInteractor->GetEventPosition(); // Pick from this location. vtkPropPicker* picker = vtkPropPicker::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); double* pos = picker->GetPickPosition(); std::cout << "Pick position (world coordinates) is: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; std::cout << "Picked actor: " << picker->GetActor() << std::endl; // Add label array. polydata = vtkSmartPointer::New(); spherePickSource = vtkSmartPointer::New(); spherePickSource->SetRadius(0.030); spherePickSource->SetCenter(pos[0], pos[1], pos[2]); if (pointList.size() < 2) { //pointList.clear(); pointList.push_back(pos); } if (pointListPlane.size() < 30) { pointListPlane.push_back(pos); } //Create a mapper and actor mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(spherePickSource->GetOutputPort()); actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); actor->GetProperty()->SetColor(1, 1, 1); this->renderer->AddActor(actor); vtkInteractorStyleTrackballCamera::OnRightButtonDown(); } private: }; Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com From luis.vieira at vektore.com Tue Jun 14 15:20:18 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 14 Jun 2016 15:20:18 -0400 Subject: [vtk-developers] vtkAxesActor within VTK 7.0 and QVTKWidget Message-ID: <5d4a01d1c671$ca203ed0$5e60bc70$@vektore.com> Hello everyone, I had migrated my VTK platform from 6.1 to 7.0. I had noticed some changes, and one of those is giving me a hard work to do that is to render vtkSmartPointer::New() within QVTWidget. Previously, was easily, with VTK 6.1. Now, I am trying that and I got the Cone working/rendering well and its interactions. However, I haven't gotten absolutely nothing on my viewport from my vtkAxesActor even been shown . Following my code (C++), regarding that this works outside QVTWidget viewport. I appreciate any ideas and help. ........ #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" #include "vtkEventQtSlotConnect.h" #include "vtkCommand.h" #include "vtkConeSource.h" #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkActorCollection.h" #include "vtkCaptionActor2D.h" #include "vtkTextActor.h" #include "vtkTextProperty.h" #include "vtkActor2D.h" #include "vtkAxesActor.h" #include "vtkOrientationMarkerWidget.h" #include "vtkInteractorStyle.h" #include "vtkTDxInteractorStyleCamera.h" #include "vtkTDxInteractorStyleSettings.h" #include "vtkInteractorStyleRubberBandPick.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkInteractorStyleTrackball.h" #include "QVTKInteractorAdapter.h" #include "QVTKInteractor.h" #include "QVTKApplication.h" ... . . . #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); . . . Mainwindow.cpp Void procedure() { vtkRenderWindow* renwin = vtkRenderWindow::New(); renwin->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. // QVTKWidget mainViewPort->SetUseTDx(true); // QVTKWidget = mainViewPort. mainViewPort->SetRenderWindow(renwin); renwin->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = mainViewPort->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // add a renderer Ren1 = vtkRenderer::New(); mainViewPort->GetRenderWindow()->AddRenderer(Ren1); vtkConeSource* cone = vtkConeSource::New(); vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(cone->GetOutputPort()); vtkActor* actor = vtkActor::New(); actor->SetMapper(mapper); Ren1->AddViewProp(actor); actor->Delete(); mapper->Delete(); cone->Delete(); mainViewPort->GetRenderWindow()->Render(); viewPortAxActor = vtkSmartPointer::New(); viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()->SetColo r(0, 0, 0); viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); viewPortOMWidget = vtkSmartPointer::New(); viewPortOMWidget->SetOrientationMarker(viewPortAxActor); viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); . . . ..... } Any ideas? Thank you very much. Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jun 16 09:15:03 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 16 Jun 2016 09:15:03 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: fixed karego-at's coverage submission is now does doxygen too Thanks for letting me know it was broken and sorry for the delay in fixing it. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Mar 17, 2016 at 10:49 AM, Marcus D. Hanwell < marcus.hanwell at kitware.com> wrote: > On Thu, Mar 17, 2016 at 9:01 AM, David E DeMarle > wrote: > > I'll hunt down the responsible parties to make it submit again. > > > > In the near term though we will move the responsibility to a buildbot > > machine for greater visibility and reliability. > > > Yeah, that is my machine, I needed to upgrade system libraries, but > don't have the time I used to for dashboard maintenance. It may be > time to retire that machine from service anyway... > > Marcus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jun 16 09:29:18 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 16 Jun 2016 07:29:18 -0600 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: Awesome. Though I notice that the new array classes have somehow managed to mess up the class index: http://www.vtk.org/doc/nightly/html/classes.html On Thu, Jun 16, 2016 at 7:15 AM, David E DeMarle wrote: > fixed > > karego-at's coverage submission is now does doxygen too > > Thanks for letting me know it was broken and sorry for the delay in fixing > it. > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Mar 17, 2016 at 10:49 AM, Marcus D. Hanwell < > marcus.hanwell at kitware.com> wrote: > >> On Thu, Mar 17, 2016 at 9:01 AM, David E DeMarle >> wrote: >> > I'll hunt down the responsible parties to make it submit again. >> > >> > In the near term though we will move the responsibility to a buildbot >> > machine for greater visibility and reliability. >> > >> Yeah, that is my machine, I needed to upgrade system libraries, but >> don't have the time I used to for dashboard maintenance. It may be >> time to retire that machine from service anyway... >> >> Marcus >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jun 16 09:36:15 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 16 Jun 2016 09:36:15 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: Will fix. thanks David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jun 16, 2016 at 9:29 AM, David Gobbi wrote: > Awesome. Though I notice that the new array classes have somehow managed > to mess up the class index: > http://www.vtk.org/doc/nightly/html/classes.html > > On Thu, Jun 16, 2016 at 7:15 AM, David E DeMarle > wrote: > >> fixed >> >> karego-at's coverage submission is now does doxygen too >> >> Thanks for letting me know it was broken and sorry for the delay in >> fixing it. >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Thu, Mar 17, 2016 at 10:49 AM, Marcus D. Hanwell < >> marcus.hanwell at kitware.com> wrote: >> >>> On Thu, Mar 17, 2016 at 9:01 AM, David E DeMarle >>> wrote: >>> > I'll hunt down the responsible parties to make it submit again. >>> > >>> > In the near term though we will move the responsibility to a buildbot >>> > machine for greater visibility and reliability. >>> > >>> Yeah, that is my machine, I needed to upgrade system libraries, but >>> don't have the time I used to for dashboard maintenance. It may be >>> time to retire that machine from service anyway... >>> >>> Marcus >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Thu Jun 16 09:54:17 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 16 Jun 2016 09:54:17 -0400 Subject: [vtk-developers] vtkAxesActor within VTK 7.0 and QVTKWidget In-Reply-To: <5d4a01d1c671$ca203ed0$5e60bc70$@vektore.com> References: <5d4a01d1c671$ca203ed0$5e60bc70$@vektore.com> Message-ID: Hi Luis, I don't see anything obvious but I noticed that you are initializing vtkRenderingOpenGL i.e. using the OpenGL backend. Mind trying the OpenGL2 backend to find out whether the issue is specific to the old backend. Sankhesh On Tue, Jun 14, 2016 at 3:20 PM, Luis Vieira wrote: > Hello everyone, > > > > I had migrated my VTK platform from 6.1 to 7.0. I had noticed some > changes, and one of those is giving me a hard work to do that is to render > vtkSmartPointer::New() within QVTWidget. Previously, was > easily, with VTK 6.1. Now, I am trying that and I got the Cone > working/rendering well and its interactions. However, I haven't gotten > absolutely nothing on my viewport from my vtkAxesActor even been shown . > Following my code (C++), regarding that this works outside QVTWidget > viewport. > > > > I appreciate any ideas and help. > > ???????? > > #include "vtkRenderWindow.h" > > #include "vtkRenderer.h" > > #include "vtkRenderWindowInteractor.h" > > #include "vtkEventQtSlotConnect.h" > > #include "vtkCommand.h" > > #include "vtkConeSource.h" > > #include "vtkSphereSource.h" > > #include "vtkPolyDataMapper.h" > > #include "vtkActor.h" > > #include "vtkActorCollection.h" > > #include "vtkCaptionActor2D.h" > > #include "vtkTextActor.h" > > #include "vtkTextProperty.h" > > #include "vtkActor2D.h" > > #include "vtkAxesActor.h" > > #include "vtkOrientationMarkerWidget.h" > > #include "vtkInteractorStyle.h" > > #include "vtkTDxInteractorStyleCamera.h" > > #include "vtkTDxInteractorStyleSettings.h" > > #include "vtkInteractorStyleRubberBandPick.h" > > #include "vtkInteractorStyleTrackballCamera.h" > > #include "vtkInteractorStyleTrackball.h" > > #include "QVTKInteractorAdapter.h" > > #include "QVTKInteractor.h" > > #include "QVTKApplication.h" > > ??. > > . > > . > > . > > #include > > VTK_MODULE_INIT(vtkRenderingOpenGL); > > VTK_MODULE_INIT(vtkInteractionStyle); > > . > > . > > . > > > > Mainwindow.cpp > > > > Void procedure() > > { > > vtkRenderWindow* renwin = vtkRenderWindow::New(); > > renwin->StereoCapableWindowOn(); > > > > // Activate 3DConnexion device only on the left render > window. > > // QVTKWidget > > mainViewPort->SetUseTDx(true); // QVTKWidget = mainViewPort. > > > > mainViewPort->SetRenderWindow(renwin); > > renwin->Delete(); > > > > const double angleSensitivity = 0.02; > > const double translationSensitivity = 0.001; > > > > QVTKInteractor *iren = mainViewPort->GetInteractor(); > > vtkInteractorStyle *s = > > static_cast(iren-> > GetInteractorStyle()); > > vtkTDxInteractorStyleCamera *t = > > static_cast(s-> > GetTDxStyle()); > > > > t->GetSettings()->SetAngleSensitivity(angleSensitivity); > > t->GetSettings()->SetTranslationXSensitivity( > translationSensitivity); > > t->GetSettings()->SetTranslationYSensitivity( > translationSensitivity); > > t->GetSettings()->SetTranslationZSensitivity( > translationSensitivity); > > > > > > > > // add a renderer > > Ren1 = vtkRenderer::New(); > > mainViewPort->GetRenderWindow()->AddRenderer(Ren1); > > > > vtkConeSource* cone = vtkConeSource::New(); > > vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); > > mapper->SetInputConnection(cone->GetOutputPort()); > > vtkActor* actor = vtkActor::New(); > > actor->SetMapper(mapper); > > Ren1->AddViewProp(actor); > > actor->Delete(); > > mapper->Delete(); > > cone->Delete(); > > > > > > > > mainViewPort->GetRenderWindow()->Render(); > > > > viewPortAxActor = vtkSmartPointer::New(); > > viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); > > viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); > > viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); > > > > viewPortOMWidget = vtkSmartPointer::New(); > > viewPortOMWidget->SetOrientationMarker(viewPortAxActor); > > viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); > > viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); > > > > . > > . > > . > > ..... > > } > > > > Any ideas? > > > > Thank you very much. > > > > *Luis Vieira*, Toronto > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > luis.vieira at vektore.com > > www.vektore.com > > > > _______________________________________________ > 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 mathieu.westphal at kitware.com Thu Jun 16 09:55:47 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Thu, 16 Jun 2016 15:55:47 +0200 Subject: [vtk-developers] "List of all members" in vtk online doc Message-ID: Hi Looks like the "List of all members" link disapeared overnight. Can still be accessed via "-members" at the end of the url, but still that was an appreciated feature :). Anyone knows why it is gone ? Mathieu Westphal -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jun 16 09:59:44 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 16 Jun 2016 09:59:44 -0400 Subject: [vtk-developers] "List of all members" in vtk online doc In-Reply-To: References: Message-ID: vtk nightly dox updated last night for the first time in months after I moved it to a different dashboard machine. That would be how but I don't know why. Try running "make DoxygenDoc" on a local build (you will need doxygen and graphviz/dot on the machine and to turn on BUILD_DOCUMENTATION in cmake) to debug and figure out why. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jun 16, 2016 at 9:55 AM, Mathieu Westphal < mathieu.westphal at kitware.com> wrote: > Hi > > Looks like the "List of all members" link disapeared overnight. > Can still be accessed via "-members" at the end of the url, > but still that was an appreciated feature :). > > Anyone knows why it is gone ? > > Mathieu Westphal > > _______________________________________________ > 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 david.gobbi at gmail.com Thu Jun 16 10:39:30 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 16 Jun 2016 08:39:30 -0600 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: On Thu, Jun 16, 2016 at 7:36 AM, David E DeMarle wrote: > Will fix. > thanks > Eventually VTK's headers will have to switch to doxygen comments. That could be the final task for Sebastien's perl scripts before we send them to a well-deserved retirement. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jun 16 10:59:34 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 16 Jun 2016 10:59:34 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: Amen. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jun 16, 2016 at 10:39 AM, David Gobbi wrote: > On Thu, Jun 16, 2016 at 7:36 AM, David E DeMarle > wrote: > >> Will fix. >> thanks >> > > Eventually VTK's headers will have to switch to doxygen comments. That > could be the final task for Sebastien's perl scripts before we send them to > a well-deserved retirement. > > - David > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Thu Jun 16 11:19:00 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Thu, 16 Jun 2016 11:19:00 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: > Eventually VTK's headers will have to switch to doxygen comments. That > could be the final task for Sebastien's perl scripts before we send them to > a well-deserved retirement. I couldn't agree more! From luis.vieira at vektore.com Thu Jun 16 11:28:37 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Thu, 16 Jun 2016 11:28:37 -0400 Subject: [vtk-developers] Contents of vtk-developers Digest, Vol 146, Issue 17 - RE: vtkAxesActor within VTK 7.0 and QVTKWidget Message-ID: <5a2c01d1c7e3$c183d0c0$448b7240$@vektore.com> Hello Sankhesh, That?s the point was working within the old backend. Unfortunately, I CMake doesn?t build automatic TDX(3D Mouse device I have) with OpenGL2 within VTK7.0 and VTK6.1 does. So I had to change to Rendering Backend OpenGL instead of OpenGl2. But is still not justifying why run out of QVTKWidget control. So, once I had built with OpenGL I will try just change the slot VTK_RENDERING_BACKEND to OpenGL2 to compile to found out and let you know. Thank you. Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com From: Sankhesh Jhaveri [mailto:sankhesh.jhaveri at kitware.com] Sent: June 16, 2016 9:54 AM To: Luis Vieira Cc: vtk-developers ; vtkusers at vtk.org Subject: Re: [vtk-developers] vtkAxesActor within VTK 7.0 and QVTKWidget Hi Luis, I don't see anything obvious but I noticed that you are initializing vtkRenderingOpenGL i.e. using the OpenGL backend. Mind trying the OpenGL2 backend to find out whether the issue is specific to the old backend. Sankhesh On Tue, Jun 14, 2016 at 3:20 PM, Luis Vieira > wrote: Hello everyone, I had migrated my VTK platform from 6.1 to 7.0. I had noticed some changes, and one of those is giving me a hard work to do that is to render vtkSmartPointer::New() within QVTWidget. Previously, was easily, with VTK 6.1. Now, I am trying that and I got the Cone working/rendering well and its interactions. However, I haven't gotten absolutely nothing on my viewport from my vtkAxesActor even been shown . Following my code (C++), regarding that this works outside QVTWidget viewport. I appreciate any ideas and help. ???????? #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" #include "vtkEventQtSlotConnect.h" #include "vtkCommand.h" #include "vtkConeSource.h" #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkActorCollection.h" #include "vtkCaptionActor2D.h" #include "vtkTextActor.h" #include "vtkTextProperty.h" #include "vtkActor2D.h" #include "vtkAxesActor.h" #include "vtkOrientationMarkerWidget.h" #include "vtkInteractorStyle.h" #include "vtkTDxInteractorStyleCamera.h" #include "vtkTDxInteractorStyleSettings.h" #include "vtkInteractorStyleRubberBandPick.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkInteractorStyleTrackball.h" #include "QVTKInteractorAdapter.h" #include "QVTKInteractor.h" #include "QVTKApplication.h" ??. . . . #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); . . . Mainwindow.cpp Void procedure() { vtkRenderWindow* renwin = vtkRenderWindow::New(); renwin->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. // QVTKWidget mainViewPort->SetUseTDx(true); // QVTKWidget = mainViewPort. mainViewPort->SetRenderWindow(renwin); renwin->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = mainViewPort->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // add a renderer Ren1 = vtkRenderer::New(); mainViewPort->GetRenderWindow()->AddRenderer(Ren1); vtkConeSource* cone = vtkConeSource::New(); vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(cone->GetOutputPort()); vtkActor* actor = vtkActor::New(); actor->SetMapper(mapper); Ren1->AddViewProp(actor); actor->Delete(); mapper->Delete(); cone->Delete(); mainViewPort->GetRenderWindow()->Render(); viewPortAxActor = vtkSmartPointer::New(); viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()->SetColor(0, 0, 0); viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()->SetColor(0, 0, 0); viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()->SetColor(0, 0, 0); viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); viewPortOMWidget = vtkSmartPointer::New(); viewPortOMWidget->SetOrientationMarker(viewPortAxActor); viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); . . . ..... } Any ideas? Thank you very much. Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com _______________________________________________ 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 david.lonie at kitware.com Thu Jun 16 11:32:55 2016 From: david.lonie at kitware.com (David Lonie) Date: Thu, 16 Jun 2016 11:32:55 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: On Thu, Jun 16, 2016 at 9:29 AM, David Gobbi wrote: > Awesome. Though I notice that the new array classes have somehow managed > to mess up the class index: > http://www.vtk.org/doc/nightly/html/classes.html > I just looked into this, and the spurious classes are coming from blobs in Documentation/Doxygen/ArrayDispatch-VTK-7-1.md. This file is meant to appear as supplemental information under the "Related Pages" tab, and not be interpreted as class documentation. On my local machine (running Doxygen 1.8.11), it all works as expected. The live version online (running Doxygen 1.7.6.1) is mistaking these for class documentation. If someone could update doxygen on the machine generating these, I suspect the problem will go away. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jun 16 11:47:02 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 16 Jun 2016 11:47:02 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: Likely story. We shall see tonight when the dashboards runs again with doxygen 1.8.11. :) David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jun 16, 2016 at 11:32 AM, David Lonie wrote: > On Thu, Jun 16, 2016 at 9:29 AM, David Gobbi > wrote: > >> Awesome. Though I notice that the new array classes have somehow managed >> to mess up the class index: >> http://www.vtk.org/doc/nightly/html/classes.html >> > > I just looked into this, and the spurious classes are coming from blobs in > Documentation/Doxygen/ArrayDispatch-VTK-7-1.md. This file is meant to > appear as supplemental information under the "Related Pages" tab, and not > be interpreted as class documentation. > > On my local machine (running Doxygen 1.8.11), it all works as expected. > The live version online (running Doxygen 1.7.6.1) is mistaking these for > class documentation. > > If someone could update doxygen on the machine generating these, I suspect > the problem will go away. > > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Thu Jun 16 12:56:14 2016 From: sean at rogue-research.com (Sean McBride) Date: Thu, 16 Jun 2016 12:56:14 -0400 Subject: [vtk-developers] VTK Coding Standards, C++11 override and =delete In-Reply-To: References: <20160505181917.1012065447@mail.rogue-research.com> Message-ID: <20160616165614.440309725@mail.rogue-research.com> On Thu, 5 May 2016 15:55:22 -0400, Marcus D. Hanwell said: >> Relatedly, I've added a VTK_DELETE_FUNCTION here: >> >> >> and that implies changing Item 14, which currently reads: "Classes >that derive from vtkObject should have protected constructors and >destructors, and privately declared but unimplemented copy constructor >and assignment operator." We should now say that VTK_DELETE_FUNCTION >should be used. >> >Seems reasonable to me. Both require a large number of changes I just realized that we discussed & agreed about 'override', but '=delete' fell by the wayside. What do we all think about: 1) changing coding standards item 14: 2) adding a VTK_DELETE_FUNCTION, see: 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 robert.maynard at kitware.com Thu Jun 16 13:29:34 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Thu, 16 Jun 2016 13:29:34 -0400 Subject: [vtk-developers] VTK Coding Standards, C++11 override and =delete In-Reply-To: <20160616165614.440309725@mail.rogue-research.com> References: <20160505181917.1012065447@mail.rogue-research.com> <20160616165614.440309725@mail.rogue-research.com> Message-ID: I like the introduction of a delete function. +1 On Thu, Jun 16, 2016 at 12:56 PM, Sean McBride wrote: > On Thu, 5 May 2016 15:55:22 -0400, Marcus D. Hanwell said: > >>> Relatedly, I've added a VTK_DELETE_FUNCTION here: >>> >>> >>> and that implies changing Item 14, which currently reads: "Classes >>that derive from vtkObject should have protected constructors and >>destructors, and privately declared but unimplemented copy constructor >>and assignment operator." We should now say that VTK_DELETE_FUNCTION >>should be used. >>> >>Seems reasonable to me. Both require a large number of changes > > I just realized that we discussed & agreed about 'override', but '=delete' fell by the wayside. > > What do we all think about: > > 1) changing coding standards item 14: > > > 2) adding a VTK_DELETE_FUNCTION, see: > > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > _______________________________________________ > 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 > From berk.geveci at kitware.com Thu Jun 16 15:04:31 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 16 Jun 2016 15:04:31 -0400 Subject: [vtk-developers] SC16 Visualization Showcase submission deadline - July 31, 2016 Message-ID: Visualization Showcase ------------------------------ Important Dates: February 16, 2016: *Submissions open* July 31, 2016: *Submissions deadline* September 1, 2016: *Notifications sent* ------------------------------ *A new format for 2016!* SC16?s Visualization and Data Analytics Showcase Program provides a forum for the year?s most instrumental movies in HPC. This year, there will be both a live display throughout the conference so that attendees can experience and enjoy the latest in science and engineering HPC results expressed through state-of-the-art visualization technologies, and a session at SC16 dedicated to the best of the submissions. Selected entries will be displayed live in a museum/art gallery format and six finalists will compete for the Best Visualization Award, with each finalist presenting his or her movie 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. The six finalist submissions will appear as short papers on the SC16 webpage and archive. *Review and selection process:* Submissions need to include a movie (up to 250MB in size) and a short paper (up to 4 pages including references). The short paper should describe the scientific story conveyed by the movie, how the visualization helps scientific discovery, and the ?state-of-the-practice? information ( ieeevis.org)information behind making the movie. Each submission will be peer reviewed by the Visualization and Data Analytics Showcase Committee. Criteria for review include: - How effective is the visual communication of the data? - How relevant to the HPC community is the visualization? - What is the impact of the science story and how well is it told? - What visualization techniques were necessary to create the movie? Finally, submissions should support SC16?s overall theme ?HPC matters.? http://sc16.supercomputing.org/submitters/showcases/scientific-visualization-showcase/ *Web Submissions:* https://submissions.supercomputing.org/ *Email Contact:* vis_showcase at info.supercomputing.org SC16 Visualization Showcase Chair Chris Johnson, University of Utah SC16 Visualization Showcase Vice Chair Kristin Potter, University of Oregon -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangjiang.dudu at gmail.com Thu Jun 16 16:00:31 2016 From: zhangjiang.dudu at gmail.com (=?utf-8?B?5byg5rGf?=) Date: Thu, 16 Jun 2016 15:00:31 -0500 Subject: [vtk-developers] convert vtkUnstructuredGrid to ExodusII Message-ID: <3B473E5A-86CF-4BAF-B843-1C0796654AC4@gmail.com> Hi, Currently I want to convert an unstructured grid data to exodusII format. The input unstructured grid data has a cell type of wedge. But when I execute the following code, the output data contains TETRA cell type. Can anybody explain this? vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New(); reader->SetFileName(?input.vtk"); reader->Update(); vtkUnstructuredGrid *grid = reader->GetOutput(); vtkExodusIIWriter *writer = vtkExodusIIWriter::New(); writer->SetInputData(grid); writer->SetFileName(?output.e"); writer->Write(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Thu Jun 16 16:40:47 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Thu, 16 Jun 2016 16:40:47 -0400 Subject: [vtk-developers] Contents of vtk-developers Digest, Vol 146, Issue 17 -RE: vtkAxesActor within VTK 7.0 and QVTKWidget Message-ID: <80e701d1c80f$5d75a230$1860e690$@vektore.com> Hi Sankhesh, Got this, was missing those two highlighted yellow lines: viewPortOMWidget = vtkSmartPointer::New(); viewPortOMWidget->SetOrientationMarker(viewPortAxActor); viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); viewPortOMWidget->SetEnabled(1); //missing viewPortOMWidget->InteractiveOn();//missing Thank you, Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Sankhesh Jhaveri [mailto:sankhesh.jhaveri at kitware.com] Sent: June 16, 2016 9:54 AM To: Luis Vieira Cc: vtk-developers ; vtkusers at vtk.org Subject: Re: [vtk-developers] vtkAxesActor within VTK 7.0 and QVTKWidget Hi Luis, I don't see anything obvious but I noticed that you are initializing vtkRenderingOpenGL i.e. using the OpenGL backend. Mind trying the OpenGL2 backend to find out whether the issue is specific to the old backend. Sankhesh On Tue, Jun 14, 2016 at 3:20 PM, Luis Vieira > wrote: Hello everyone, I had migrated my VTK platform from 6.1 to 7.0. I had noticed some changes, and one of those is giving me a hard work to do that is to render vtkSmartPointer::New() within QVTWidget. Previously, was easily, with VTK 6.1. Now, I am trying that and I got the Cone working/rendering well and its interactions. However, I haven't gotten absolutely nothing on my viewport from my vtkAxesActor even been shown . Following my code (C++), regarding that this works outside QVTWidget viewport. I appreciate any ideas and help. ???????? #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" #include "vtkEventQtSlotConnect.h" #include "vtkCommand.h" #include "vtkConeSource.h" #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkActorCollection.h" #include "vtkCaptionActor2D.h" #include "vtkTextActor.h" #include "vtkTextProperty.h" #include "vtkActor2D.h" #include "vtkAxesActor.h" #include "vtkOrientationMarkerWidget.h" #include "vtkInteractorStyle.h" #include "vtkTDxInteractorStyleCamera.h" #include "vtkTDxInteractorStyleSettings.h" #include "vtkInteractorStyleRubberBandPick.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkInteractorStyleTrackball.h" #include "QVTKInteractorAdapter.h" #include "QVTKInteractor.h" #include "QVTKApplication.h" ??. . . . #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); . . . Mainwindow.cpp Void procedure() { vtkRenderWindow* renwin = vtkRenderWindow::New(); renwin->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. // QVTKWidget mainViewPort->SetUseTDx(true); // QVTKWidget = mainViewPort. mainViewPort->SetRenderWindow(renwin); renwin->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = mainViewPort->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // add a renderer Ren1 = vtkRenderer::New(); mainViewPort->GetRenderWindow()->AddRenderer(Ren1); vtkConeSource* cone = vtkConeSource::New(); vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(cone->GetOutputPort()); vtkActor* actor = vtkActor::New(); actor->SetMapper(mapper); Ren1->AddViewProp(actor); actor->Delete(); mapper->Delete(); cone->Delete(); mainViewPort->GetRenderWindow()->Render(); viewPortAxActor = vtkSmartPointer::New(); viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()->SetColor(0, 0, 0); viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()->SetColor(0, 0, 0); viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()->SetColor(0, 0, 0); viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); viewPortOMWidget = vtkSmartPointer::New(); viewPortOMWidget->SetOrientationMarker(viewPortAxActor); viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); . . . ..... } Any ideas? Thank you very much. Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com _______________________________________________ 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 luis.vieira at vektore.com Thu Jun 16 17:32:23 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Thu, 16 Jun 2016 17:32:23 -0400 Subject: [vtk-developers] Contents of vtk-developers Digest, Vol 146, Issue 15 Message-ID: <8f2d01d1c816$9269ad90$b73d08b0$@vektore.com> Hello, Some body with any ideas to help us? How to fix the Focal Point in case using vtkOBJReader? Thank you very much. Luis Vieira, Toronto. Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -----Original Message----- From: Luis Vieira [mailto:luis.vieira at vektore.com] Sent: June 14, 2016 11:38 AM To: 'vtk-developers at vtk.org' ; 'vtkusers at vtk.org' Cc: 'David Thompson' Subject: Contents of vtk-developers Digest, Vol 146, Issue 15 Hi David, Also, I have tried, unsuccessfully, as well as following: >> It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. >> renderer->ComputeVisiblePropBounds(bounds); vtkCamera* cam = renderer->GetActiveCamera(); cam->SetFocalPoint((bounds[0] + bounds[1]) / 2.0, (bounds[2] + cam->bounds[3]) / 2.0, (bounds[4] + bounds[5]) / 2.0); cam->SetPosition((bounds[0] + bounds[1]) / 2.0, (bounds[2] + bounds[3]) cam->/ 2.0, bounds[4] + bounds[5]); SetViewUp(0, 1, 0); Please, could you be more clear about this? >> The pick coordinates will be points on the VRML geometry, not image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. >>> Tks, Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -----Original Message----- From: David Thompson [mailto:david.thompson at kitware.com] Sent: June 14, 2016 10:37 AM To: Luis Vieira Cc: vtk-developers at vtk.org Subject: Re: [vtk-developers] Rendering Image and Picking Points Hi Luis, > ...I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. > > 1- I want this because the point is when I am rotating the object and > picking point in its surface I got the X, Y and Z world coordinates > that doesn't match the real coordinates of the camera; > > 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). ... It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. The pick coordinates will be points on the VRML geometry, not image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. David Hello Guys!! First of all, I have to say that I appreciate any help! I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). Following my code and attached picture. Thank you very much!! Luis MainWindow.cpp void MainWindow::ProcessImage(QString _model, QString _image) { double bounds[6] = { +1, -1, +1, -1, +1, -1 }; qvtkWidget->setVisible(true); std::string iname = _model.toStdString();//model is a *.obj Cylinder of Solid rock with h1024xw1024"; std::string imagename = _image.toStdString() ;//is the texture *.bmp file that wraps up the cylinder"; vtkRenderer* renderer = vtkRenderer::New(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); renderWindow->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. qvtkWidget->SetUseTDx(true); qvtkWidget->SetRenderWindow(renderWindow); //renderWindow->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = qvtkWidget->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // Read the image which will be the texture QMenu* popup1 = new QMenu(qvtkWidget); popup1->addAction("Draw Line"); popup1->addAction("Draw Plane"); popup1->addAction("Draw Clip"); popup1->addAction("Background White"); popup1->addAction("Background Black"); popup1->addAction("Stereo Rendering"); connect(popup1, SIGNAL(triggered(QAction*)), this, SLOT(ProcessUserViewPortInteraction(QAction*))); std::cout << "Reading image " << imagename << "..." << std::endl; vtkBMPReader* bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(imagename.c_str()); bmpReader->Update(); std::cout << "Done" << std::endl; // Creating the texture std::cout << "Making a texture out of the image... " << std::endl; vtkTexture* texture = vtkTexture::New(); texture->SetInputConnection(bmpReader->GetOutputPort()); std::cout << "Done" << std::endl; // Import geometry from a VRML file vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(bmpReader->GetOutputPort()); //imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSize(600, 600); vtkDataSet *pDataset; // Import geometry from an OBJ file std::cout << "Reading OBJ file " << iname << "..." << std::endl; vtkOBJReader* reader = vtkOBJReader::New(); reader->SetFileName(iname.c_str()); reader->Update(); vtkPolyData *polyData2 = reader->GetOutput(); std::cout << "Obj reader = " << polyData2->GetNumberOfPoints() << std::endl; std::cout << "Obj point data = " << polyData2->GetPointData()->GetNumberOfArrays() << std::endl; std::cout << "Obj point data tuples = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfTuples() << std::endl; std::cout << "Obj point data compon = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfComponents() << std::endl; // //// Renderer vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputData(polyData2); vtkActor* texturedQuad = vtkActor::New(); texturedQuad->SetMapper(mapper); texturedQuad->SetTexture(texture); //texturedQuad->SetPosition(0, 0, 0); // Create Normal Vectors to enhance smoothness & illumination vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputData(polyData2); normals->SetFeatureAngle(60.0); // Mapper vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); SolidMapper->SetInputData(normals->GetOutput()); SolidMapper->ScalarVisibilityOff(); // Actor vtkActor *SolidActor = vtkActor::New(); SolidActor->SetMapper(SolidMapper); vtkImageData* image = imageViewer->GetInput(); int dim[3]; image->GetDimensions(dim); double spacing[3]; image->GetSpacing(spacing); double origin[3]; image->GetOrigin(origin); renderer->ComputeVisiblePropBounds(bounds); Renderer->AddActor(SolidActor); Renderer->AddActor(texturedQuad); float Cx = (dim[0] * spacing[0]) / 2. + origin[0]; float Cy = (dim[1] * spacing[1]) / 2. + origin[1]; vtkCamera* m_Camera = vtkCamera::New(); m_Camera->SetPosition(Cx, Cy, 1); m_Camera->SetFocalPoint(Cx, Cy, 0); m_Camera->SetViewUp(0, 1, 0); m_Camera->GetDirectionOfProjection(); m_Camera->ParallelProjectionOn(); Renderer->SetActiveCamera(m_Camera); Renderer->SetBackground(0, 0, 0); // Background color white Renderer->ResetCamera(); qvtkWidget->GetRenderWindow()->AddRenderer(Renderer); qvtkWidget->GetRenderWindow()->Render(); //renderer->ResetCamera(); vtkIPWCallback* myCallback = vtkIPWCallback::New(); myCallback->renderer = Renderer; myCallback->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); myCallback->readerClip = vtkOBJReader::New(); myCallback->readerClip = reader; this->styleCallback = myCallback; //renderer->ResetCamera(); this->stylePicker->normalsKore = vtkSmartPointer::New(); this->stylePicker->normalsKore = normals; this->stylePicker->renderer = vtkSmartPointer::New(); this->stylePicker->actor = vtkActor::New(); this->stylePicker->mapper = vtkPolyDataMapper::New(); this->stylePicker->points = vtkSmartPointer::New(); this->stylePicker->vertices = vtkSmartPointer::New(); this->stylePicker->renderer = Renderer; this->stylePicker->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); vtkSmartPointer pointPicker = vtkSmartPointer::New(); qvtkWidget->GetRenderWindow()->GetInteractor()->SetPicker(pointPicker); qvtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(this->sty lePicker); Connections = vtkEventQtSlotConnect::New(); Connections->Connect(qvtkWidget->GetRenderWindow()->GetInteractor(), vtkCommand::KeyPressEvent, this, SLOT(popup(vtkObject*, unsigned long, void*, void*, vtkCommand*)), popup1, 1.0); } MainWindow.h //Point PickFunction class MouseInteractorStyle2 : public vtkInteractorStyleTrackballCamera { public: std::vector pointList; std::vector pointListPlane; vtkSmartPointer matrix; vtkSmartPointer normalsKore = vtkSmartPointer::New(); vtkSmartPointer spherePickSource; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer vertices = vtkSmartPointer::New(); vtkSmartPointer polydata; vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkActor* actor; vtkPolyDataMapper* mapper; static MouseInteractorStyle2* New() { return new MouseInteractorStyle2; } //vtkTypeMacro(MouseInteractorStyle2, vtkInteractorStyleTrackballCamera); virtual void OnRightButtonDown() { int* clickPos = this->renderWindowInteractor->GetEventPosition(); // Pick from this location. vtkPropPicker* picker = vtkPropPicker::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); double* pos = picker->GetPickPosition(); std::cout << "Pick position (world coordinates) is: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; std::cout << "Picked actor: " << picker->GetActor() << std::endl; // Add label array. polydata = vtkSmartPointer::New(); spherePickSource = vtkSmartPointer::New(); spherePickSource->SetRadius(0.030); spherePickSource->SetCenter(pos[0], pos[1], pos[2]); if (pointList.size() < 2) { //pointList.clear(); pointList.push_back(pos); } if (pointListPlane.size() < 30) { pointListPlane.push_back(pos); } //Create a mapper and actor mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(spherePickSource->GetOutputPort()); actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); actor->GetProperty()->SetColor(1, 1, 1); this->renderer->AddActor(actor); vtkInteractorStyleTrackballCamera::OnRightButtonDown(); } private: }; Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com From david.gobbi at gmail.com Thu Jun 16 18:06:08 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 16 Jun 2016 16:06:08 -0600 Subject: [vtk-developers] Wrapping the new arrays Message-ID: Hi David, Was it intended to have the new VTK data arrays wrapped in Python? They're all wrappable except for the vtkGenericDataArray (it's a special case). In order to wrap vtkSOADataArrayTemplate and the templated array types, Python would just have to be fooled into thinking that their superclass is vtkDataArray, similar to what is already done for the old array classes. That way, Python wouldn't have to deal with the problematic vtkGenericDataArray template. The Python wrappers can be told to instantiate the templates over the usual set of data types. This part is easy, it has already done for vtkArrayIteratorTemplate, vtkDenseArray, and vtkSparseArray. So I'm just wondering if wrapping these classes was part of the plan. I get an itch whenever C++ stuff is added to VTK that can't be used from Python :) - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Thu Jun 16 23:47:52 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 16 Jun 2016 23:47:52 -0400 Subject: [vtk-developers] Contents of vtk-developers Digest, Vol 146, Issue 17 -RE: vtkAxesActor within VTK 7.0 and QVTKWidget In-Reply-To: <80e701d1c80f$5d75a230$1860e690$@vektore.com> References: <80e701d1c80f$5d75a230$1860e690$@vektore.com> Message-ID: Nice! Glad you found it. Sankhesh On Thu, Jun 16, 2016 at 4:40 PM, Luis Vieira wrote: > Hi Sankhesh, > > > > Got this, was missing those two highlighted yellow lines: > > > > viewPortOMWidget = vtkSmartPointer::New(); > > viewPortOMWidget->SetOrientationMarker(viewPortAxActor); > > viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); > > viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); > > * viewPortOMWidget**->**SetEnabled**(1);* //missing > > *viewPortOMWidget**->**InteractiveOn**();**//*missing > > > > Thank you, > > > > *Luis Vieira*, Toronto > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Sankhesh Jhaveri [mailto:sankhesh.jhaveri at kitware.com] > *Sent:* June 16, 2016 9:54 AM > *To:* Luis Vieira > *Cc:* vtk-developers ; vtkusers at vtk.org > *Subject:* Re: [vtk-developers] vtkAxesActor within VTK 7.0 and QVTKWidget > > > > Hi Luis, > > > > I don't see anything obvious but I noticed that you are initializing > vtkRenderingOpenGL i.e. using the OpenGL backend. Mind trying the OpenGL2 > backend to find out whether the issue is specific to the old backend. > > > > Sankhesh > > > > > > > On Tue, Jun 14, 2016 at 3:20 PM, Luis Vieira > wrote: > > Hello everyone, > > > > I had migrated my VTK platform from 6.1 to 7.0. I had noticed some > changes, and one of those is giving me a hard work to do that is to render > vtkSmartPointer::New() within QVTWidget. Previously, was > easily, with VTK 6.1. Now, I am trying that and I got the Cone > working/rendering well and its interactions. However, I haven't gotten > absolutely nothing on my viewport from my vtkAxesActor even been shown . > Following my code (C++), regarding that this works outside QVTWidget > viewport. > > > > I appreciate any ideas and help. > > ???????? > > #include "vtkRenderWindow.h" > > #include "vtkRenderer.h" > > #include "vtkRenderWindowInteractor.h" > > #include "vtkEventQtSlotConnect.h" > > #include "vtkCommand.h" > > #include "vtkConeSource.h" > > #include "vtkSphereSource.h" > > #include "vtkPolyDataMapper.h" > > #include "vtkActor.h" > > #include "vtkActorCollection.h" > > #include "vtkCaptionActor2D.h" > > #include "vtkTextActor.h" > > #include "vtkTextProperty.h" > > #include "vtkActor2D.h" > > #include "vtkAxesActor.h" > > #include "vtkOrientationMarkerWidget.h" > > #include "vtkInteractorStyle.h" > > #include "vtkTDxInteractorStyleCamera.h" > > #include "vtkTDxInteractorStyleSettings.h" > > #include "vtkInteractorStyleRubberBandPick.h" > > #include "vtkInteractorStyleTrackballCamera.h" > > #include "vtkInteractorStyleTrackball.h" > > #include "QVTKInteractorAdapter.h" > > #include "QVTKInteractor.h" > > #include "QVTKApplication.h" > > ??. > > . > > . > > . > > #include > > VTK_MODULE_INIT(vtkRenderingOpenGL); > > VTK_MODULE_INIT(vtkInteractionStyle); > > . > > . > > . > > > > Mainwindow.cpp > > > > Void procedure() > > { > > vtkRenderWindow* renwin = vtkRenderWindow::New(); > > renwin->StereoCapableWindowOn(); > > > > // Activate 3DConnexion device only on the left render > window. > > // QVTKWidget > > mainViewPort->SetUseTDx(true); // QVTKWidget = mainViewPort. > > > > mainViewPort->SetRenderWindow(renwin); > > renwin->Delete(); > > > > const double angleSensitivity = 0.02; > > const double translationSensitivity = 0.001; > > > > QVTKInteractor *iren = mainViewPort->GetInteractor(); > > vtkInteractorStyle *s = > > static_cast(iren-> > GetInteractorStyle()); > > vtkTDxInteractorStyleCamera *t = > > static_cast(s-> > GetTDxStyle()); > > > > t->GetSettings()->SetAngleSensitivity(angleSensitivity); > > t->GetSettings()->SetTranslationXSensitivity( > translationSensitivity); > > t->GetSettings()->SetTranslationYSensitivity( > translationSensitivity); > > t->GetSettings()->SetTranslationZSensitivity( > translationSensitivity); > > > > > > > > // add a renderer > > Ren1 = vtkRenderer::New(); > > mainViewPort->GetRenderWindow()->AddRenderer(Ren1); > > > > vtkConeSource* cone = vtkConeSource::New(); > > vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); > > mapper->SetInputConnection(cone->GetOutputPort()); > > vtkActor* actor = vtkActor::New(); > > actor->SetMapper(mapper); > > Ren1->AddViewProp(actor); > > actor->Delete(); > > mapper->Delete(); > > cone->Delete(); > > > > > > > > mainViewPort->GetRenderWindow()->Render(); > > > > viewPortAxActor = vtkSmartPointer::New(); > > viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); > > viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); > > viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); > > > > viewPortOMWidget = vtkSmartPointer::New(); > > viewPortOMWidget->SetOrientationMarker(viewPortAxActor); > > viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); > > viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); > > > > . > > . > > . > > ..... > > } > > > > Any ideas? > > > > Thank you very much. > > > > *Luis Vieira*, Toronto > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > luis.vieira at vektore.com > > www.vektore.com > > > > > _______________________________________________ > 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 david.lonie at kitware.com Fri Jun 17 07:08:17 2016 From: david.lonie at kitware.com (David Lonie) Date: Fri, 17 Jun 2016 07:08:17 -0400 Subject: [vtk-developers] Wrapping the new arrays In-Reply-To: References: Message-ID: On Thu, Jun 16, 2016 at 6:06 PM, David Gobbi wrote: > Hi David, > > Was it intended to have the new VTK data arrays wrapped in Python? > They're all wrappable except for the vtkGenericDataArray (it's a special > case). > > In order to wrap vtkSOADataArrayTemplate and the templated array types, > Python would just have to be fooled into thinking that their superclass is > vtkDataArray, similar to what is already done for the old array classes. > That way, Python wouldn't have to deal with the problematic > vtkGenericDataArray template. > > The Python wrappers can be told to instantiate the templates over the > usual set of data types. This part is easy, it has already done for > vtkArrayIteratorTemplate, vtkDenseArray, and vtkSparseArray. > It wasn't something we planned for right away, but we did want them wrapped eventually. If it's easy enough, sure, feel free to go ahead and wrap them :) Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Jun 17 12:25:23 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 17 Jun 2016 12:25:23 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: Worked like a charm David Lonie. Thanks! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jun 16, 2016 at 11:47 AM, David E DeMarle wrote: > Likely story. > We shall see tonight when the dashboards runs again with doxygen 1.8.11. > > :) > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Jun 16, 2016 at 11:32 AM, David Lonie > wrote: > >> On Thu, Jun 16, 2016 at 9:29 AM, David Gobbi >> wrote: >> >>> Awesome. Though I notice that the new array classes have somehow >>> managed to mess up the class index: >>> http://www.vtk.org/doc/nightly/html/classes.html >>> >> >> I just looked into this, and the spurious classes are coming from blobs >> in Documentation/Doxygen/ArrayDispatch-VTK-7-1.md. This file is meant to >> appear as supplemental information under the "Related Pages" tab, and not >> be interpreted as class documentation. >> >> On my local machine (running Doxygen 1.8.11), it all works as expected. >> The live version online (running Doxygen 1.7.6.1) is mistaking these for >> class documentation. >> >> If someone could update doxygen on the machine generating these, I >> suspect the problem will go away. >> >> Dave >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Fri Jun 17 12:43:09 2016 From: david.lonie at kitware.com (David Lonie) Date: Fri, 17 Jun 2016 12:43:09 -0400 Subject: [vtk-developers] Nightly Doxygen In-Reply-To: References: Message-ID: Great! I'm thrilled that it required no real effort! :D On Fri, Jun 17, 2016 at 12:25 PM, David E DeMarle wrote: > Worked like a charm David Lonie. Thanks! > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Jun 16, 2016 at 11:47 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > >> Likely story. >> We shall see tonight when the dashboards runs again with doxygen 1.8.11. >> >> :) >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Thu, Jun 16, 2016 at 11:32 AM, David Lonie >> wrote: >> >>> On Thu, Jun 16, 2016 at 9:29 AM, David Gobbi >>> wrote: >>> >>>> Awesome. Though I notice that the new array classes have somehow >>>> managed to mess up the class index: >>>> http://www.vtk.org/doc/nightly/html/classes.html >>>> >>> >>> I just looked into this, and the spurious classes are coming from blobs >>> in Documentation/Doxygen/ArrayDispatch-VTK-7-1.md. This file is meant to >>> appear as supplemental information under the "Related Pages" tab, and not >>> be interpreted as class documentation. >>> >>> On my local machine (running Doxygen 1.8.11), it all works as expected. >>> The live version online (running Doxygen 1.7.6.1) is mistaking these for >>> class documentation. >>> >>> If someone could update doxygen on the machine generating these, I >>> suspect the problem will go away. >>> >>> Dave >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sun Jun 19 02:40:30 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 19 Jun 2016 16:40:30 +1000 Subject: [vtk-developers] Building VTK with Qt5.7, all Ok. Message-ID: For those interested. I have just run these builds using the latest VTK master: 1) Windows: VS2015, TBB, Qt5.7 2) Ubuntu gcc 5.3.1, TBB, Qt5.7 3) Macintosh: OS X El Capitan, TBB, Qt5.7 All build Ok with no major issues. -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sun Jun 19 03:35:00 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 19 Jun 2016 17:35:00 +1000 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. Message-ID: This is just for discussion! However if someone gives me guidance I am willing to do the work. While building VTK I noticed a warning regarding the deprecation of std::auto_ptr. It seems std::auto_ptr is deprecated since C++11 and will most likely be removed in C++17. See: http://en.cppreference.com/w/cpp/memory/auto_ptr and: https://en.wikipedia.org/wiki/C%2B%2B17 >From a quick read it seems that std::unique_ptr is the preferred replacement. However there is also an std::shared_ptr which is a smart pointer retaining shared ownership of an object through a pointer. A cursory search reveals that the following VTK sources use std::auto_ptr: ./ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp ./IO/XMLParser/vtkXMLDataParser.cxx ./IO/XML/vtkXMLWriter.cxx ./Common/DataModel/vtkDispatcher_Private.h It seems ./Utilities/KWSys/vtksys/auto_ptr.hxx.in implements its own version of auto_ptr, however this is not used in the above files. I'll freely admit that I am out of my depth here but in the case of: ./IO/XMLParser/vtkXMLDataParser.cxx ./IO/XML/vtkXMLWriter.cxx To me, it seems that std::unique_ptr would be the replacement. In the case of: ./Common/DataModel/vtkDispatcher_Private.h I'm not so sure. Especially since a swap seems to occur in line 309: Functor& operator=(const Functor& rhs) So I have two questions: 1) How do we handle future proofing in this case? Most importantly, we need to keep std::auto_ptr for older compilers but should move to either std::unique_ptr and/or possibly std::shared_ptr. Is there a define that we can use? Finally: 2) vtkSmartPointer ... how does this fit in? To me it seems this similar to std::shared_ptr. Could vtkSmartPointer just be a wrapper around std::shared_ptr for new compilers (C++11 and newer)? Regards Andrew -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Sun Jun 19 11:29:26 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Sun, 19 Jun 2016 11:29:26 -0400 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: Message-ID: Hi Andrew, We have had a few discussions about this and here is (roughly) where I think things stand. (To the list: feel free to correct/expand this). > So I have two questions: > 1) How do we handle future proofing in this case? Most importantly, we need to keep std::auto_ptr for older compilers but should move to either std::unique_ptr and/or possibly std::shared_ptr. Is there a define that we can use? Yes std::unique_ptr is the right replacement, but we should check if the compiler/library supports it and fall back to std::auto_ptr. I don't know of a define that could be used to test this, though one could be added. > Finally: > 2) vtkSmartPointer ... how does this fit in? To me it seems this similar to std::shared_ptr. Could vtkSmartPointer just be a wrapper around std::shared_ptr for new compilers (C++11 and newer)? This was a long discussion, but the summary is this: vtkSmartPointer assumes that the object itself is reference counted internally and will delete itself when that count reaches 0. std::shared_ptr assumes that it needs to keep the reference count and delete the object when that reaches 0. These two different takes on reference counting are hard to reconcile and there isn't really a way to easily migrate to use std::shared_ptr. It is also uncertain if we want to... Shawn -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Mon Jun 20 02:02:46 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Mon, 20 Jun 2016 16:02:46 +1000 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: Message-ID: Shawn, Firstly thank you for a very clear explanation of the difference between vtkSmartPointer and std::shared_ptr. It is much appreciated. Regarding std::unique_ptr. I think that it will be possible to use std::unique_ptr where it is defined and fall back to std::auto_ptr without too much effort. Please see the attached zip file for a test scenario. However we would need a new define which I have called VTK_HAS_UNIQUE_PTR and one new macro: CheckCXXTemplatedExpressionCompiles.cmake To test it yourself, change "std::unique_ptr ptr" in line 49 of the CMakeLists.txt file to to something that will never compile e.g "std::Xunique_ptr ptr". Remember to delete the cache and run CMake again when you do this. I have only tested this in windows so it may be buggy. If you think this approach is reasonable, I'll have a go at creating a topic. Of course feedback from anyone else would be appreciated. Regards Andrew On Mon, Jun 20, 2016 at 1:29 AM, Shawn Waldon wrote: > Hi Andrew, > > We have had a few discussions about this and here is (roughly) where I > think things stand. (To the list: feel free to correct/expand this). > > So I have two questions: > > 1) How do we handle future proofing in this case? Most importantly, we > need to keep std::auto_ptr for older compilers but should move to either > std::unique_ptr and/or possibly std::shared_ptr. Is there a define that we > can use? > > Yes std::unique_ptr is the right replacement, but we should check if the > compiler/library supports it and fall back to std::auto_ptr. I don't know > of a define that could be used to test this, though one could be added. > > > Finally: > > 2) vtkSmartPointer ... how does this fit in? To me it seems this similar > to std::shared_ptr. Could vtkSmartPointer just be a wrapper around > std::shared_ptr for new compilers (C++11 and newer)? > > This was a long discussion, but the summary is this: vtkSmartPointer > assumes that the object itself is reference counted internally and will > delete itself when that count reaches 0. std::shared_ptr assumes that it > needs to keep the reference count and delete the object when that reaches > 0. These two different takes on reference counting are hard to reconcile > and there isn't really a way to easily migrate to use std::shared_ptr. It > is also uncertain if we want to... > > Shawn > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CheckForUniquePtr.zip Type: application/zip Size: 3809 bytes Desc: not available URL: From DLRdave at aol.com Mon Jun 20 06:24:10 2016 From: DLRdave at aol.com (David Cole) Date: Mon, 20 Jun 2016 06:24:10 -0400 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: Message-ID: Since auto_ptr is only used in 4 files, wouldn't it be easier to simply eliminate its use? Why add CMake logic and complexity for such little benefit? Why the sledgehammer when a tiny little jeweler's screwdriver will do? David C. On Monday, June 20, 2016, Andrew Maclean wrote: > Shawn, > Firstly thank you for a very clear explanation of the difference > between vtkSmartPointer and std::shared_ptr. It is much appreciated. > > Regarding std::unique_ptr. > > I think that it will be possible to use std::unique_ptr where it is > defined and fall back to std::auto_ptr without too much effort. > > Please see the attached zip file for a test scenario. > > However we would need a new define which I have called VTK_HAS_UNIQUE_PTR > and > one new macro: CheckCXXTemplatedExpressionCompiles.cmake > > To test it yourself, change "std::unique_ptr ptr" in line 49 of the > CMakeLists.txt file to to something that will never compile e.g > "std::Xunique_ptr ptr". > Remember to delete the cache and run CMake again when you do this. > > I have only tested this in windows so it may be buggy. > > If you think this approach is reasonable, I'll have a go at creating a > topic. > > Of course feedback from anyone else would be appreciated. > > Regards > Andrew > > > On Mon, Jun 20, 2016 at 1:29 AM, Shawn Waldon > wrote: > >> Hi Andrew, >> >> We have had a few discussions about this and here is (roughly) where I >> think things stand. (To the list: feel free to correct/expand this). >> > So I have two questions: >> > 1) How do we handle future proofing in this case? Most importantly, we >> need to keep std::auto_ptr for older compilers but should move to either >> std::unique_ptr and/or possibly std::shared_ptr. Is there a define that we >> can use? >> >> Yes std::unique_ptr is the right replacement, but we should check if the >> compiler/library supports it and fall back to std::auto_ptr. I don't know >> of a define that could be used to test this, though one could be added. >> >> > Finally: >> > 2) vtkSmartPointer ... how does this fit in? To me it seems this >> similar to std::shared_ptr. Could vtkSmartPointer just be a wrapper around >> std::shared_ptr for new compilers (C++11 and newer)? >> >> This was a long discussion, but the summary is this: vtkSmartPointer >> assumes that the object itself is reference counted internally and will >> delete itself when that count reaches 0. std::shared_ptr assumes that it >> needs to keep the reference count and delete the object when that reaches >> 0. These two different takes on reference counting are hard to reconcile >> and there isn't really a way to easily migrate to use std::shared_ptr. It >> is also uncertain if we want to... >> >> Shawn >> >> >> >> > > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Mon Jun 20 07:23:39 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Mon, 20 Jun 2016 21:23:39 +1000 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: Message-ID: David, It's a good point, initially I was surprised to see std::auto_ptr appear in VTK code. However on reflection I think that programmers (especially the younger ones) will naturally gravitate towards using std::unique_ptr and std::shared_ptr for the simple reason of code robustness, since, in these cases, the compiler does all the memory management and object tracking etc. So younger programmers or those who have only used C++11 and later compilers will naturally use these functions, which is a good thing. We need to attract these programmers and provide a mechanism whereby the paradigms that they are familiar with can be accommodated. Regards Andrew Andrew Maclean On 20 Jun 2016 8:24 pm, "David Cole" wrote: > Since auto_ptr is only used in 4 files, wouldn't it be easier to simply > eliminate its use? Why add CMake logic and complexity for such little > benefit? Why the sledgehammer when a tiny little jeweler's screwdriver will > do? > > > David C. > > > On Monday, June 20, 2016, Andrew Maclean > wrote: > >> Shawn, >> Firstly thank you for a very clear explanation of the difference >> between vtkSmartPointer and std::shared_ptr. It is much appreciated. >> >> Regarding std::unique_ptr. >> >> I think that it will be possible to use std::unique_ptr where it is >> defined and fall back to std::auto_ptr without too much effort. >> >> Please see the attached zip file for a test scenario. >> >> However we would need a new define which I have called VTK_HAS_UNIQUE_PTR >> and >> one new macro: CheckCXXTemplatedExpressionCompiles.cmake >> >> To test it yourself, change "std::unique_ptr ptr" in line 49 of the >> CMakeLists.txt file to to something that will never compile e.g >> "std::Xunique_ptr ptr". >> Remember to delete the cache and run CMake again when you do this. >> >> I have only tested this in windows so it may be buggy. >> >> If you think this approach is reasonable, I'll have a go at creating a >> topic. >> >> Of course feedback from anyone else would be appreciated. >> >> Regards >> Andrew >> >> >> On Mon, Jun 20, 2016 at 1:29 AM, Shawn Waldon >> wrote: >> >>> Hi Andrew, >>> >>> We have had a few discussions about this and here is (roughly) where I >>> think things stand. (To the list: feel free to correct/expand this). >>> > So I have two questions: >>> > 1) How do we handle future proofing in this case? Most importantly, we >>> need to keep std::auto_ptr for older compilers but should move to either >>> std::unique_ptr and/or possibly std::shared_ptr. Is there a define that we >>> can use? >>> >>> Yes std::unique_ptr is the right replacement, but we should check if the >>> compiler/library supports it and fall back to std::auto_ptr. I don't know >>> of a define that could be used to test this, though one could be added. >>> >>> > Finally: >>> > 2) vtkSmartPointer ... how does this fit in? To me it seems this >>> similar to std::shared_ptr. Could vtkSmartPointer just be a wrapper around >>> std::shared_ptr for new compilers (C++11 and newer)? >>> >>> This was a long discussion, but the summary is this: vtkSmartPointer >>> assumes that the object itself is reference counted internally and will >>> delete itself when that count reaches 0. std::shared_ptr assumes that it >>> needs to keep the reference count and delete the object when that reaches >>> 0. These two different takes on reference counting are hard to reconcile >>> and there isn't really a way to easily migrate to use std::shared_ptr. It >>> is also uncertain if we want to... >>> >>> Shawn >>> >>> >>> >>> >> >> >> -- >> ___________________________________________ >> Andrew J. P. Maclean >> >> ___________________________________________ >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Mon Jun 20 09:31:59 2016 From: DLRdave at aol.com (David Cole) Date: Mon, 20 Jun 2016 09:31:59 -0400 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: Message-ID: That's fine. But having auto_ptr as a fallback seems silly to me. It should just be eliminated, and then if we depend on unique_ptr, we need to support only platforms and compilers that support it moving forward. D On Mon, Jun 20, 2016 at 7:23 AM, Andrew Maclean wrote: > David, > It's a good point, initially I was surprised to see std::auto_ptr appear > in VTK code. > > However on reflection I think that programmers (especially the younger ones) > will naturally gravitate towards using std::unique_ptr and std::shared_ptr > for the simple reason of code robustness, since, in these cases, the > compiler does all the memory management and object tracking etc. > > So younger programmers or those who have only used C++11 and later compilers > will naturally use these functions, which is a good thing. > > We need to attract these programmers and provide a mechanism whereby the > paradigms that they are familiar with can be accommodated. > > Regards > Andrew > > Andrew Maclean > > On 20 Jun 2016 8:24 pm, "David Cole" wrote: >> >> Since auto_ptr is only used in 4 files, wouldn't it be easier to simply >> eliminate its use? Why add CMake logic and complexity for such little >> benefit? Why the sledgehammer when a tiny little jeweler's screwdriver will >> do? >> >> >> David C. >> >> >> On Monday, June 20, 2016, Andrew Maclean >> wrote: >>> >>> Shawn, >>> Firstly thank you for a very clear explanation of the difference >>> between vtkSmartPointer and std::shared_ptr. It is much appreciated. >>> >>> Regarding std::unique_ptr. >>> >>> I think that it will be possible to use std::unique_ptr where it is >>> defined and fall back to std::auto_ptr without too much effort. >>> >>> Please see the attached zip file for a test scenario. >>> >>> However we would need a new define which I have called VTK_HAS_UNIQUE_PTR >>> and >>> one new macro: CheckCXXTemplatedExpressionCompiles.cmake >>> >>> To test it yourself, change "std::unique_ptr ptr" in line 49 of the >>> CMakeLists.txt file to to something that will never compile e.g >>> "std::Xunique_ptr ptr". >>> Remember to delete the cache and run CMake again when you do this. >>> >>> I have only tested this in windows so it may be buggy. >>> >>> If you think this approach is reasonable, I'll have a go at creating a >>> topic. >>> >>> Of course feedback from anyone else would be appreciated. >>> >>> Regards >>> Andrew >>> >>> >>> On Mon, Jun 20, 2016 at 1:29 AM, Shawn Waldon >>> wrote: >>>> >>>> Hi Andrew, >>>> >>>> We have had a few discussions about this and here is (roughly) where I >>>> think things stand. (To the list: feel free to correct/expand this). >>>> > So I have two questions: >>>> > 1) How do we handle future proofing in this case? Most importantly, we >>>> > need to keep std::auto_ptr for older compilers but should move to either >>>> > std::unique_ptr and/or possibly std::shared_ptr. Is there a define that we >>>> > can use? >>>> >>>> Yes std::unique_ptr is the right replacement, but we should check if the >>>> compiler/library supports it and fall back to std::auto_ptr. I don't know >>>> of a define that could be used to test this, though one could be added. >>>> >>>> > Finally: >>>> > 2) vtkSmartPointer ... how does this fit in? To me it seems this >>>> > similar to std::shared_ptr. Could vtkSmartPointer just be a wrapper around >>>> > std::shared_ptr for new compilers (C++11 and newer)? >>>> >>>> This was a long discussion, but the summary is this: vtkSmartPointer >>>> assumes that the object itself is reference counted internally and will >>>> delete itself when that count reaches 0. std::shared_ptr assumes that it >>>> needs to keep the reference count and delete the object when that reaches 0. >>>> These two different takes on reference counting are hard to reconcile and >>>> there isn't really a way to easily migrate to use std::shared_ptr. It is >>>> also uncertain if we want to... >>>> >>>> Shawn >>>> >>>> >>>> >>> >>> >>> >>> -- >>> ___________________________________________ >>> Andrew J. P. Maclean >>> >>> ___________________________________________ From luis.vieira at vektore.com Mon Jun 20 10:15:59 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Mon, 20 Jun 2016 10:15:59 -0400 Subject: [vtk-developers] Context vtk-developers Digest, Vol 146, Issue 15 Message-ID: <03ab01d1cafe$45a80c00$d0f82400$@vektore.com> Hi David, Do you meant this transformation? vtkSmartPointer projectedTexture = vtkSmartPointer::New(); David >> The pick coordinates will be points on the VRML geometry, not >> image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. >>> Thank you, Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -----Original Message----- From: Luis Vieira [mailto:luis.vieira at vektore.com] Sent: June 14, 2016 11:38 AM To: 'vtk-developers at vtk.org' ; 'vtkusers at vtk.org' Cc: 'David Thompson' Subject: Contents of vtk-developers Digest, Vol 146, Issue 15 Hi David, Also, I have tried, unsuccessfully, as well as following: >> It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. >> renderer->ComputeVisiblePropBounds(bounds); vtkCamera* cam = renderer->GetActiveCamera(); cam->SetFocalPoint((bounds[0] + bounds[1]) / 2.0, (bounds[2] + cam->bounds[3]) / 2.0, (bounds[4] + bounds[5]) / 2.0); cam->SetPosition((bounds[0] + bounds[1]) / 2.0, (bounds[2] + bounds[3]) cam->/ 2.0, bounds[4] + bounds[5]); SetViewUp(0, 1, 0); Please, could you be more clear about this? >> The pick coordinates will be points on the VRML geometry, not >> image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. >>> Tks, Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -----Original Message----- From: David Thompson [mailto:david.thompson at kitware.com] Sent: June 14, 2016 10:37 AM To: Luis Vieira Cc: vtk-developers at vtk.org Subject: Re: [vtk-developers] Rendering Image and Picking Points Hi Luis, > ...I am struggling to rendering an Image and set up the camera focal > point to placed that image within the center of the camera. > > 1- I want this because the point is when I am rotating the object and > picking point in its surface I got the X, Y and Z world coordinates > that doesn't match the real coordinates of the camera; > > 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). ... It looks like you are positioning the camera using image parameters... but you are not mapping the image directly. Instead, you are mapping geometry from a VRML file and texturing it with the image. The pick coordinates will be points on the VRML geometry, not image-space coordinates. There is an additional transform from texture coordinates to image coordinates that is being ignored. David Hello Guys!! First of all, I have to say that I appreciate any help! I am struggling to rendering an Image and set up the camera focal point to placed that image within the center of the camera. 1- I want this because the point is when I am rotating the object and picking point in its surface I got the X, Y and Z world coordinates that doesn't match the real coordinates of the camera; 2- When I am trying to use those coordinates once I had picked to calculate the center of mass between them , the results are not accurately rights. And everything that I have to derivate/build also are not, as well as when I make a Plane and the its origin goes away into the camera out of my cylinder(image). Following my code and attached picture. Thank you very much!! Luis MainWindow.cpp void MainWindow::ProcessImage(QString _model, QString _image) { double bounds[6] = { +1, -1, +1, -1, +1, -1 }; qvtkWidget->setVisible(true); std::string iname = _model.toStdString();//model is a *.obj Cylinder of Solid rock with h1024xw1024"; std::string imagename = _image.toStdString() ;//is the texture *.bmp file that wraps up the cylinder"; vtkRenderer* renderer = vtkRenderer::New(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); renderWindow->StereoCapableWindowOn(); // Activate 3DConnexion device only on the left render window. qvtkWidget->SetUseTDx(true); qvtkWidget->SetRenderWindow(renderWindow); //renderWindow->Delete(); const double angleSensitivity = 0.02; const double translationSensitivity = 0.001; QVTKInteractor *iren = qvtkWidget->GetInteractor(); vtkInteractorStyle *s = static_cast(iren->GetInteractorStyle()); vtkTDxInteractorStyleCamera *t = static_cast(s->GetTDxStyle()); t->GetSettings()->SetAngleSensitivity(angleSensitivity); t->GetSettings()->SetTranslationXSensitivity(translationSensitivity); t->GetSettings()->SetTranslationYSensitivity(translationSensitivity); t->GetSettings()->SetTranslationZSensitivity(translationSensitivity); // Read the image which will be the texture QMenu* popup1 = new QMenu(qvtkWidget); popup1->addAction("Draw Line"); popup1->addAction("Draw Plane"); popup1->addAction("Draw Clip"); popup1->addAction("Background White"); popup1->addAction("Background Black"); popup1->addAction("Stereo Rendering"); connect(popup1, SIGNAL(triggered(QAction*)), this, SLOT(ProcessUserViewPortInteraction(QAction*))); std::cout << "Reading image " << imagename << "..." << std::endl; vtkBMPReader* bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(imagename.c_str()); bmpReader->Update(); std::cout << "Done" << std::endl; // Creating the texture std::cout << "Making a texture out of the image... " << std::endl; vtkTexture* texture = vtkTexture::New(); texture->SetInputConnection(bmpReader->GetOutputPort()); std::cout << "Done" << std::endl; // Import geometry from a VRML file vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(bmpReader->GetOutputPort()); //imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSize(600, 600); vtkDataSet *pDataset; // Import geometry from an OBJ file std::cout << "Reading OBJ file " << iname << "..." << std::endl; vtkOBJReader* reader = vtkOBJReader::New(); reader->SetFileName(iname.c_str()); reader->Update(); vtkPolyData *polyData2 = reader->GetOutput(); std::cout << "Obj reader = " << polyData2->GetNumberOfPoints() << std::endl; std::cout << "Obj point data = " << polyData2->GetPointData()->GetNumberOfArrays() << std::endl; std::cout << "Obj point data tuples = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfTuples() << polyData2->std::endl; std::cout << "Obj point data compon = " << polyData2->GetPointData()->GetArray(0)->GetNumberOfComponents() << std::endl; // //// Renderer vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInputData(polyData2); vtkActor* texturedQuad = vtkActor::New(); texturedQuad->SetMapper(mapper); texturedQuad->SetTexture(texture); //texturedQuad->SetPosition(0, 0, 0); // Create Normal Vectors to enhance smoothness & illumination vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputData(polyData2); normals->SetFeatureAngle(60.0); // Mapper vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); SolidMapper->SetInputData(normals->GetOutput()); SolidMapper->ScalarVisibilityOff(); // Actor vtkActor *SolidActor = vtkActor::New(); SolidActor->SetMapper(SolidMapper); vtkImageData* image = imageViewer->GetInput(); int dim[3]; image->GetDimensions(dim); double spacing[3]; image->GetSpacing(spacing); double origin[3]; image->GetOrigin(origin); renderer->ComputeVisiblePropBounds(bounds); Renderer->AddActor(SolidActor); Renderer->AddActor(texturedQuad); float Cx = (dim[0] * spacing[0]) / 2. + origin[0]; float Cy = (dim[1] * spacing[1]) / 2. + origin[1]; vtkCamera* m_Camera = vtkCamera::New(); m_Camera->SetPosition(Cx, Cy, 1); m_Camera->SetFocalPoint(Cx, Cy, 0); m_Camera->SetViewUp(0, 1, 0); m_Camera->GetDirectionOfProjection(); m_Camera->ParallelProjectionOn(); Renderer->SetActiveCamera(m_Camera); Renderer->SetBackground(0, 0, 0); // Background color white Renderer->ResetCamera(); qvtkWidget->GetRenderWindow()->AddRenderer(Renderer); qvtkWidget->GetRenderWindow()->Render(); //renderer->ResetCamera(); vtkIPWCallback* myCallback = vtkIPWCallback::New(); myCallback->renderer = Renderer; myCallback->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); myCallback->readerClip = vtkOBJReader::New(); myCallback->readerClip = reader; this->styleCallback = myCallback; //renderer->ResetCamera(); this->stylePicker->normalsKore = vtkSmartPointer::New(); this->stylePicker->normalsKore = normals; this->stylePicker->renderer = vtkSmartPointer::New(); this->stylePicker->actor = vtkActor::New(); this->stylePicker->mapper = vtkPolyDataMapper::New(); this->stylePicker->points = vtkSmartPointer::New(); this->stylePicker->vertices = vtkSmartPointer::New(); this->stylePicker->renderer = Renderer; this->stylePicker->renderWindowInteractor = qvtkWidget->GetRenderWindow()->GetInteractor(); vtkSmartPointer pointPicker = vtkSmartPointer::New(); qvtkWidget->GetRenderWindow()->GetInteractor()->SetPicker(pointPicker); qvtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(this- qvtkWidget->>sty lePicker); Connections = vtkEventQtSlotConnect::New(); Connections->Connect(qvtkWidget->GetRenderWindow()->GetInteractor(), vtkCommand::KeyPressEvent, this, SLOT(popup(vtkObject*, unsigned long, void*, void*, vtkCommand*)), popup1, 1.0); } MainWindow.h //Point PickFunction class MouseInteractorStyle2 : public vtkInteractorStyleTrackballCamera { public: std::vector pointList; std::vector pointListPlane; vtkSmartPointer matrix; vtkSmartPointer normalsKore = vtkSmartPointer::New(); vtkSmartPointer spherePickSource; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer vertices = vtkSmartPointer::New(); vtkSmartPointer polydata; vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkActor* actor; vtkPolyDataMapper* mapper; static MouseInteractorStyle2* New() { return new MouseInteractorStyle2; } //vtkTypeMacro(MouseInteractorStyle2, vtkInteractorStyleTrackballCamera); virtual void OnRightButtonDown() { int* clickPos = this->renderWindowInteractor->GetEventPosition(); // Pick from this location. vtkPropPicker* picker = vtkPropPicker::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); picker->Pick(clickPos[0], clickPos[1], 0, this->renderer); double* pos = picker->GetPickPosition(); std::cout << "Pick position (world coordinates) is: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; std::cout << "Picked actor: " << picker->GetActor() << std::endl; // Add label array. polydata = vtkSmartPointer::New(); spherePickSource = vtkSmartPointer::New(); spherePickSource->SetRadius(0.030); spherePickSource->SetCenter(pos[0], pos[1], pos[2]); if (pointList.size() < 2) { //pointList.clear(); pointList.push_back(pos); } if (pointListPlane.size() < 30) { pointListPlane.push_back(pos); } //Create a mapper and actor mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(spherePickSource->GetOutputPort()); actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); actor->GetProperty()->SetColor(1, 1, 1); this->renderer->AddActor(actor); vtkInteractorStyleTrackballCamera::OnRightButtonDown(); } private: }; Luis Vieira, Toronto - ON Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com ------------------------------ Message: 2 Date: Thu, 16 Jun 2016 16:06:08 -0600 From: David Gobbi To: VTK Developers , David Lonie Subject: [vtk-developers] Wrapping the new arrays Message-ID: Content-Type: text/plain; charset="utf-8" Hi David, Was it intended to have the new VTK data arrays wrapped in Python? They're all wrappable except for the vtkGenericDataArray (it's a special case). In order to wrap vtkSOADataArrayTemplate and the templated array types, Python would just have to be fooled into thinking that their superclass is vtkDataArray, similar to what is already done for the old array classes. That way, Python wouldn't have to deal with the problematic vtkGenericDataArray template. The Python wrappers can be told to instantiate the templates over the usual set of data types. This part is easy, it has already done for vtkArrayIteratorTemplate, vtkDenseArray, and vtkSparseArray. So I'm just wondering if wrapping these classes was part of the plan. I get an itch whenever C++ stuff is added to VTK that can't be used from Python :) - David -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Thu, 16 Jun 2016 23:47:52 -0400 From: Sankhesh Jhaveri To: Luis Vieira Cc: vtk-developers , vtkusers at vtk.org Subject: Re: [vtk-developers] Contents of vtk-developers Digest, Vol 146, Issue 17 -RE: vtkAxesActor within VTK 7.0 and QVTKWidget Message-ID: Content-Type: text/plain; charset="utf-8" Nice! Glad you found it. Sankhesh On Thu, Jun 16, 2016 at 4:40 PM, Luis Vieira wrote: > Hi Sankhesh, > > > > Got this, was missing those two highlighted yellow lines: > > > > viewPortOMWidget = vtkSmartPointer::New(); > > viewPortOMWidget->SetOrientationMarker(viewPortAxActor); > > viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); > > viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); > > * viewPortOMWidget**->**SetEnabled**(1);* //missing > > *viewPortOMWidget**->**InteractiveOn**();**//*missing > > > > Thank you, > > > > *Luis Vieira*, Toronto > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Sankhesh Jhaveri [mailto:sankhesh.jhaveri at kitware.com] > *Sent:* June 16, 2016 9:54 AM > *To:* Luis Vieira > *Cc:* vtk-developers ; vtkusers at vtk.org > *Subject:* Re: [vtk-developers] vtkAxesActor within VTK 7.0 and > QVTKWidget > > > > Hi Luis, > > > > I don't see anything obvious but I noticed that you are initializing > vtkRenderingOpenGL i.e. using the OpenGL backend. Mind trying the > OpenGL2 backend to find out whether the issue is specific to the old backend. > > > > Sankhesh > > > > > > > On Tue, Jun 14, 2016 at 3:20 PM, Luis Vieira > wrote: > > Hello everyone, > > > > I had migrated my VTK platform from 6.1 to 7.0. I had noticed some > changes, and one of those is giving me a hard work to do that is to > render > vtkSmartPointer::New() within QVTWidget. Previously, was > easily, with VTK 6.1. Now, I am trying that and I got the Cone > working/rendering well and its interactions. However, I haven't gotten > absolutely nothing on my viewport from my vtkAxesActor even been shown . > Following my code (C++), regarding that this works outside QVTWidget > viewport. > > > > I appreciate any ideas and help. > > ???????? > > #include "vtkRenderWindow.h" > > #include "vtkRenderer.h" > > #include "vtkRenderWindowInteractor.h" > > #include "vtkEventQtSlotConnect.h" > > #include "vtkCommand.h" > > #include "vtkConeSource.h" > > #include "vtkSphereSource.h" > > #include "vtkPolyDataMapper.h" > > #include "vtkActor.h" > > #include "vtkActorCollection.h" > > #include "vtkCaptionActor2D.h" > > #include "vtkTextActor.h" > > #include "vtkTextProperty.h" > > #include "vtkActor2D.h" > > #include "vtkAxesActor.h" > > #include "vtkOrientationMarkerWidget.h" > > #include "vtkInteractorStyle.h" > > #include "vtkTDxInteractorStyleCamera.h" > > #include "vtkTDxInteractorStyleSettings.h" > > #include "vtkInteractorStyleRubberBandPick.h" > > #include "vtkInteractorStyleTrackballCamera.h" > > #include "vtkInteractorStyleTrackball.h" > > #include "QVTKInteractorAdapter.h" > > #include "QVTKInteractor.h" > > #include "QVTKApplication.h" > > ??. > > . > > . > > . > > #include > > VTK_MODULE_INIT(vtkRenderingOpenGL); > > VTK_MODULE_INIT(vtkInteractionStyle); > > . > > . > > . > > > > Mainwindow.cpp > > > > Void procedure() > > { > > vtkRenderWindow* renwin = vtkRenderWindow::New(); > > renwin->StereoCapableWindowOn(); > > > > // Activate 3DConnexion device only on the left render > window. > > // QVTKWidget > > mainViewPort->SetUseTDx(true); // QVTKWidget = mainViewPort. > > > > mainViewPort->SetRenderWindow(renwin); > > renwin->Delete(); > > > > const double angleSensitivity = 0.02; > > const double translationSensitivity = 0.001; > > > > QVTKInteractor *iren = mainViewPort->GetInteractor(); > > vtkInteractorStyle *s = > > static_cast(iren-> > GetInteractorStyle()); > > vtkTDxInteractorStyleCamera *t = > > static_cast(s-> > GetTDxStyle()); > > > > t->GetSettings()->SetAngleSensitivity(angleSensitivity); > > t->GetSettings()->SetTranslationXSensitivity( > translationSensitivity); > > t->GetSettings()->SetTranslationYSensitivity( > translationSensitivity); > > t->GetSettings()->SetTranslationZSensitivity( > translationSensitivity); > > > > > > > > // add a renderer > > Ren1 = vtkRenderer::New(); > > mainViewPort->GetRenderWindow()->AddRenderer(Ren1); > > > > vtkConeSource* cone = vtkConeSource::New(); > > vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); > > mapper->SetInputConnection(cone->GetOutputPort()); > > vtkActor* actor = vtkActor::New(); > > actor->SetMapper(mapper); > > Ren1->AddViewProp(actor); > > actor->Delete(); > > mapper->Delete(); > > cone->Delete(); > > > > > > > > mainViewPort->GetRenderWindow()->Render(); > > > > viewPortAxActor = vtkSmartPointer::New(); > > viewPortAxActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetXAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetXAxisCaptionActor2D()->SetHeight(0.05); > > viewPortAxActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetYAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetYAxisCaptionActor2D()->SetHeight(0.05); > > viewPortAxActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()-> > SetColor(0, 0, 0); > > viewPortAxActor->GetZAxisCaptionActor2D()->SetWidth(0.05); > > viewPortAxActor->GetZAxisCaptionActor2D()->SetHeight(0.05); > > > > viewPortOMWidget = vtkSmartPointer::New(); > > viewPortOMWidget->SetOrientationMarker(viewPortAxActor); > > viewPortOMWidget->SetViewport(0.7, 0.0, 1.00, 0.3); > > viewPortOMWidget->SetInteractor(mainViewPort->GetInteractor()); > > > > . > > . > > . > > ..... > > } > > > > Any ideas? > > > > Thank you very much. > > > > *Luis Vieira*, Toronto > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > luis.vieira at vektore.com > > www.vektore.com > > > > > _______________________________________________ > 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: ------------------------------ Subject: Digest Footer _______________________________________________ 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 ------------------------------ End of vtk-developers Digest, Vol 146, Issue 22 *********************************************** From ben.boeckel at kitware.com Mon Jun 20 10:17:35 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 20 Jun 2016 10:17:35 -0400 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: Message-ID: <20160620141735.GB21536@megas.kitware.com> On Sun, Jun 19, 2016 at 17:35:00 +1000, Andrew Maclean wrote: > A cursory search reveals that the following VTK sources use std::auto_ptr: > ./ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp This seems to be handled by upstream: https://github.com/open-source-parsers/jsoncpp/blob/96d32b37eac518147f3d733012a6c28db3720328/src/lib_json/json_writer.cpp#L78 and our copy already has it: https://gitlab.kitware.com/third-party/jsoncpp/blob/master/src/lib_json/json_reader.cpp#L46 > Finally: > 2) vtkSmartPointer ... how does this fit in? To me it seems this similar to > std::shared_ptr. Could vtkSmartPointer just be a wrapper around > std::shared_ptr for new compilers (C++11 and newer)? As Shawn mentioned, vtkSmartPointer is not a std::shared_ptr. boost::intrusive_ptr would be more a more accurate replacement. --Ben From david.gobbi at gmail.com Mon Jun 20 10:59:11 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 20 Jun 2016 08:59:11 -0600 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: <20160620141735.GB21536@megas.kitware.com> References: <20160620141735.GB21536@megas.kitware.com> Message-ID: On Mon, Jun 20, 2016 at 8:17 AM, Ben Boeckel wrote: > > and our copy already has it: > > > https://gitlab.kitware.com/third-party/jsoncpp/blob/master/src/lib_json/json_reader.cpp#L46 I'm fond of simple solutions like that. Since we know it works, we could add the following to vtkConfigure.h.in, which is easier than adding a try-compile: #if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) #define VTK_HAS_STD_UNIQUE_PTR #endif Those three source files can use this in order to avoid the compiler warning (i.e. by using std::unique_ptr when available). I don't think we should actively encourage the use of std::unique_ptr yet. That can wait until we're ready to abandon the old compilers. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Jun 20 16:31:05 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 20 Jun 2016 16:31:05 -0400 Subject: [vtk-developers] VTK bug hackathon Message-ID: Hi folks, We are planning a VTK bug hackathon on July 6. Going forward, we would like this to be a monthly event during which the community comes together to address bugs reported to the tracker. It will be an all day event that we will host physically at Kitware Headquarters in Clifton Park, NY as well as online via Google Hangout. All are welcome to attend as long as they know the code base enough to fix bugs. Any questions? Comments? Any potential issue with the date? Best, -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Jun 20 17:36:06 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 20 Jun 2016 17:36:06 -0400 Subject: [vtk-developers] [vtkusers] VTK bug hackathon In-Reply-To: References: Message-ID: <20160620213606.GA1266@megas.kitware.com> On Mon, Jun 20, 2016 at 16:31:05 -0400, Berk Geveci wrote: > We are planning a VTK bug hackathon on July 6. Going forward, we would like > this to be a monthly event during which the community comes together to > address bugs reported to the tracker. It will be an all day event that we > will host physically at Kitware Headquarters in Clifton Park, NY as well as > online via Google Hangout. All are welcome to attend as long as they know > the code base enough to fix bugs. > > Any questions? Comments? Any potential issue with the date? We've converted from Mantis over to GitLab for CMake already. Do we want to do this before the first bug hackathon? Issue numbers can (and are likely to) be preserved. Pros: - it isn't Mantis; - issues can be properly labeled as they are looked at; this would help with future bug hackathons. Example labels based on the scheme CMake is using (more can be added during the hackathon): - area:build - area:doc - area:examples - area:parallel - area:rendering - driver:ati - driver:intel - driver:nvidia - os:linux - os:macos - os:windows - triage:ack - triage:easy - triage:feature - triage:needinfo - triage:regression - our current migration leaves comments and such behind (it links to the old issue for continuity), so any discussion done at the first hackathon will not be behind a link; - easier way to get others in on an issue (@mention with tab completion); - did I mention it isn't Mantis? Cons: - a shorter deadline for me to complete the migration. - ? It is possible to preserve authorship and assignment of issues if you'd like[1] . If you don't want this, assignment will be lost and kwrobot will be the "opener" of the issue. Closed issues will all be opened and closed by kwrobot without assignment (to help minimize the email storm). --Ben [1]If you'd like to be assigned your issues and automatically subscribed to those issues, *privately* email me your display username on Mantis and GitLab. As an example, here the display name of the reporter is "edice" and the assignee is "Haocheng Liu": http://www.paraview.org/Bug/view.php?id=16140 If you have multiple Mantis users, they can both be mapped to a single user. From david.gobbi at gmail.com Mon Jun 20 18:15:50 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 20 Jun 2016 16:15:50 -0600 Subject: [vtk-developers] [vtkusers] VTK bug hackathon In-Reply-To: <20160620213606.GA1266@megas.kitware.com> References: <20160620213606.GA1266@megas.kitware.com> Message-ID: On Mon, Jun 20, 2016 at 3:36 PM, Ben Boeckel wrote: > > > We've converted from Mantis over to GitLab for CMake already. Do we want > to do this before the first bug hackathon? Issue numbers can (and are > likely to) be preserved. > I have a strong preference to keep the bugs in Mantis until after the hackathon. Let's clear as many bugs as possible out of the old system before switching over to the new. One thing that mantis has on gitlab is speed. I don't know whether it's my laptop of the fact that I'm on the other side of the continent, but gitlab is painfully slow, while mantis (though ugly) is snappy. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Mon Jun 20 19:34:07 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 21 Jun 2016 09:34:07 +1000 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: <20160620141735.GB21536@megas.kitware.com> Message-ID: Ben, David, This is a much better suggestion than a try compile. I'll create a topic for this. Thanks Andrew On Tue, Jun 21, 2016 at 12:59 AM, David Gobbi wrote: > On Mon, Jun 20, 2016 at 8:17 AM, Ben Boeckel > wrote: > >> >> and our copy already has it: >> >> >> https://gitlab.kitware.com/third-party/jsoncpp/blob/master/src/lib_json/json_reader.cpp#L46 > > > I'm fond of simple solutions like that. Since we know it works, we could > add the following to vtkConfigure.h.in, which is easier than adding a > try-compile: > > #if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) > #define VTK_HAS_STD_UNIQUE_PTR > #endif > > Those three source files can use this in order to avoid the compiler > warning (i.e. by using std::unique_ptr when available). > > I don't think we should actively encourage the use of std::unique_ptr > yet. That can wait until we're ready to abandon the old compilers. > > - David > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tharun160190 at gmail.com Tue Jun 21 03:00:47 2016 From: tharun160190 at gmail.com (Tharun) Date: Tue, 21 Jun 2016 00:00:47 -0700 (MST) Subject: [vtk-developers] Is it possible to display of part of cone? Message-ID: <1466492447516-5738807.post@n5.nabble.com> I would like to know if it is possible to display a part of circular cone having a non-zero radius at both top and bottom? Thanks in Advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/Is-it-possible-to-display-of-part-of-cone-tp5738807.html Sent from the VTK - Dev mailing list archive at Nabble.com. From ben.boeckel at kitware.com Tue Jun 21 09:13:07 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 21 Jun 2016 09:13:07 -0400 Subject: [vtk-developers] [vtkusers] VTK bug hackathon In-Reply-To: References: <20160620213606.GA1266@megas.kitware.com> Message-ID: <20160621131307.GA16121@megas.kitware.com> On Mon, Jun 20, 2016 at 16:15:50 -0600, David Gobbi wrote: > I have a strong preference to keep the bugs in Mantis until after the > hackathon. Let's clear as many bugs as possible out of the old system > before switching over to the new. To be clear, the issues are being ported, so any issues we close will still have a presence in GitLab (they'll just be closed right after they're opened). > One thing that mantis has on gitlab is speed. I don't know whether it's my > laptop of the fact that I'm on the other side of the continent, but gitlab > is painfully slow, while mantis (though ugly) is snappy. Yeah, GitLab does have speed issues :( . I don't know where its performance bottlenecks lie, but I think a lot of it comes from rendering files with syntax highlighting and diffs which issues don't have nearly as much of. Could you try playing around on the CMake issue page to see how its performance feels? https://gitlab.kitware.com/cmake/cmake/issues --Ben From david.gobbi at gmail.com Tue Jun 21 09:44:52 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 21 Jun 2016 07:44:52 -0600 Subject: [vtk-developers] [vtkusers] VTK bug hackathon In-Reply-To: <20160621131307.GA16121@megas.kitware.com> References: <20160620213606.GA1266@megas.kitware.com> <20160621131307.GA16121@megas.kitware.com> Message-ID: On Tue, Jun 21, 2016 at 7:13 AM, Ben Boeckel wrote: > > > Could you try playing around on the CMake issue page to see how its > performance feels? > > https://gitlab.kitware.com/cmake/cmake/issues The performance for issues isn't as bad as for MRs. The real problem is that issues ported from Mantis have no actual description of the bug, instead they have a link to Mantis. This slows down the workflow. Correct me if I'm wrong, but with the ported issues we would: 1) locate the issue on gitlab, 2) click the provided link to see the bug description on mantis, 3) return to gitlab to modify the status. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Tue Jun 21 10:17:14 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 21 Jun 2016 10:17:14 -0400 Subject: [vtk-developers] VTK bug hackathon In-Reply-To: References: <20160620213606.GA1266@megas.kitware.com> <20160621131307.GA16121@megas.kitware.com> Message-ID: <57694C6A.1050702@kitware.com> On 06/21/2016 09:44 AM, David Gobbi wrote: > The real problem is that issues ported from Mantis have no actual > description of the bug, instead they have a link to Mantis. That was a choice we made for CMake because the Mantis issues are widely cited in the wild so we will keep it up permanently as a reference. Since we're keeping it up anyway we might as well avoid duplication. Also, the Mantis CSV export does not include the descriptions so it will take a bit more work to do the migration with them. For VTK and ParaView we can look at including the descriptions if necessary. > This slows down the workflow. > > Correct me if I'm wrong, but with the ported issues we would: > 1) locate the issue on gitlab, 2) click the provided link to > see the bug description on mantis, 3) return to gitlab to > modify the status. Yes. I was concerned about that at first for CMake but it has been surprisingly easy to work with the dual pages since the migration (e.g. via browser tabs). -Brad From berk.geveci at kitware.com Tue Jun 21 10:54:13 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 21 Jun 2016 10:54:13 -0400 Subject: [vtk-developers] VTK bug hackathon In-Reply-To: <57694C6A.1050702@kitware.com> References: <20160620213606.GA1266@megas.kitware.com> <20160621131307.GA16121@megas.kitware.com> <57694C6A.1050702@kitware.com> Message-ID: Brad reminded me that Mantis no longer allow new account registration (due to spam issues) so that may be a potential issue with using it. We can still make it work though; many of us have accounts anyway. I am fine with what others decide. I just didn't want to put undue pressure on Brad & Ben to make the transition quickly. On Tue, Jun 21, 2016 at 10:17 AM, Brad King wrote: > On 06/21/2016 09:44 AM, David Gobbi wrote: > > The real problem is that issues ported from Mantis have no actual > > description of the bug, instead they have a link to Mantis. > > That was a choice we made for CMake because the Mantis issues are > widely cited in the wild so we will keep it up permanently as a > reference. Since we're keeping it up anyway we might as well avoid > duplication. Also, the Mantis CSV export does not include the > descriptions so it will take a bit more work to do the migration > with them. > > For VTK and ParaView we can look at including the descriptions > if necessary. > > > This slows down the workflow. > > > > Correct me if I'm wrong, but with the ported issues we would: > > 1) locate the issue on gitlab, 2) click the provided link to > > see the bug description on mantis, 3) return to gitlab to > > modify the status. > > Yes. I was concerned about that at first for CMake but it has > been surprisingly easy to work with the dual pages since the > migration (e.g. via browser tabs). > > -Brad > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Jun 21 11:00:03 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 21 Jun 2016 11:00:03 -0400 Subject: [vtk-developers] std::auto_ptr replacement for modern compilers. In-Reply-To: References: <20160620141735.GB21536@megas.kitware.com> Message-ID: Yes! If possible I'd like us to avoid any try compile statements and especially any try run statements. When building multi-architecture frameworks configured try compile values cause all sorts of problems (there is one set of headers for a framework even though it may contain multiple architectures). Replacing them with conditionals in the headers is great if it can be done. I know Brad King has done some of that for VTK already. Maybe there are other solutions as well. On Mon, Jun 20, 2016 at 7:34 PM, Andrew Maclean wrote: > Ben, David, > > This is a much better suggestion than a try compile. I'll create a topic > for this. > > Thanks > Andrew > > On Tue, Jun 21, 2016 at 12:59 AM, David Gobbi > wrote: > >> On Mon, Jun 20, 2016 at 8:17 AM, Ben Boeckel >> wrote: >> >>> >>> and our copy already has it: >>> >>> >>> https://gitlab.kitware.com/third-party/jsoncpp/blob/master/src/lib_json/json_reader.cpp#L46 >> >> >> I'm fond of simple solutions like that. Since we know it works, we could >> add the following to vtkConfigure.h.in, which is easier than adding a >> try-compile: >> >> #if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) >> #define VTK_HAS_STD_UNIQUE_PTR >> #endif >> >> Those three source files can use this in order to avoid the compiler >> warning (i.e. by using std::unique_ptr when available). >> >> I don't think we should actively encourage the use of std::unique_ptr >> yet. That can wait until we're ready to abandon the old compilers. >> >> - David >> > > > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > > _______________________________________________ > 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 > > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Jun 21 11:39:22 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 21 Jun 2016 17:39:22 +0200 Subject: [vtk-developers] [vtkusers] VTK bug hackathon In-Reply-To: References: <20160620213606.GA1266@megas.kitware.com> <20160621131307.GA16121@megas.kitware.com> <57694C6A.1050702@kitware.com> Message-ID: I'd like to add review of merge requests to the agenda. On Jun 21, 2016 4:54 PM, "Berk Geveci" wrote: > Brad reminded me that Mantis no longer allow new account registration (due > to spam issues) so that may be a potential issue with using it. We can > still make it work though; many of us have accounts anyway. I am fine with > what others decide. I just didn't want to put undue pressure on Brad & Ben > to make the transition quickly. > > On Tue, Jun 21, 2016 at 10:17 AM, Brad King wrote: > >> On 06/21/2016 09:44 AM, David Gobbi wrote: >> > The real problem is that issues ported from Mantis have no actual >> > description of the bug, instead they have a link to Mantis. >> >> That was a choice we made for CMake because the Mantis issues are >> widely cited in the wild so we will keep it up permanently as a >> reference. Since we're keeping it up anyway we might as well avoid >> duplication. Also, the Mantis CSV export does not include the >> descriptions so it will take a bit more work to do the migration >> with them. >> >> For VTK and ParaView we can look at including the descriptions >> if necessary. >> >> > This slows down the workflow. >> > >> > Correct me if I'm wrong, but with the ported issues we would: >> > 1) locate the issue on gitlab, 2) click the provided link to >> > see the bug description on mantis, 3) return to gitlab to >> > modify the status. >> >> Yes. I was concerned about that at first for CMake but it has >> been surprisingly easy to work with the dual pages since the >> migration (e.g. via browser tabs). >> >> -Brad >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Jun 21 15:37:38 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 21 Jun 2016 15:37:38 -0400 Subject: [vtk-developers] Offscreen rendering OpenGL, linux, leaks memory In-Reply-To: References: Message-ID: Hi all, The leak was fixed in this additional merge request. https://gitlab.kitware.com/vtk/vtk/merge_requests/1574 Initially, I had debug code in my test which made it pass. Thanks Dave for prodding me to take a closer look. Dan On Mon, Jun 13, 2016 at 7:09 PM, Dan Lipsa wrote: > I'll take a look. > > On Mon, Jun 13, 2016 at 1:50 PM, David Lonie > wrote: > >> On Mon, Jun 13, 2016 at 12:42 PM, Dan Lipsa >> wrote: >> >>> As Dave suggested: comment bits out, rerun the test, repeat. >>> The leak was caused by display lists not being freed when the renderer >>> was removed from the render window. >>> >> >> Nice! Something still seems a little strange though. Was this code path >> not used for on-screen rendering? >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsangee at vt.edu Tue Jun 21 16:30:56 2016 From: bsangee at vt.edu (Sangeetha Banavathi Srinivasa) Date: Tue, 21 Jun 2016 16:30:56 -0400 Subject: [vtk-developers] QT_QMAKE_EXECUTABLE is not used when building VTK-7.0.0 Message-ID: <325D2ACA-8778-46F7-B889-43F7FDE8ABB0@vt.edu> Hi, I am trying to compile vtk-7.0.0 from source and when I use the option QT_QMAKE_EXECUTABLE with CMAKE to build VTK I get manually specified option ignored. Below is the cmake I am using: cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="%{INSTALL_DIR}" -DVTK_USE_SYSTEM_HDF5=ON -DVTK_USE_PARALLEL=ON -DVTK_USE_QT=ON -DVTK_USE_RENDERING=ON -DVTK_WRAP_PYTHON=ON -DPYTHON_EXECUTABLE=$PYTHON_BIN/python -DPYTHON_INCLUDE_DIR=$PYTHON_INC -DPYTHON_LIBRARY=$PYTHON_LIB/libpython2.7.so -DVTK_USE_TK=OFF -DQT_QMAKE_EXECUTABLE=$QT_BIN/qmake .. Below is the warning I see: CMake Warning: Manually-specified variables were not used by the project: QT_QMAKE_EXECUTABLE VTK_USE_PARALLEL VTK_USE_QT VTK_USE_RENDERING VTK_USE_TK Could you please let me know as to how I can build VTK using Parallel and QT Thanks, Sangeetha -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Jun 21 16:41:15 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 21 Jun 2016 16:41:15 -0400 Subject: [vtk-developers] QT_QMAKE_EXECUTABLE is not used when building VTK-7.0.0 In-Reply-To: <325D2ACA-8778-46F7-B889-43F7FDE8ABB0@vt.edu> References: <325D2ACA-8778-46F7-B889-43F7FDE8ABB0@vt.edu> Message-ID: ?Hi Sangeetha, The CMake variables for VTK have changed since VTK modularization . Variables like VTK_USE_QT, VTK_USE_RENDERING, VTK_USE_TK are obsolete since VTK 6. Because VTK is a large project, you should try running the cmake from the GUI (either the cmake-gui or ccmake) to figure out the variables you would need to change. For guidance on configuring VTK with cmake, take a look at this wiki page: http://www.vtk.org/Wiki/VTK/Configure_and_Build#Configure_VTK_with_CMake Hope that helps. Sankhesh On Tue, Jun 21, 2016 at 4:30 PM, Sangeetha Banavathi Srinivasa < bsangee at vt.edu> wrote: > Hi, > I am trying to compile vtk-7.0.0 from source and when I use the option > QT_QMAKE_EXECUTABLE with CMAKE to build VTK I get manually specified > option ignored. > > Below is the cmake I am using: > > cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="%{INSTALL_DIR}" -DVTK_USE_SYSTEM_HDF5=ON -DVTK_USE_PARALLEL=ON -DVTK_USE_QT=ON -DVTK_USE_RENDERING=ON -DVTK_WRAP_PYTHON=ON -DPYTHON_EXECUTABLE=$PYTHON_BIN/python -DPYTHON_INCLUDE_DIR=$PYTHON_INC -DPYTHON_LIBRARY=$PYTHON_LIB/ > libpython2.7.so -DVTK_USE_TK=OFF -DQT_QMAKE_EXECUTABLE=$QT_BIN/qmake .. > > > Below is the warning I see: > CMake Warning: > Manually-specified variables were not used by the project: > > QT_QMAKE_EXECUTABLE > VTK_USE_PARALLEL > VTK_USE_QT > VTK_USE_RENDERING > VTK_USE_TK > > Could you please let me know as to how I can build VTK using Parallel and > QT > > Thanks, > Sangeetha > > _______________________________________________ > 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 mathieu.westphal at kitware.com Thu Jun 23 08:15:48 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Thu, 23 Jun 2016 14:15:48 +0200 Subject: [vtk-developers] [vtkusers] VTK bug hackathon In-Reply-To: References: <20160620213606.GA1266@megas.kitware.com> <20160621131307.GA16121@megas.kitware.com> <57694C6A.1050702@kitware.com> Message-ID: Joachim and I will also be remotelly present ! Mathieu Westphal On Tue, Jun 21, 2016 at 5:39 PM, David E DeMarle wrote: > I'd like to add review of merge requests to the agenda. > On Jun 21, 2016 4:54 PM, "Berk Geveci" wrote: > >> Brad reminded me that Mantis no longer allow new account registration >> (due to spam issues) so that may be a potential issue with using it. We can >> still make it work though; many of us have accounts anyway. I am fine with >> what others decide. I just didn't want to put undue pressure on Brad & Ben >> to make the transition quickly. >> >> On Tue, Jun 21, 2016 at 10:17 AM, Brad King >> wrote: >> >>> On 06/21/2016 09:44 AM, David Gobbi wrote: >>> > The real problem is that issues ported from Mantis have no actual >>> > description of the bug, instead they have a link to Mantis. >>> >>> That was a choice we made for CMake because the Mantis issues are >>> widely cited in the wild so we will keep it up permanently as a >>> reference. Since we're keeping it up anyway we might as well avoid >>> duplication. Also, the Mantis CSV export does not include the >>> descriptions so it will take a bit more work to do the migration >>> with them. >>> >>> For VTK and ParaView we can look at including the descriptions >>> if necessary. >>> >>> > This slows down the workflow. >>> > >>> > Correct me if I'm wrong, but with the ported issues we would: >>> > 1) locate the issue on gitlab, 2) click the provided link to >>> > see the bug description on mantis, 3) return to gitlab to >>> > modify the status. >>> >>> Yes. I was concerned about that at first for CMake but it has >>> been surprisingly easy to work with the dual pages since the >>> migration (e.g. via browser tabs). >>> >>> -Brad >>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 > > 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 luis.vieira at vektore.com Thu Jun 23 10:27:58 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Thu, 23 Jun 2016 10:27:58 -0400 Subject: [vtk-developers] vtkThresholdTable - VTK 7.0 Message-ID: <1363e01d1cd5b$7151f690$53f5e3b0$@vektore.com> Hello guys, Any ideas about how to build a vtkThresholdTable with characters (e.g L,P,C,N) representing MinValue/ MaxValue? I have a python version but in C++ is returning NULL/empty. Following my code and the *.CSV I am trying to filter (simulate 3 distinct tables L=line Table; P=plane Table; C=cone Table) Thank you very much. Python # Set up filters for extracting feature types self.thresholders = {} for threshVals in [('line', 'K', 'M'), ('plane', 'O','Q'), ('cone', 'B', 'D')]: tt = vtkThresholdTable() tt.SetInputConnection(self.rdr.GetOutputPort()) tt.SetInputArrayToProcess(0, 0, 0, vtkDataObject.FIELD_ASSOCIATION_ROWS, 'Vector Type') tt.SetMinValue(vtkVariant(threshVals[1])) tt.SetMaxValue(vtkVariant(threshVals[2])) tt.SetMode(vtkThresholdTable.ACCEPT_BETWEEN) self.thresholders[threshVals[0]] = tt C++ const char* tnames [] = { "line", "plane", "cone" }; char tminmax [] = { 'K', 'M', 'O', 'Q', 'B', 'D' }; unsigned int numThresh = sizeof(tnames) / sizeof(tnames[0]); // == 3 for (unsigned ti = 0; ti < numThresh; ++ti) { thHoldTable = vtkSmartPointer::New(); thHoldTable->SetInputConnection(readerStructureData->GetOutputPort()); thHoldTable->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "Vector Type"); thHoldTable->SetMinValue(vtkVariant(tminmax[2*ti])); thHoldTable->SetMaxValue(vtkVariant(tminmax[2*ti+1])); thHoldTable->SetMode(vtkThresholdTable::ACCEPT_BETWEEN); thHoldTable->Update(); thresholders[tnames[ti]] = thHoldTable; } *.csv FElemID Structural Type Vector Type Depth Easting Northing Elevation SiteID Borehole_Dip Borehole_DipDirection CA Structure_Dip Structure_DipDirection Channel 1 Channel 2 Channel 3 1 Ctt P 0 0 0 2 FSEX-41 -47 137.2 60 75 1 1 1 1 Ctt P 0 0 0 0 FSEX-41 -47 137.2 0 0 1 1 1 2 Ctt L 1 1 1 2 FSEX-42 -46 135.9 0 0 7 1 1 2 Ctt L 1 1 1 1 FSEX-42 -46 135.9 45 0 7 1 1 2 Ctt L 1 1 1 0 FSEX-42 -46 135.9 60 45 7 1 1 3 Ctt C 2 2 0 2 FSEX-47 -45 30 5 1 1 1 3 Ctt C 2 2 0 1 FSEX-47 -45 30 45 1 1 1 3 Ctt C 2 2 0 0 FSEX-47 -45 30 85 1 1 1 Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Thu Jun 23 10:39:12 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Thu, 23 Jun 2016 10:39:12 -0400 Subject: [vtk-developers] vtkTable Filter By Column Message-ID: <13db901d1cd5d$02d9b610$088d2230$@vektore.com> Hello Guys Is possible to filter vtkTable by column? I have the following data within a vtkTable from a *.CSV file and I want to share this in three distinct tables as L=line table; P=plane table and C=cone table. I had posted here about vtkThresholdTable and the answers still not come. Following is my *CSV, and the referred column is Vector Type. I appreciate any help. FElemID Structural Type Vector Type Depth Easting Northing Elevation SiteID Borehole_Dip Borehole_DipDirection CA Structure_Dip Structure_DipDirection Channel 1 Channel 2 Channel 3 1 Ctt P 0 0 0 2 FSEX-41 -47 137.2 60 75 1 1 1 1 Ctt P 0 0 0 0 FSEX-41 -47 137.2 0 0 1 1 1 2 Ctt L 1 1 1 2 FSEX-42 -46 135.9 0 0 7 1 1 2 Ctt L 1 1 1 1 FSEX-42 -46 135.9 45 0 7 1 1 2 Ctt L 1 1 1 0 FSEX-42 -46 135.9 60 45 7 1 1 3 Ctt C 2 2 0 2 FSEX-47 -45 30 5 1 1 1 3 Ctt C 2 2 0 1 FSEX-47 -45 30 45 1 1 1 3 Ctt C 2 2 0 0 FSEX-47 -45 30 85 1 1 1 Luis Vieira, Toronto Consultant, Software Engineer Vektore Exploration Consulting Corporation luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Fri Jun 24 14:35:27 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Fri, 24 Jun 2016 14:35:27 -0400 Subject: [vtk-developers] VTKCamera vtk 7.0 Message-ID: <1cc4a01d1ce47$308a87c0$919f9740$@vektore.com> Hello, I want show up/open up my camera similar Paraview option +Y directly. Is anybody that knows how to render VTK Camera with Z+ (up), Y+ and X+ similar within ParaView, in the Toolbar option "Set view direction to +Y"? Thank you very much, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 444 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.emz Type: application/octet-stream Size: 902 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.png Type: image/png Size: 510 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image008.emz Type: application/octet-stream Size: 900 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image009.png Type: image/png Size: 517 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image010.emz Type: application/octet-stream Size: 902 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image011.png Type: image/png Size: 1868 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image012.png Type: image/png Size: 1998 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image013.png Type: image/png Size: 911 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image014.png Type: image/png Size: 400 bytes Desc: not available URL: From zhangjiang.dudu at gmail.com Sat Jun 25 00:42:40 2016 From: zhangjiang.dudu at gmail.com (=?utf-8?B?5byg5rGf?=) Date: Fri, 24 Jun 2016 23:42:40 -0500 Subject: [vtk-developers] convert unstructured grid data to exodusII Message-ID: <8345C8EC-9E04-44F9-8AF4-A56F6A8E96D0@gmail.com> Hi, Currently I want to convert an unstructured grid data to exodusII format. The input unstructured grid data has a cell type of wedge. But when I execute the following code, the output data contains TETRA cell type. Can anybody explain this? vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New(); reader->SetFileName(?input.vtk"); reader->Update(); vtkUnstructuredGrid *grid = reader->GetOutput(); vtkExodusIIWriter *writer = vtkExodusIIWriter::New(); writer->SetInputData(grid); writer->SetFileName(?output.e"); writer->Write(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Tue Jun 28 09:46:01 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 28 Jun 2016 09:46:01 -0400 Subject: [vtk-developers] VTK bug hackathon In-Reply-To: References: Message-ID: Hi folks, We are all set with July 6, 9-5 EDT. I reserved a large conference room at Kitware Headquarters in Clifton Park, NY. If you are interested in attending physically, please let me know. We will also have a Google Hangout running. Here is the link: https://hangouts.google.com/hangouts/_/kitware.com/vtk-hackathon I will check email regularly in the morning so please send me a note then if you have issues joining. Did I forget anything? Best, -berk On Mon, Jun 20, 2016 at 4:31 PM, Berk Geveci wrote: > Hi folks, > > We are planning a VTK bug hackathon on July 6. Going forward, we would > like this to be a monthly event during which the community comes together > to address bugs reported to the tracker. It will be an all day event that > we will host physically at Kitware Headquarters in Clifton Park, NY as well > as online via Google Hangout. All are welcome to attend as long as they > know the code base enough to fix bugs. > > Any questions? Comments? Any potential issue with the date? > > Best, > -berk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaolsvieira at gmail.com Tue Jun 28 12:58:39 2016 From: joaolsvieira at gmail.com (=?UTF-8?Q?Jo=C3=A3o_Luis?=) Date: Tue, 28 Jun 2016 12:58:39 -0400 Subject: [vtk-developers] vtkTable Filter By Column Message-ID: Hello Guys Is possible to filter vtkTable by column? I have the following data within a vtkTable from a *.CSV file and I want to share this in three distinct tables as L=line table; P=plane table and C=cone table. I had posted here about vtkThresholdTable and the answers still not come. Following is my *CSV, and the referred column is Vector Type. I appreciate any help. FElemID Structural Type Vector Type Depth Easting Northing Elevation SiteID Borehole_Dip Borehole_DipDirection CA Structure_Dip Structure_DipDirection Channel 1 Channel 2 Channel 3 1 Ctt P 0 0 0 2 FSEX-41 -47 137.2 60 75 1 1 1 1 Ctt P 0 0 0 0 FSEX-41 -47 137.2 0 0 1 1 1 2 Ctt L 1 1 1 2 FSEX-42 -46 135.9 0 0 7 1 1 2 Ctt L 1 1 1 1 FSEX-42 -46 135.9 45 0 7 1 1 2 Ctt L 1 1 1 0 FSEX-42 -46 135.9 60 45 7 1 1 3 Ctt C 2 2 0 2 FSEX-47 -45 30 5 1 1 1 3 Ctt C 2 2 0 1 FSEX-47 -45 30 45 1 1 1 3 Ctt C 2 2 0 0 FSEX-47 -45 30 85 1 1 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaolsvieira at gmail.com Tue Jun 28 12:59:37 2016 From: joaolsvieira at gmail.com (=?UTF-8?Q?Jo=C3=A3o_Luis?=) Date: Tue, 28 Jun 2016 12:59:37 -0400 Subject: [vtk-developers] vtkThresholdTable - VTK 7.0 Message-ID: Hello guys, Any ideas about how to build a vtkThresholdTable with characters (e.g L,P,C,N) representing MinValue/ MaxValue? I have a python version but in C++ is returning NULL/empty. Following my code and the *.CSV I am trying to filter (simulate 3 distinct tables L=line Table; P=plane Table; C=cone Table) Thank you very much. Python # Set up filters for extracting feature types self.thresholders = {} for threshVals in [('line', 'K', 'M'), ('plane', 'O','Q'), ('cone', 'B', 'D')]: tt = vtkThresholdTable() tt.SetInputConnection(self.rdr.GetOutputPort()) tt.SetInputArrayToProcess(0, 0, 0, vtkDataObject.FIELD_ASSOCIATION_ROWS, 'Vector Type') tt.SetMinValue(vtkVariant(threshVals[1])) tt.SetMaxValue(vtkVariant(threshVals[2])) tt.SetMode(vtkThresholdTable.ACCEPT_BETWEEN) self.thresholders[threshVals[0]] = tt C++ const char* tnames [] = { "line", "plane", "cone" }; char tminmax [] = { 'K', 'M', 'O', 'Q', 'B', 'D' }; unsigned int numThresh = sizeof(tnames) / sizeof(tnames[0]); // == 3 for (unsigned ti = 0; ti < numThresh; ++ti) { thHoldTable = vtkSmartPointer::New(); thHoldTable->SetInputConnection(readerStructureData->GetOutputPort ()); thHoldTable->SetInputArrayToProcess(0, 0, 0, vtkDataObject:: FIELD_ASSOCIATION_ROWS, "Vector Type"); thHoldTable->SetMinValue(vtkVariant(tminmax[2*ti])); thHoldTable->SetMaxValue(vtkVariant(tminmax[2*ti+1])); thHoldTable->SetMode(vtkThresholdTable::ACCEPT_BETWEEN); thHoldTable->Update(); thresholders[tnames[ti]] = thHoldTable; } *.csv FElemID Structural Type Vector Type Depth Easting Northing Elevation SiteID Borehole_Dip Borehole_DipDirection CA Structure_Dip Structure_DipDirection Channel 1 Channel 2 Channel 3 1 Ctt P 0 0 0 2 FSEX-41 -47 137.2 60 75 1 1 1 1 Ctt P 0 0 0 0 FSEX-41 -47 137.2 0 0 1 1 1 2 Ctt L 1 1 1 2 FSEX-42 -46 135.9 0 0 7 1 1 2 Ctt L 1 1 1 1 FSEX-42 -46 135.9 45 0 7 1 1 2 Ctt L 1 1 1 0 FSEX-42 -46 135.9 60 45 7 1 1 3 Ctt C 2 2 0 2 FSEX-47 -45 30 5 1 1 1 3 Ctt C 2 2 0 1 FSEX-47 -45 30 45 1 1 1 3 Ctt C 2 2 0 0 FSEX-47 -45 30 85 1 1 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.schroeder at kitware.com Thu Jun 30 09:50:17 2016 From: will.schroeder at kitware.com (Will Schroeder) Date: Thu, 30 Jun 2016 09:50:17 -0400 Subject: [vtk-developers] vtkDepthImageToPointCloud Message-ID: I'm adding a class to VTK that I am currently calling vtkDepthImageToPointCloud. It takes as input a depth image and optional scalar image plus a camera, and produces a point cloud (vtkPolyData) as output. The question is: I want to place it in VTK/Imaging/Hybrid. David G. has already created a vtkImageToPoints filter located there so it seems a natural fit. However, since it depends on a vtkCamera, it means extending module.cmake to depend on vtkRenderingCore in order to build properly. Is this okay? A better suggestion? Note that VTK/Filters/Hybrid already depends on vtkRenderingCore so this seems consistent. If I don't hear anything I'll move ahead. Best, W -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Jun 30 10:19:17 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 30 Jun 2016 10:19:17 -0400 Subject: [vtk-developers] vtkDepthImageToPointCloud In-Reply-To: References: Message-ID: You could do Rendering/Image as it already depends on the modules you need maybe. On Thu, Jun 30, 2016 at 9:50 AM, Will Schroeder wrote: > I'm adding a class to VTK that I am currently calling > vtkDepthImageToPointCloud. It takes as input a depth image and optional > scalar image plus a camera, and produces a point cloud (vtkPolyData) as > output. > > The question is: I want to place it in VTK/Imaging/Hybrid. David G. has > already created a vtkImageToPoints filter located there so it seems a > natural fit. However, since it depends on a vtkCamera, it means extending > module.cmake to depend on vtkRenderingCore in order to build properly. > > Is this okay? A better suggestion? Note that VTK/Filters/Hybrid already > depends on vtkRenderingCore so this seems consistent. If I don't hear > anything I'll move ahead. > > Best, > W > > -- > William J. Schroeder, PhD > Kitware, Inc. - Building the World's Technical Computing Software > 28 Corporate Drive > Clifton Park, NY 12065 > will.schroeder at kitware.com > http://www.kitware.com > (518) 881-4902 > > _______________________________________________ > 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 > > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jun 30 11:10:45 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 30 Jun 2016 09:10:45 -0600 Subject: [vtk-developers] vtkDepthImageToPointCloud In-Reply-To: References: Message-ID: Placing it in Rendering/Image should be fine as far as the dependencies go (and from the class name, it sounds like it will often be used together with a vtkRenderWindow). On Thu, Jun 30, 2016 at 8:19 AM, Ken Martin wrote: > You could do Rendering/Image as it already depends on the modules you need > maybe. > > On Thu, Jun 30, 2016 at 9:50 AM, Will Schroeder < > will.schroeder at kitware.com> wrote: > >> I'm adding a class to VTK that I am currently calling >> vtkDepthImageToPointCloud. It takes as input a depth image and optional >> scalar image plus a camera, and produces a point cloud (vtkPolyData) as >> output. >> >> The question is: I want to place it in VTK/Imaging/Hybrid. David G. has >> already created a vtkImageToPoints filter located there so it seems a >> natural fit. However, since it depends on a vtkCamera, it means extending >> module.cmake to depend on vtkRenderingCore in order to build properly. >> >> Is this okay? A better suggestion? Note that VTK/Filters/Hybrid already >> depends on vtkRenderingCore so this seems consistent. If I don't hear >> anything I'll move ahead. >> >> Best, >> W >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Thu Jun 30 15:30:53 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Thu, 30 Jun 2016 15:30:53 -0400 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs Message-ID: VTK's indentation style has been discussed several times, and it looks like we have agreement upon moving to a new style. I know there are some scripts to make this happen too. We were discussing this earlier internally - are there any remaining roadblocks. I see emails from David Gobbi in December 2015 saying it needs a little more time in the oven. Both of these changes would be stylistic, and both would likely cause merge conflicts. Ideally we could combine the two, and update our guidance on coding style at the same time. We would like to coordinate timing, but I think these changes are both well overdue. Objections, blockers, or thoughts? From bill.lorensen at gmail.com Thu Jun 30 15:41:24 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 30 Jun 2016 15:41:24 -0400 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs In-Reply-To: References: Message-ID: 1) I have no objection. This is great for developers. but 2) I also want to see efforts that improve VTK for customers, e.g. more algorithms, better code coverage, fewer bugs... Bill On Thu, Jun 30, 2016 at 3:30 PM, Marcus D. Hanwell wrote: > VTK's indentation style has been discussed several times, and it looks > like we have agreement upon moving to a new style. I know there are > some scripts to make this happen too. > > We were discussing this earlier internally - are there any remaining > roadblocks. I see emails from David Gobbi in December 2015 saying it > needs a little more time in the oven. > > Both of these changes would be stylistic, and both would likely cause > merge conflicts. Ideally we could combine the two, and update our > guidance on coding style at the same time. We would like to coordinate > timing, but I think these changes are both well overdue. > > Objections, blockers, or thoughts? > _______________________________________________ > 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 > -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Thu Jun 30 15:46:53 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 30 Jun 2016 13:46:53 -0600 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs In-Reply-To: References: Message-ID: On Thu, Jun 30, 2016 at 1:30 PM, Marcus D. Hanwell < marcus.hanwell at kitware.com> wrote: > VTK's indentation style has been discussed several times, and it looks > like we have agreement upon moving to a new style. I know there are > some scripts to make this happen too. > Utilities/Maintenance/vtk_reindent_code.py > We were discussing this earlier internally - are there any remaining > roadblocks. I see emails from David Gobbi in December 2015 saying it > needs a little more time in the oven. > On December 20, 2015, I finished the doxygen fix for the wrappers... so "a little more time" must have meant exactly that. I'm not aware of any current roadblocks, at least not as far as the wrappers are concerned. The wrappers understand doxygen comments well enough to generate the python docstrings from them. Just make sure that someone does QC on the doxygen comments before committing them. It will be a lot easier to tweak doc_header2doxygen.pl to make sure it produces tidy output, than it will be to fix up all the headers after the fact. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Thu Jun 30 15:59:30 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Thu, 30 Jun 2016 15:59:30 -0400 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs In-Reply-To: References: Message-ID: On Thu, Jun 30, 2016 at 3:46 PM, David Gobbi wrote: > On Thu, Jun 30, 2016 at 1:30 PM, Marcus D. Hanwell > wrote: >> >> VTK's indentation style has been discussed several times, and it looks >> like we have agreement upon moving to a new style. I know there are >> some scripts to make this happen too. > > Utilities/Maintenance/vtk_reindent_code.py > Thanks, for pointing out the location. >> >> We were discussing this earlier internally - are there any remaining >> roadblocks. I see emails from David Gobbi in December 2015 saying it >> needs a little more time in the oven. > > > On December 20, 2015, I finished the doxygen fix for the wrappers... > so "a little more time" must have meant exactly that. > > I'm not aware of any current roadblocks, at least not as far as the > wrappers are concerned. The wrappers understand doxygen comments > well enough to generate the python docstrings from them. Thanks David for the confirmation - glad it looks good from the wrapping side. > > Just make sure that someone does QC on the doxygen comments before > committing them. It will be a lot easier to tweak doc_header2doxygen.pl to > make sure it produces tidy output, than it will be to fix up all the headers > after the fact. > We will, agreed on tweaking the script rather than fixing up all the headers. I wanted to get confirmation that it wasn't a major issue to combine both of these sweeping changes together. We can discuss timing at the hackathon next week, and communicate it on this thread. From marcus.hanwell at kitware.com Thu Jun 30 16:06:56 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Thu, 30 Jun 2016 16:06:56 -0400 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs In-Reply-To: References: Message-ID: On Thu, Jun 30, 2016 at 3:41 PM, Bill Lorensen wrote: > 1) I have no objection. This is great for developers. > > but > > 2) I also want to see efforts that improve VTK for customers, e.g. > more algorithms, better code coverage, fewer bugs... > I am focusing exclusively on cosmetic code changes until you start coming out for beer with us again Bill :-) From sean at rogue-research.com Thu Jun 30 16:37:13 2016 From: sean at rogue-research.com (Sean McBride) Date: Thu, 30 Jun 2016 16:37:13 -0400 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs In-Reply-To: References: Message-ID: <20160630203713.1114207107@mail.rogue-research.com> On Thu, 30 Jun 2016 15:30:53 -0400, Marcus D. Hanwell said: >Both of these changes would be stylistic, and both would likely cause >merge conflicts. Ideally we could combine the two, and update our >guidance on coding style at the same time. We would like to coordinate >timing, but I think these changes are both well overdue. > >Objections, blockers, or thoughts? I'd really like to get this in first: 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 ben.boeckel at kitware.com Thu Jun 30 17:04:58 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 30 Jun 2016 17:04:58 -0400 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs In-Reply-To: <20160630203713.1114207107@mail.rogue-research.com> References: <20160630203713.1114207107@mail.rogue-research.com> Message-ID: <20160630210457.GA4150@rotor.kitware.com> On Thu, Jun 30, 2016 at 16:37:13 -0400, Sean McBride wrote: > I'd really like to get this in first: > I think any such expansive change should wait until after the hackathon so that the number of branches which will need rebased for conflicts. Also, is the script idempotent so that it can be run on branches to keep the style consistent? --Ben From david.gobbi at gmail.com Thu Jun 30 19:09:18 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 30 Jun 2016 17:09:18 -0600 Subject: [vtk-developers] Indentation style and converting to Doxygen style docs In-Reply-To: <20160630210457.GA4150@rotor.kitware.com> References: <20160630203713.1114207107@mail.rogue-research.com> <20160630210457.GA4150@rotor.kitware.com> Message-ID: Hi Ben, The scripts just modify the VTK source files. They don't call any git commands so I don't think they can, by themselves, be idempotent. Do you have any insights into what we can do to avoid conflicts? - David On Thu, Jun 30, 2016 at 3:04 PM, Ben Boeckel wrote: > On Thu, Jun 30, 2016 at 16:37:13 -0400, Sean McBride wrote: > > I'd really like to get this in first: > > > > I think any such expansive change should wait until after the hackathon > so that the number of branches which will need rebased for conflicts. > > Also, is the script idempotent so that it can be run on branches to keep > the style consistent? > > --Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: