From alican1812 at hotmail.com Sun Apr 1 05:12:15 2018 From: alican1812 at hotmail.com (alican) Date: Sun, 1 Apr 2018 02:12:15 -0700 (MST) Subject: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs Message-ID: <1522573935594-0.post@n5.nabble.com> Each time I am trying vtkBooleanOperationPolyDataFilter on 2 vtkTubeFilter outputs it crashes. If I replace vtkBooleanOperationPolyDataFilte with vtkLoopBooleanPolyDataFilter, I am getting the following warning and no results: Warning: In D:\Projects\VTK-8.0.1\Filters\General\vtkIntersectionPolyDataFilter.cxx, line 1668 vtkIntersectionPolyDataFilter (000001FB21E09CD0): No cell with correct orientation found ERROR: In D:\Projects\VTK-8.0.1\Common\ExecutionModel\vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (000001FB1DE385A0): Algorithm vtkIntersectionPolyDataFilter(000001FB21E09CD0) returned failure for request: vtkInformation (000001FB20E7EEA0) Debug: Off Modified Time: 177376 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FORWARD_DIRECTION: 0 FROM_OUTPUT_PORT: 0 ALGORITHM_AFTER_FORWARD: 1 ERROR: In D:\Projects\VTK-8.0.1\Common\ExecutionModel\vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (000001FB1DE38B90): Algorithm vtkLoopBooleanPolyDataFilter(000001FB2EEE8A90) returned failure for request: vtkInformation (000001FB211E9440) Debug: Off Modified Time: 177119 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FORWARD_DIRECTION: 0 FROM_OUTPUT_PORT: 0 ALGORITHM_AFTER_FORWARD: 1 What am I doing wrong? Source code attached: Source1.cpp And here is the stack > vtkCommonCore-8.0.dll!vtkAOSDataArrayTemplate::GetValue(__int64 valueIdx) Line 65 C++ vtkFiltersGeneral-8.0.dll!vtkBooleanOperationPolyDataFilter::SortPolyData(vtkPolyData * input, vtkIdList * interList, vtkIdList * unionList) Line 62 C++ vtkFiltersGeneral-8.0.dll!vtkBooleanOperationPolyDataFilter::RequestData(vtkInformation * __formal, vtkInformationVector * * inputVector, vtkInformationVector * outputVector) Line 154 C++ vtkCommonExecutionModel-8.0.dll!vtkPolyDataAlgorithm::ProcessRequest(vtkInformation * request, vtkInformationVector * * inputVector, vtkInformationVector * outputVector) Line 90 C++ vtkCommonExecutionModel-8.0.dll!vtkExecutive::CallAlgorithm(vtkInformation * request, int direction, vtkInformationVector * * inInfo, vtkInformationVector * outInfo) Line 775 C++ vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::ExecuteData(vtkInformation * request, vtkInformationVector * * inInfo, vtkInformationVector * outInfo) Line 491 C++ vtkCommonExecutionModel-8.0.dll!vtkCompositeDataPipeline::ExecuteData(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 179 C++ vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::ProcessRequest(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 274 C++ vtkCommonExecutionModel-8.0.dll!vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 328 C++ vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::UpdateData(int outputPort) Line 444 C++ vtkCommonExecutionModel-8.0.dll!vtkStreamingDemandDrivenPipeline::Update(int port, vtkInformationVector * requests) Line 403 C++ vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::Update(int port, vtkInformationVector * requests) Line 1466 C++ vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::Update(vtkInformation * requests) Line 1479 C++ vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::UpdatePiece(int piece, int numPieces, int ghostLevels, const int * extents) Line 1496 C++ vtkRenderingCore-8.0.dll!vtkPolyDataMapper::GetBounds() Line 132 C++ vtkRenderingCore-8.0.dll!vtkActor::GetBounds() Line 360 C++ vtkRenderingCore-8.0.dll!vtkRenderer::ComputeVisiblePropBounds(double * allBounds) Line 921 C++ vtkRenderingCore-8.0.dll!vtkRenderer::ResetCamera() Line 979 C++ Thanks AC -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jonathan.borduas at caboma.com Sun Apr 1 09:48:45 2018 From: jonathan.borduas at caboma.com (Jonathan Borduas) Date: Sun, 1 Apr 2018 13:48:45 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs In-Reply-To: <1522573935594-0.post@n5.nabble.com> References: <1522573935594-0.post@n5.nabble.com> Message-ID: If my memory is correct vtkTubeFilter generates cells of type TriangleStrip while boolean filters required Triangle cell. Try passing the tubes through a vtkTriangleFilter first. A vtkCleanPolydata and a vtkPolydataNormals wouldn?t hurt too. Jonathan Get Outlook for iOS _____________________________ From: alican Sent: Sunday, April 1, 2018 04:12 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs To: Each time I am trying vtkBooleanOperationPolyDataFilter on 2 vtkTubeFilter outputs it crashes. If I replace vtkBooleanOperationPolyDataFilte with vtkLoopBooleanPolyDataFilter, I am getting the following warning and no results: Warning: In D:\Projects\VTK-8.0.1\Filters\General\vtkIntersectionPolyDataFilter.cxx, line 1668 vtkIntersectionPolyDataFilter (000001FB21E09CD0): No cell with correct orientation found ERROR: In D:\Projects\VTK-8.0.1\Common\ExecutionModel\vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (000001FB1DE385A0): Algorithm vtkIntersectionPolyDataFilter(000001FB21E09CD0) returned failure for request: vtkInformation (000001FB20E7EEA0) Debug: Off Modified Time: 177376 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FORWARD_DIRECTION: 0 FROM_OUTPUT_PORT: 0 ALGORITHM_AFTER_FORWARD: 1 ERROR: In D:\Projects\VTK-8.0.1\Common\ExecutionModel\vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (000001FB1DE38B90): Algorithm vtkLoopBooleanPolyDataFilter(000001FB2EEE8A90) returned failure for request: vtkInformation (000001FB211E9440) Debug: Off Modified Time: 177119 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FORWARD_DIRECTION: 0 FROM_OUTPUT_PORT: 0 ALGORITHM_AFTER_FORWARD: 1 What am I doing wrong? Source code attached: Source1.cpp And here is the stack > vtkCommonCore-8.0.dll!vtkAOSDataArrayTemplate::GetValue(__int64 valueIdx) Line 65 C++ vtkFiltersGeneral-8.0.dll!vtkBooleanOperationPolyDataFilter::SortPolyData(vtkPolyData * input, vtkIdList * interList, vtkIdList * unionList) Line 62 C++ vtkFiltersGeneral-8.0.dll!vtkBooleanOperationPolyDataFilter::RequestData(vtkInformation * __formal, vtkInformationVector * * inputVector, vtkInformationVector * outputVector) Line 154 C++ vtkCommonExecutionModel-8.0.dll!vtkPolyDataAlgorithm::ProcessRequest(vtkInformation * request, vtkInformationVector * * inputVector, vtkInformationVector * outputVector) Line 90 C++ vtkCommonExecutionModel-8.0.dll!vtkExecutive::CallAlgorithm(vtkInformation * request, int direction, vtkInformationVector * * inInfo, vtkInformationVector * outInfo) Line 775 C++ vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::ExecuteData(vtkInformation * request, vtkInformationVector * * inInfo, vtkInformationVector * outInfo) Line 491 C++ vtkCommonExecutionModel-8.0.dll!vtkCompositeDataPipeline::ExecuteData(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 179 C++ vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::ProcessRequest(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 274 C++ vtkCommonExecutionModel-8.0.dll!vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 328 C++ vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::UpdateData(int outputPort) Line 444 C++ vtkCommonExecutionModel-8.0.dll!vtkStreamingDemandDrivenPipeline::Update(int port, vtkInformationVector * requests) Line 403 C++ vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::Update(int port, vtkInformationVector * requests) Line 1466 C++ vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::Update(vtkInformation * requests) Line 1479 C++ vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::UpdatePiece(int piece, int numPieces, int ghostLevels, const int * extents) Line 1496 C++ vtkRenderingCore-8.0.dll!vtkPolyDataMapper::GetBounds() Line 132 C++ vtkRenderingCore-8.0.dll!vtkActor::GetBounds() Line 360 C++ vtkRenderingCore-8.0.dll!vtkRenderer::ComputeVisiblePropBounds(double * allBounds) Line 921 C++ vtkRenderingCore-8.0.dll!vtkRenderer::ResetCamera() Line 979 C++ Thanks AC -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Sun Apr 1 10:45:42 2018 From: alican1812 at hotmail.com (alican) Date: Sun, 1 Apr 2018 07:45:42 -0700 (MST) Subject: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs In-Reply-To: References: <1522573935594-0.post@n5.nabble.com> Message-ID: <1522593942111-0.post@n5.nabble.com> Thanks for answering my question. I am already using vtkTriangleFilter and vtkButterflySubdivisionFilter to get fine triangle cells. Unfortunately, it didn't help. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Sun Apr 1 13:31:05 2018 From: lasso at queensu.ca (Andras Lasso) Date: Sun, 1 Apr 2018 17:31:05 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs In-Reply-To: <1522593942111-0.post@n5.nabble.com> References: <1522573935594-0.post@n5.nabble.com> , <1522593942111-0.post@n5.nabble.com> Message-ID: <7f49679b-723b-4388-bbe5-cb1837166e81@queensu.ca> I think Boolean mesh operations are the only filters in VTK that are broken - randomly produce somewhat incorrect results and sometimes cause crash. There were attempts in the past to fix them, but the task proved to be too difficult for everybody. If you clean the inputs and/or slightly dislocate them then you might get correct results. If you need a VTK-based solution that works for any input mesh then you can convert meshes to binary images, perform the Boolean operation on the images, and convert the result to mesh. Andras ________________________________ From: alican Sent: Sunday, April 1, 2018 10:45 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs Thanks for answering my question. I am already using vtkTriangleFilter and vtkButterflySubdivisionFilter to get fine triangle cells. Unfortunately, it didn't help. -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7C0f5fade427bd4e5ebfc908d597df4051%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636581907467177456&sdata=5KFNfyY8dXcMTkGPPkfWtmS9Kjgktzb0GdruZugnC%2Fk%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C0f5fade427bd4e5ebfc908d597df4051%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636581907467177456&sdata=I8mZtjSWDYzIYNY%2FnuIKHUr6HTSFoZ%2FoPXtpL0Ywfcs%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C0f5fade427bd4e5ebfc908d597df4051%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636581907467177456&sdata=Ui%2Fd16whWvIC7Rn5V4YST9yl432ZuRyll6bTwvxd1%2BU%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C0f5fade427bd4e5ebfc908d597df4051%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636581907467177456&sdata=2%2FR2GSSW80%2FzFztiT9G2WiZpHwlbzh4XV98OYsDnEDY%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C0f5fade427bd4e5ebfc908d597df4051%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636581907467177456&sdata=OxKRkbMsVT4B%2FWwaSXqnRk%2Fdd2mA2S3y1%2FYZsxuc%2FTc%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C0f5fade427bd4e5ebfc908d597df4051%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636581907467177456&sdata=ajtTkUW%2F2JHXy0w8MjW8eh9PIodA5vbb5tqg1ZHKnbo%3D&reserved=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sun Apr 1 14:41:54 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 1 Apr 2018 11:41:54 -0700 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs In-Reply-To: <1522573935594-0.post@n5.nabble.com> References: <1522573935594-0.post@n5.nabble.com> Message-ID: Your tubes have many coincident faces. If you shift one of the tubes in x,y,z you will get results. On Sun, Apr 1, 2018 at 2:12 AM, alican wrote: > Each time I am trying vtkBooleanOperationPolyDataFilter on 2 vtkTubeFilter > outputs it crashes. > > If I replace vtkBooleanOperationPolyDataFilte with > vtkLoopBooleanPolyDataFilter, I am getting the following warning and no > results: > > Warning: In > D:\Projects\VTK-8.0.1\Filters\General\vtkIntersectionPolyDataFilter.cxx, > line 1668 > vtkIntersectionPolyDataFilter (000001FB21E09CD0): No cell with correct > orientation found > > ERROR: In D:\Projects\VTK-8.0.1\Common\ExecutionModel\vtkExecutive.cxx, line > 784 > vtkCompositeDataPipeline (000001FB1DE385A0): Algorithm > vtkIntersectionPolyDataFilter(000001FB21E09CD0) returned failure for > request: vtkInformation (000001FB20E7EEA0) > Debug: Off > Modified Time: 177376 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_DATA > FORWARD_DIRECTION: 0 > FROM_OUTPUT_PORT: 0 > ALGORITHM_AFTER_FORWARD: 1 > > ERROR: In D:\Projects\VTK-8.0.1\Common\ExecutionModel\vtkExecutive.cxx, line > 784 > vtkCompositeDataPipeline (000001FB1DE38B90): Algorithm > vtkLoopBooleanPolyDataFilter(000001FB2EEE8A90) returned failure for request: > vtkInformation (000001FB211E9440) > Debug: Off > Modified Time: 177119 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_DATA > FORWARD_DIRECTION: 0 > FROM_OUTPUT_PORT: 0 > ALGORITHM_AFTER_FORWARD: 1 > > > What am I doing wrong? Source code attached: > Source1.cpp > > And here is the stack > >> vtkCommonCore-8.0.dll!vtkAOSDataArrayTemplate::GetValue(__int64 > valueIdx) Line 65 C++ > > vtkFiltersGeneral-8.0.dll!vtkBooleanOperationPolyDataFilter::SortPolyData(vtkPolyData > * input, vtkIdList * interList, vtkIdList * unionList) Line 62 C++ > > vtkFiltersGeneral-8.0.dll!vtkBooleanOperationPolyDataFilter::RequestData(vtkInformation > * __formal, vtkInformationVector * * inputVector, vtkInformationVector * > outputVector) Line 154 C++ > > vtkCommonExecutionModel-8.0.dll!vtkPolyDataAlgorithm::ProcessRequest(vtkInformation > * request, vtkInformationVector * * inputVector, vtkInformationVector * > outputVector) Line 90 C++ > vtkCommonExecutionModel-8.0.dll!vtkExecutive::CallAlgorithm(vtkInformation > * request, int direction, vtkInformationVector * * inInfo, > vtkInformationVector * outInfo) Line 775 C++ > > vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::ExecuteData(vtkInformation > * request, vtkInformationVector * * inInfo, vtkInformationVector * outInfo) > Line 491 C++ > > vtkCommonExecutionModel-8.0.dll!vtkCompositeDataPipeline::ExecuteData(vtkInformation > * request, vtkInformationVector * * inInfoVec, vtkInformationVector * > outInfoVec) Line 179 C++ > > vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::ProcessRequest(vtkInformation > * request, vtkInformationVector * * inInfoVec, vtkInformationVector * > outInfoVec) Line 274 C++ > > vtkCommonExecutionModel-8.0.dll!vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation > * request, vtkInformationVector * * inInfoVec, vtkInformationVector * > outInfoVec) Line 328 C++ > vtkCommonExecutionModel-8.0.dll!vtkDemandDrivenPipeline::UpdateData(int > outputPort) Line 444 C++ > > vtkCommonExecutionModel-8.0.dll!vtkStreamingDemandDrivenPipeline::Update(int > port, vtkInformationVector * requests) Line 403 C++ > vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::Update(int port, > vtkInformationVector * requests) Line 1466 C++ > vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::Update(vtkInformation * > requests) Line 1479 C++ > vtkCommonExecutionModel-8.0.dll!vtkAlgorithm::UpdatePiece(int piece, int > numPieces, int ghostLevels, const int * extents) Line 1496 C++ > vtkRenderingCore-8.0.dll!vtkPolyDataMapper::GetBounds() Line 132 C++ > vtkRenderingCore-8.0.dll!vtkActor::GetBounds() Line 360 C++ > vtkRenderingCore-8.0.dll!vtkRenderer::ComputeVisiblePropBounds(double * > allBounds) Line 921 C++ > vtkRenderingCore-8.0.dll!vtkRenderer::ResetCamera() Line 979 C++ > > > Thanks > AC > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From alican1812 at hotmail.com Sun Apr 1 16:19:36 2018 From: alican1812 at hotmail.com (alican) Date: Sun, 1 Apr 2018 13:19:36 -0700 (MST) Subject: [vtkusers] vtkBooleanOperationPolyDataFilter crashes while trying to intersect 2 vtkTubeFilter outputs In-Reply-To: References: <1522573935594-0.post@n5.nabble.com> Message-ID: <1522613976861-0.post@n5.nabble.com> Thank you for answering, Bill. I am trying to split my mesh into parts by cutting it along free lines defined by user. These user-defined lines may be and very often would be crisscrossing, so I need to know what parts cut by lines 1...n are intersecting the line number n+1 in order to cut them again. As lines are drawn on the surface of my mesh there are by definition many coincident faces. I have tried vtkIntersectionPolydataFilter and both boolean filters to no avail. I would be very grateful for any advice. AC -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From zozonmr at gmail.com Sun Apr 1 18:16:15 2018 From: zozonmr at gmail.com (Zoltan Takacs) Date: Sun, 1 Apr 2018 23:16:15 +0100 Subject: [vtkusers] Compiling the scatterplot example without cmake Message-ID: <4d060469-da98-872d-6a80-98f890034404@gmail.com> Hi, I have general question about how to compile code without using cmake. I have downloaded the scatterplot example because I wanted start from something simple. The cmake type of compilation works and the executable provides the plot. However when I try to compile it without cmake I get a segmentation fault error. This is how I modified the include list: #include #include #include #include #include #include #include #include #include #include #include I added the following lines: #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingContextOpenGL); VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); The code compiles like this and the compiler does not complain however when I run it then it quits with segmentation fault. My guess (and only a guess) that this line causes the trouble: view->GetInteractor()->Start(); Why is the seg. fault happening? Thanks From polly_sukting at hotmail.com Mon Apr 2 03:35:45 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Mon, 2 Apr 2018 07:35:45 +0000 Subject: [vtkusers] Clustering Kmeans with marker Message-ID: Hi, Any idea on how to cluster the data by giving different marker to each of the Cluster ID in KMeans Clustering? I could only get the coordinate (centroid) as a return, but I couldnt get the clusters in group/coloured. Thank you. Regards, Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From lorfalwit at gmail.com Mon Apr 2 06:00:52 2018 From: lorfalwit at gmail.com (lor fal) Date: Mon, 2 Apr 2018 18:00:52 +0800 Subject: [vtkusers] Render images in threads other than main thread Message-ID: Hi all: I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I trying to call vtkRenderWindowInteractor::Render in worker thread, it always report error like "makeCurrent() error", which seems something wrong while changing OpenGL context. I have googled my questions and found some suggestions but none of them could work. Does anybody know exactly how to render images in worker thread? Thanks in advance. -- Best regards, Hugh Lo -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Mon Apr 2 06:31:59 2018 From: nztoddler at yahoo.com (Todd) Date: Mon, 02 Apr 2018 22:31:59 +1200 Subject: [vtkusers] Render images in threads other than main thread In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Mon Apr 2 19:04:31 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 3 Apr 2018 09:04:31 +1000 Subject: [vtkusers] =?utf-8?q?=E2=80=8B__Compiling_the_scatterplot_exampl?= =?utf-8?q?e_without_cmake?= Message-ID: You are wasting your time taking this approach. You have missing dependencies and, since you are not using CMake, you are largely on your own sorting these out. VTK is built using CMake and, by using CMake in your own code base, you will ensure that all the dependencies will be automatically found for you. If you don't want to use CMake, then this may help: VTK/Utilities/Maintenance/WhatModulesVTK.py Andrew > > ---------- Forwarded message ---------- > From: Zoltan Takacs > To: vtkusers at vtk.org > Cc: > Bcc: > Date: Sun, 1 Apr 2018 23:16:15 +0100 > Subject: > ?? > [vtkusers] Compiling the scatterplot example without cmake > Hi, > > I have general question about how to compile code without using cmake. I > have downloaded the scatterplot example because I wanted start from > something simple. The cmake type of compilation works and the executable > provides the plot. However when I try to compile it without cmake I get a > segmentation fault error. This is how I modified the include list: > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > I added the following lines: > > #include > > VTK_MODULE_INIT(vtkRenderingOpenGL); > VTK_MODULE_INIT(vtkRenderingContextOpenGL); > VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); > VTK_MODULE_INIT(vtkInteractionStyle); > > The code compiles like this and the compiler does not complain however > when I run it then it quits with segmentation fault. My guess (and only a > guess) that this line causes the trouble: > > view->GetInteractor()->Start(); > > Why is the seg. fault happening? > > Thanks > > > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan.stefanescu at accent.ro Tue Apr 3 03:23:22 2018 From: bogdan.stefanescu at accent.ro (vtk_noob) Date: Tue, 3 Apr 2018 00:23:22 -0700 (MST) Subject: [vtkusers] Large volume render + box/line intersection Message-ID: <1522740202712-0.post@n5.nabble.com> Hello everybody, I am new to vtk so please go easy on me I have written some code that creates a volume made of "voxels" - basically a *glyph3d* with a *cubeSource* as the base element and a *polyData* with the "voxel" (center) coordinates as the input data for the glyph. The main point of the code is to compute the intersection of a line with the above mentioned volume and the length through each voxel - I`m using the *vtkBox::IntersectWithLine*, so when I`m creating the polyData I`m also creating a "bounds" array that will contain the bounds of each "voxel". I`ve gotten satisfactory results with small volumes, but what I need in the end is to use a 250x250x250 "voxels" volume. I`ve managed to display about 8mil voxels, although the FPS is terrible... Should I have taken a different approach to this? Would the OBBTree (IntersectWithLine) be better suited for this? Regarding the rendering, I`m getting some strange behavior: the program uses around 6-7GB (RAM) to generate everything and up to a total of 10-12GB after the volume has been displayed. This is just for the rendering (8 million voxels), I`m writing the intersection results in separate files, on the HDD. After a couple of minutes this drops to a couple of GB and in the end to just 500MB... is this normal (some sort of garbage collection)? Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mathieu.westphal at kitware.com Tue Apr 3 03:48:52 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Tue, 3 Apr 2018 09:48:52 +0200 Subject: [vtkusers] Render images in threads other than main thread In-Reply-To: References: Message-ID: Hi Hugh QVTKOpenGLWidget is currently undergoing a complete redesign, the new version should be avaible shortly. In any case you can test it beforehand by compiling a specific developement branch of VTK, that can be found here: https://gitlab.kitware.com/vtk/vtk/merge_requests/3745 Best, Mathieu Westphal On Mon, Apr 2, 2018 at 12:31 PM, Todd via vtkusers wrote: > Hi Hugh > > GUI elements are normally only updated on the main thread, so I suspect > you need to synchronize your callback from the worker thread. I'm not > familiar with Qt, but it seems to be documented. > http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3 > > Todd > > > On 2 Apr 2018 10:00 p.m., lor fal wrote: > > Hi all: > > I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I > trying to call vtkRenderWindowInteractor::Render in worker thread, it > always report error like "makeCurrent() error", which seems something wrong > while changing OpenGL context. I have googled my questions and found some > suggestions but none of them could work. > > Does anybody know exactly how to render images in worker thread? > > Thanks in advance. > > -- > Best regards, > Hugh Lo > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Tue Apr 3 06:54:03 2018 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Tue, 3 Apr 2018 12:54:03 +0200 Subject: [vtkusers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Many thanks Bill for this big effort! Having the text searchable and (hyper-) linked to other parts/refs is a very great help. On 29/03/18 21:22, Bill Lorensen wrote: > Folks, > > Following my "bull in the china shop" approach to design by committee, > I have converted Chapter 6 of the VTK Textbook to markdown and the > mkdocs flavor. > > See: https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter6/ > > This approach is meant to be a Strawman. > > Here is what I did: > > 1) I used pandoc to convert the VTK Textbook PDF to .txt and .md > files. The conversion of the main text was excellent. Figures, tables, > and equations not so good. > > 2) I cleaned up much of the cruft manually with emacs. > > 3) I added links to all of the VTKBookFigures > (https://lorensen.github.io/VTKExamples/site/VTKBookFigures/). Andrew > and I had created these a while ago. The figures contain links to the > C++ and Python code that generated the figures. > > 4) The chapter passes through the normal ScrapeRepo and > SyncSiteWithRepo scripts that are used to maintain the static website. > As part of this process, I insert doxygen links to any vtk class > mentioned in the document. I still have a small issue with this > process. > > Once I figured out an approach to handle figures, it took about 8 > hours of manual labor to convert the chapter. > > What needs to be done on the Chapter 6 Strawman? > > 1) Add the math. > > 2) Add the non-vtk generated figures. > > 3) More cleanup. > > Other than 1 and 2, I will continue on cleanup. > > There are several future issues. > > Converting the text to markdown does not require a brain surgeon. But, > editing the content to modern VTK will require more effort. Also, > there are lots of old concepts. Andrew and I have already converted< > all of the .tcl scripts to C++ and Python. They exist as examples on > this page (https://lorensen.github.io/VTKExamples/site/VTKBookFigures/). > But subjects like the web should probably be replaced with the > javascript stuff that is going on at Kitware. > > Also, there are concepts that are not addressed in the current VTK > Textbook including shaders, color management, etc. > > Please provide feedback/suggestions. I don't have much skin in this > game. If the approach looks wrong I'll gladly remove the current > strawman and reconcentrate my efforts on making the VTKExamples > better. > > > Bill > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Medizinische Hochschule Hannover Institut f?r Funktionelle und Angewandte Anatomie OE 4120, Carl-Neuberg-Str. 1, 30625 Hannover, Deutschland Tel. +49 511 532-2900 grothausmann.roman at mh-hannover.de http://www.mh-hannover.de/anatomie.html From elvis.stansvik at orexplore.com Tue Apr 3 09:01:44 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 3 Apr 2018 15:01:44 +0200 Subject: [vtkusers] Render images in threads other than main thread In-Reply-To: References: Message-ID: 2018-04-03 9:48 GMT+02:00 Mathieu Westphal : > Hi Hugh > > QVTKOpenGLWidget is currently undergoing a complete redesign, the new > version should be avaible shortly. > In any case you can test it beforehand by compiling a specific developement > branch of VTK, that can be found here: > https://gitlab.kitware.com/vtk/vtk/merge_requests/3745 I have to jump in and ask: This new class doesn't make it safe to call Render() from threads other than the UI thread, right? Or does it change things wrt to threading vs the old QOpenGLWidget? Just asking so there are no misunderstandings. Elvis > > Best, > > > Mathieu Westphal > > On Mon, Apr 2, 2018 at 12:31 PM, Todd via vtkusers wrote: >> >> Hi Hugh >> >> GUI elements are normally only updated on the main thread, so I suspect >> you need to synchronize your callback from the worker thread. I'm not >> familiar with Qt, but it seems to be documented. >> http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3 >> >> Todd >> >> >> On 2 Apr 2018 10:00 p.m., lor fal wrote: >> >> Hi all: >> >> I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I >> trying to call vtkRenderWindowInteractor::Render in worker thread, it always >> report error like "makeCurrent() error", which seems something wrong while >> changing OpenGL context. I have googled my questions and found some >> suggestions but none of them could work. >> >> Does anybody know exactly how to render images in worker thread? >> >> Thanks in advance. >> >> -- >> Best regards, >> Hugh Lo >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > From elvis.stansvik at orexplore.com Tue Apr 3 09:09:01 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 3 Apr 2018 15:09:01 +0200 Subject: [vtkusers] Render images in threads other than main thread In-Reply-To: References: Message-ID: 2018-04-03 15:01 GMT+02:00 Elvis Stansvik : > 2018-04-03 9:48 GMT+02:00 Mathieu Westphal : >> Hi Hugh >> >> QVTKOpenGLWidget is currently undergoing a complete redesign, the new >> version should be avaible shortly. >> In any case you can test it beforehand by compiling a specific developement >> branch of VTK, that can be found here: >> https://gitlab.kitware.com/vtk/vtk/merge_requests/3745 > > I have to jump in and ask: This new class doesn't make it safe to call > Render() from threads other than the UI thread, right? Or does it > change things wrt to threading vs the old QOpenGLWidget? vs the old QVTKOpenGLWidget I mean of course.. Elvis > > Just asking so there are no misunderstandings. > > Elvis > >> >> Best, >> >> >> Mathieu Westphal >> >> On Mon, Apr 2, 2018 at 12:31 PM, Todd via vtkusers wrote: >>> >>> Hi Hugh >>> >>> GUI elements are normally only updated on the main thread, so I suspect >>> you need to synchronize your callback from the worker thread. I'm not >>> familiar with Qt, but it seems to be documented. >>> http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3 >>> >>> Todd >>> >>> >>> On 2 Apr 2018 10:00 p.m., lor fal wrote: >>> >>> Hi all: >>> >>> I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I >>> trying to call vtkRenderWindowInteractor::Render in worker thread, it always >>> report error like "makeCurrent() error", which seems something wrong while >>> changing OpenGL context. I have googled my questions and found some >>> suggestions but none of them could work. >>> >>> Does anybody know exactly how to render images in worker thread? >>> >>> Thanks in advance. >>> >>> -- >>> Best regards, >>> Hugh Lo >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> From jamil.goettlich at gmail.com Tue Apr 3 11:44:57 2018 From: jamil.goettlich at gmail.com (Jamil Goettlich) Date: Tue, 3 Apr 2018 17:44:57 +0200 Subject: [vtkusers] Build Error concerning VTK's OpenVR Module Message-ID: Hello VTK Users, I am having trouble compiling VTK's OpenVR Module. I am using Visual Studio 15 2017 Win64 compiler on a Windows 10 machine. I linked include files and the library from the openVR Module: https://github.com/ValveSoftware/openvr I also downloaded SDL2, but it was not asked within the configuring process. The error I get in Visual Studio is the following: Error C2039 'IsInputFocusCapturedByAnotherProcess': is not a member of 'vr::IVRSystem' Project: vtkRenderingOpenVR C:\Tools\VTK-8.1.0\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx line 281 What am I doing wrong in the build process? Did I forget to link anything? Thanks a lot, Jamil -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Apr 3 12:06:20 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 3 Apr 2018 09:06:20 -0700 Subject: [vtkusers] VTKBook Strawman - Chapter 3 Message-ID: Folks, Take a look at: https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter3/ In this Chapter, 1) Replaced badly converted equations with an admonition. 2) Added an admonition for missing examples. 3) Most importantly, I was able to extract the manually created figures. The graphics converted just fine, but no text. I added the text to these figures. There is still some work to be done on the chapter. Notably recovering the equations. I'm looking for ways to do this. This effort will require access to the original Framemaker files, possibly requiring an export from FrameMaker to a more portable format than .fm files.\ I also converted the Preface and Introduction: https://lorensen.github.io/VTKExamples/site/VTKBook/Preface/ https://lorensen.github.io/VTKExamples/site/VTKBook/Introduction/ As usual, please reply with comments. Bill From ken.martin at kitware.com Tue Apr 3 12:15:56 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 3 Apr 2018 12:15:56 -0400 Subject: [vtkusers] Build Error concerning VTK's OpenVR Module In-Reply-To: References: Message-ID: Nah, they (steam/openvr) just changed the API and removed that function. You can remove it in your copy of VTK or I'll push a patch later today to do it. Thanks! Ken On Tue, Apr 3, 2018 at 11:44 AM, Jamil Goettlich wrote: > Hello VTK Users, > > I am having trouble compiling VTK's OpenVR Module. I am using Visual > Studio 15 2017 Win64 compiler on a Windows 10 machine. > I linked include files and the library from the openVR Module: > https://github.com/ValveSoftware/openvr > I also downloaded SDL2, but it was not asked within the configuring > process. > The error I get in Visual Studio is the following: > Error C2039 'IsInputFocusCapturedByAnotherProcess': is not a member of > 'vr::IVRSystem' Project: vtkRenderingOpenVR C:\Tools\VTK-8.1.0\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx line 281 > > What am I doing wrong in the build process? Did I forget to link anything? > > Thanks a lot, > Jamil > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 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 jamil.goettlich at gmail.com Tue Apr 3 12:29:02 2018 From: jamil.goettlich at gmail.com (Jamil Goettlich) Date: Tue, 3 Apr 2018 18:29:02 +0200 Subject: [vtkusers] Build Error concerning VTK's OpenVR Module In-Reply-To: References: Message-ID: Hi Ken, thanks alot for the fast answer, it compiles now! I just commented the two error lines out and removed the bool "bIsInputCapturedByAnotherProcess" from another if-condition. Thanks, Jamil 2018-04-03 18:15 GMT+02:00 Ken Martin : > Nah, they (steam/openvr) just changed the API and removed that function. > You can remove it in your copy of VTK or I'll push a patch later today to > do it. > > Thanks! > Ken > > On Tue, Apr 3, 2018 at 11:44 AM, Jamil Goettlich < > jamil.goettlich at gmail.com> wrote: > >> Hello VTK Users, >> >> I am having trouble compiling VTK's OpenVR Module. I am using Visual >> Studio 15 2017 Win64 compiler on a Windows 10 machine. >> I linked include files and the library from the openVR Module: >> https://github.com/ValveSoftware/openvr >> I also downloaded SDL2, but it was not asked within the configuring >> process. >> The error I get in Visual Studio is the following: >> Error C2039 'IsInputFocusCapturedByAnotherProcess': is not a member of >> 'vr::IVRSystem' Project: vtkRenderingOpenVR >> C:\Tools\VTK-8.1.0\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx line 281 >> >> What am I doing wrong in the build process? Did I forget to link anything? >> >> Thanks a lot, >> Jamil >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > 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 cory.quammen at kitware.com Tue Apr 3 13:04:37 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 3 Apr 2018 13:04:37 -0400 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: Wow, that looks really nice, Bill! On Tue, Apr 3, 2018 at 12:06 PM, Bill Lorensen wrote: > Folks, > > Take a look at: https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter3/ > > In this Chapter, > > 1) Replaced badly converted equations with an admonition. > > 2) Added an admonition for missing examples. > > 3) Most importantly, I was able to extract the manually created > figures. The graphics converted just fine, but no text. I added the > text to these figures. > > There is still some work to be done on the chapter. Notably recovering > the equations. I'm looking for ways to do this. This effort will > require access to the original Framemaker files, possibly requiring an > export from FrameMaker to a more portable format than .fm files.\ > > I also converted the Preface and Introduction: > > https://lorensen.github.io/VTKExamples/site/VTKBook/Preface/ > > https://lorensen.github.io/VTKExamples/site/VTKBook/Introduction/ > > As usual, please reply with comments. > > Bill > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtk-developers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From thomas_sgouros at brown.edu Tue Apr 3 14:27:43 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Tue, 3 Apr 2018 14:27:43 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D Message-ID: Hello all: Can someone help me understand why this code works: vtkSmartPointer glyph3D = vtkSmartPointer::New(); glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); glyph3D->SetInputData(polydata); glyph3D->Update(); And this does not (nothing displayed)? vtkSmartPointer glyph3D = vtkSmartPointer::New(); glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); glyph3D->SetInputData(reader->GetOutput()); glyph3D->Update(); The first clip is from https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D The 'reader' object is stolen from the ParticleReader example: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName ( filePath.c_str() ); reader->SetDataByteOrderToBigEndian(); reader->Update(); The program compiles, but no data appears. It works fine (data appears) in the context of the ParticleReader example, where it shows all the data points. But I want to see them as glyphs, not little squares. I seem to be misunderstanding something fundamental, but not seeing what it could be. Many thanks, -Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Tue Apr 3 14:44:01 2018 From: bitminer at gmail.com (Brian Davis) Date: Tue, 3 Apr 2018 13:44:01 -0500 Subject: [vtkusers] VTK 8.1.0 vtkRenderingVolumeOpenGL, vtkRenderingVolumeOpenGL2, Message-ID: On Win 10 build I now get: 2> CMake Error at Rendering/OpenGL/CMakeLists.txt:3 (message): 2> vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, please disable 2> one of them. When building VTK this did work -DModule_vtkRenderingVolumeOpenGL=ON I mean (worked) the rendering was still horrid slow, but it built and ran. https://blog.kitware.com/volume-rendering-improvements-in-vtk/ states to use: -DModule_vtkRenderingVolumeOpenGLNew=ON, though that is circa 2014 https://gitlab.kitware.com/search?utf8=%E2%9C%93&snippets=&scope=&search=vtkRenderingVolumeOpenGL&project_id=13 might lead me to believe if I look at the android section: -DModule_vtkTestingCore:BOOL=ON -DModule_vtkTestingRendering:BOOL=ON -DModule_vtkRenderingVolumeOpenGL2:BOOL=ON Though I am not compiling for android or iOS. Is there a way to build the "New" (well post OpenGL fixed pipeline) version in version 8.0.1? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Apr 3 14:53:46 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 3 Apr 2018 12:53:46 -0600 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Tom, Just make sure that reader->Update(); was called before glyph3D->SetInputData(reader->GetOutput()); But it would be better to use the connection instead of the dataset directly. Seb On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas wrote: > Hello all: > > Can someone help me understand why this code works: > > vtkSmartPointer glyph3D = vtkSmartPointer:: > New(); > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > glyph3D->SetInputData(polydata); > glyph3D->Update(); > > And this does not (nothing displayed)? > > vtkSmartPointer glyph3D = vtkSmartPointer:: > New(); > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > glyph3D->SetInputData(reader->GetOutput()); > glyph3D->Update(); > > The first clip is from https://www.vtk.org/Wiki/ > VTK/Examples/Cxx/Filtering/Glyph3D > > The 'reader' object is stolen from the ParticleReader example: > > vtkSmartPointer reader = vtkSmartPointer< > vtkParticleReader>::New(); > reader->SetFileName ( filePath.c_str() ); > reader->SetDataByteOrderToBigEndian(); > reader->Update(); > > The program compiles, but no data appears. It works fine (data appears) in > the context of the ParticleReader example, where it shows all the data > points. But I want to see them as glyphs, not little squares. I seem to be > misunderstanding something fundamental, but not seeing what it could be. > > Many thanks, > > -Tom > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Apr 3 14:55:28 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 3 Apr 2018 14:55:28 -0400 Subject: [vtkusers] VTK 8.1.0 vtkRenderingVolumeOpenGL, vtkRenderingVolumeOpenGL2, In-Reply-To: References: Message-ID: 2> CMake Error at Rendering/OpenGL/CMakeLists.txt:3 (message): 2> vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, please disable 2> one of them. To choose the legacy backend: VTK_RENDERING_BACKEND:STRING=OpenGL To choose the modern backend: VTK_RENDERING_BACKEND:STRING=OpenGL2 David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Apr 3, 2018 at 2:44 PM, Brian Davis wrote: > > On Win 10 build I now get: > > 2> CMake Error at Rendering/OpenGL/CMakeLists.txt:3 (message): > 2> vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, please > disable > 2> one of them. > > When building VTK this did work > > -DModule_vtkRenderingVolumeOpenGL=ON > > I mean (worked) the rendering was still horrid slow, but it built and ran. > > https://blog.kitware.com/volume-rendering-improvements-in-vtk/ > > states to use: > > -DModule_vtkRenderingVolumeOpenGLNew=ON, > > though that is circa 2014 > > https://gitlab.kitware.com/search?utf8=%E2%9C%93&snippets=&scope=&search= > vtkRenderingVolumeOpenGL&project_id=13 > > might lead me to believe if I look at the android section: > > -DModule_vtkTestingCore:BOOL=ON > -DModule_vtkTestingRendering:BOOL=ON > -DModule_vtkRenderingVolumeOpenGL2:BOOL=ON > > > Though I am not compiling for android or iOS. > > Is there a way to build the "New" (well post OpenGL fixed pipeline) > version in version 8.0.1? > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas_sgouros at brown.edu Tue Apr 3 15:23:06 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Tue, 3 Apr 2018 15:23:06 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Hi Sebastien: Sorry if that was unclear. The third block of code comes first, and reader->Update() is called before I use its GetOutput(). In situ, it looks like this: ... vtkSmartPointer reader = vtkSmartPointer< vtkParticleReader>::New(); reader->SetFileName ( filePath.c_str() ); reader->SetDataByteOrderToBigEndian(); reader->Update(); // Create anything you want here, we will use a cube for the demo. vtkSmartPointer cubeSource = vtkSmartPointer::New(); vtkSmartPointer glyph3D = vtkSmartPointer::New(); glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); glyph3D->SetInputData(reader->GetOutput()); glyph3D->Update(); ... I don't think I understand what you mean by the connection instead of the dataset directly. Is there a way to peek inside glyph3D and see what it thinks it has? Thank you, -Tom On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > Tom, > > Just make sure that reader->Update(); was called before > glyph3D->SetInputData(reader->GetOutput()); > But it would be better to use the connection instead of the dataset > directly. > > Seb > > On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas > wrote: > >> Hello all: >> >> Can someone help me understand why this code works: >> >> vtkSmartPointer glyph3D = vtkSmartPointer::N >> ew(); >> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> glyph3D->SetInputData(polydata); >> glyph3D->Update(); >> >> And this does not (nothing displayed)? >> >> vtkSmartPointer glyph3D = vtkSmartPointer::N >> ew(); >> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> glyph3D->SetInputData(reader->GetOutput()); >> glyph3D->Update(); >> >> The first clip is from https://www.vtk.org/Wiki/ >> VTK/Examples/Cxx/Filtering/Glyph3D >> >> The 'reader' object is stolen from the ParticleReader example: >> >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName ( filePath.c_str() ); >> reader->SetDataByteOrderToBigEndian(); >> reader->Update(); >> >> The program compiles, but no data appears. It works fine (data appears) >> in the context of the ParticleReader example, where it shows all the data >> points. But I want to see them as glyphs, not little squares. I seem to be >> misunderstanding something fundamental, but not seeing what it could be. >> >> Many thanks, >> >> -Tom >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Apr 3 15:26:33 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 3 Apr 2018 13:26:33 -0600 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: You can try to see what the GetOutput() contains as my assumption it would be empty (No points => Number of Points: 0). reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); What I mean was glyph3D->SetInputConnection(reader->GetOutputPort()); On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas wrote: > Hi Sebastien: > > Sorry if that was unclear. The third block of code comes first, and > reader->Update() is called before I use its GetOutput(). In situ, it looks > like this: > > ... > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName ( filePath.c_str() ); > reader->SetDataByteOrderToBigEndian(); > reader->Update(); > > // Create anything you want here, we will use a cube for the demo. > vtkSmartPointer cubeSource = > vtkSmartPointer::New(); > > vtkSmartPointer glyph3D = vtkSmartPointer::N > ew(); > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > glyph3D->SetInputData(reader->GetOutput()); > glyph3D->Update(); > > ... > > I don't think I understand what you mean by the connection instead of the > dataset directly. > > Is there a way to peek inside glyph3D and see what it thinks it has? > > Thank you, > > -Tom > > > On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> Tom, >> >> Just make sure that reader->Update(); was called before >> glyph3D->SetInputData(reader->GetOutput()); >> But it would be better to use the connection instead of the dataset >> directly. >> >> Seb >> >> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas < >> thomas_sgouros at brown.edu> wrote: >> >>> Hello all: >>> >>> Can someone help me understand why this code works: >>> >>> vtkSmartPointer glyph3D = vtkSmartPointer::N >>> ew(); >>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>> glyph3D->SetInputData(polydata); >>> glyph3D->Update(); >>> >>> And this does not (nothing displayed)? >>> >>> vtkSmartPointer glyph3D = vtkSmartPointer::N >>> ew(); >>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>> glyph3D->SetInputData(reader->GetOutput()); >>> glyph3D->Update(); >>> >>> The first clip is from https://www.vtk.org/Wiki/ >>> VTK/Examples/Cxx/Filtering/Glyph3D >>> >>> The 'reader' object is stolen from the ParticleReader example: >>> >>> vtkSmartPointer reader = >>> vtkSmartPointer::New(); >>> reader->SetFileName ( filePath.c_str() ); >>> reader->SetDataByteOrderToBigEndian(); >>> reader->Update(); >>> >>> The program compiles, but no data appears. It works fine (data appears) >>> in the context of the ParticleReader example, where it shows all the data >>> points. But I want to see them as glyphs, not little squares. I seem to be >>> misunderstanding something fundamental, but not seeing what it could be. >>> >>> Many thanks, >>> >>> -Tom >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas_sgouros at brown.edu Tue Apr 3 15:47:29 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Tue, 3 Apr 2018 15:47:29 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: This is reader->GetOutput() vtkPolyData (0x7f8ce050dad0) Debug: Off Modified Time: 217 Reference Count: 1 Registered Events: (none) Information: 0x7f8ce050d9b0 Data Released: False Global Release Data: Off UpdateTime: 218 Field Data: Debug: Off Modified Time: 167 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 10229 Number Of Cells: 10229 It goes on for quite a bit more. As I said, when I feed this to a vtkPolyDataMapper, it displays and works fine, but I want little spheres, not little flat rectangles and I thought I could just redirect that into the vtkGlyph3D object, but I must be misunderstanding something. Thank you, -Tom On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > You can try to see what the GetOutput() contains as my assumption it would > be empty (No points => Number of Points: 0). > > reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); > > What I mean was > > glyph3D->SetInputConnection(reader->GetOutputPort()); > > > On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas > wrote: > >> Hi Sebastien: >> >> Sorry if that was unclear. The third block of code comes first, and >> reader->Update() is called before I use its GetOutput(). In situ, it looks >> like this: >> >> ... >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName ( filePath.c_str() ); >> reader->SetDataByteOrderToBigEndian(); >> reader->Update(); >> >> // Create anything you want here, we will use a cube for the demo. >> vtkSmartPointer cubeSource = >> vtkSmartPointer::New(); >> >> vtkSmartPointer glyph3D = vtkSmartPointer::N >> ew(); >> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> glyph3D->SetInputData(reader->GetOutput()); >> glyph3D->Update(); >> >> ... >> >> I don't think I understand what you mean by the connection instead of the >> dataset directly. >> >> Is there a way to peek inside glyph3D and see what it thinks it has? >> >> Thank you, >> >> -Tom >> >> >> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain < >> sebastien.jourdain at kitware.com> wrote: >> >>> Tom, >>> >>> Just make sure that reader->Update(); was called before >>> glyph3D->SetInputData(reader->GetOutput()); >>> But it would be better to use the connection instead of the dataset >>> directly. >>> >>> Seb >>> >>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas < >>> thomas_sgouros at brown.edu> wrote: >>> >>>> Hello all: >>>> >>>> Can someone help me understand why this code works: >>>> >>>> vtkSmartPointer glyph3D = vtkSmartPointer::N >>>> ew(); >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>>> glyph3D->SetInputData(polydata); >>>> glyph3D->Update(); >>>> >>>> And this does not (nothing displayed)? >>>> >>>> vtkSmartPointer glyph3D = vtkSmartPointer::N >>>> ew(); >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>>> glyph3D->SetInputData(reader->GetOutput()); >>>> glyph3D->Update(); >>>> >>>> The first clip is from https://www.vtk.org/Wiki/ >>>> VTK/Examples/Cxx/Filtering/Glyph3D >>>> >>>> The 'reader' object is stolen from the ParticleReader example: >>>> >>>> vtkSmartPointer reader = >>>> vtkSmartPointer::New(); >>>> reader->SetFileName ( filePath.c_str() ); >>>> reader->SetDataByteOrderToBigEndian(); >>>> reader->Update(); >>>> >>>> The program compiles, but no data appears. It works fine (data appears) >>>> in the context of the ParticleReader example, where it shows all the data >>>> points. But I want to see them as glyphs, not little squares. I seem to be >>>> misunderstanding something fundamental, but not seeing what it could be. >>>> >>>> Many thanks, >>>> >>>> -Tom >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> https://vtk.org/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Tue Apr 3 15:53:48 2018 From: bitminer at gmail.com (Brian Davis) Date: Tue, 3 Apr 2018 14:53:48 -0500 Subject: [vtkusers] VTK 8.1.0 vtkRenderingVolumeOpenGL, vtkRenderingVolumeOpenGL2, In-Reply-To: References: Message-ID: Ok as stated here https://blog.kitware.com/paraview-5-0-0-available-for-download/ and search VTK_RENDERING_BACKEND which yields the sentence: "When building from source, simply set the VTK_RENDERING_BACKEND CMake variable to OpenGL2 to use this new rendering engine." any thoughts on adding this to https://www.vtk.org/Wiki/VTK/Building/Windows which looks to be circa VS 2008 or more generally to: https://www.vtk.org/Wiki/VTK/Building On Tue, Apr 3, 2018 at 1:55 PM, David E DeMarle wrote: > 2> CMake Error at Rendering/OpenGL/CMakeLists.txt:3 (message): > 2> vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, please > disable > 2> one of them. > > To choose the legacy backend: > VTK_RENDERING_BACKEND:STRING=OpenGL > > To choose the modern backend: > VTK_RENDERING_BACKEND:STRING=OpenGL2 > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Apr 3, 2018 at 2:44 PM, Brian Davis wrote: > >> >> On Win 10 build I now get: >> >> 2> CMake Error at Rendering/OpenGL/CMakeLists.txt:3 (message): >> 2> vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, please >> disable >> 2> one of them. >> >> When building VTK this did work >> >> -DModule_vtkRenderingVolumeOpenGL=ON >> >> I mean (worked) the rendering was still horrid slow, but it built and ran. >> >> https://blog.kitware.com/volume-rendering-improvements-in-vtk/ >> >> states to use: >> >> -DModule_vtkRenderingVolumeOpenGLNew=ON, >> >> though that is circa 2014 >> >> https://gitlab.kitware.com/search?utf8=%E2%9C%93&snippets=& >> scope=&search=vtkRenderingVolumeOpenGL&project_id=13 >> >> might lead me to believe if I look at the android section: >> >> -DModule_vtkTestingCore:BOOL=ON >> -DModule_vtkTestingRendering:BOOL=ON >> -DModule_vtkRenderingVolumeOpenGL2:BOOL=ON >> >> >> Though I am not compiling for android or iOS. >> >> Is there a way to build the "New" (well post OpenGL fixed pipeline) >> version in version 8.0.1? >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > -- Brian J. Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Apr 3 15:57:42 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 3 Apr 2018 15:57:42 -0400 Subject: [vtkusers] VTK 8.1.0 vtkRenderingVolumeOpenGL, vtkRenderingVolumeOpenGL2, In-Reply-To: References: Message-ID: That would be great. Please do. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Apr 3, 2018 at 3:53 PM, Brian Davis wrote: > > Ok as stated here https://blog.kitware.com/paraview-5-0-0-available-for- > download/ > > and search VTK_RENDERING_BACKEND which yields the sentence: > > "When building from source, simply set the VTK_RENDERING_BACKEND CMake > variable to OpenGL2 to use this new rendering engine." > > any thoughts on adding this to > > https://www.vtk.org/Wiki/VTK/Building/Windows > > which looks to be circa VS 2008 > > or more generally to: > > https://www.vtk.org/Wiki/VTK/Building > > > > On Tue, Apr 3, 2018 at 1:55 PM, David E DeMarle > wrote: > >> 2> CMake Error at Rendering/OpenGL/CMakeLists.txt:3 (message): >> 2> vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, please >> disable >> 2> one of them. >> >> To choose the legacy backend: >> VTK_RENDERING_BACKEND:STRING=OpenGL >> >> To choose the modern backend: >> VTK_RENDERING_BACKEND:STRING=OpenGL2 >> >> >> >> David E DeMarle >> Kitware, Inc. >> Principal Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Tue, Apr 3, 2018 at 2:44 PM, Brian Davis wrote: >> >>> >>> On Win 10 build I now get: >>> >>> 2> CMake Error at Rendering/OpenGL/CMakeLists.txt:3 (message): >>> 2> vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, >>> please disable >>> 2> one of them. >>> >>> When building VTK this did work >>> >>> -DModule_vtkRenderingVolumeOpenGL=ON >>> >>> I mean (worked) the rendering was still horrid slow, but it built and >>> ran. >>> >>> https://blog.kitware.com/volume-rendering-improvements-in-vtk/ >>> >>> states to use: >>> >>> -DModule_vtkRenderingVolumeOpenGLNew=ON, >>> >>> though that is circa 2014 >>> >>> https://gitlab.kitware.com/search?utf8=%E2%9C%93&snippets=&s >>> cope=&search=vtkRenderingVolumeOpenGL&project_id=13 >>> >>> might lead me to believe if I look at the android section: >>> >>> -DModule_vtkTestingCore:BOOL=ON >>> -DModule_vtkTestingRendering:BOOL=ON >>> -DModule_vtkRenderingVolumeOpenGL2:BOOL=ON >>> >>> >>> Though I am not compiling for android or iOS. >>> >>> Is there a way to build the "New" (well post OpenGL fixed pipeline) >>> version in version 8.0.1? >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >>> >> > > > -- > Brian J. Davis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Apr 3 16:43:06 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 3 Apr 2018 14:43:06 -0600 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: What you are doing seems correct and the data is valid (it has points). How do you render the glyph3d filter? Using a polydata mapper? I'm guessing no issue on that end? Ideally you should use the glyph mapper instead of the filter. But if memory is not a big deal, don't worry about it. Seb On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas wrote: > This is reader->GetOutput() > > vtkPolyData (0x7f8ce050dad0) > > Debug: Off > > Modified Time: 217 > > Reference Count: 1 > > Registered Events: (none) > > Information: 0x7f8ce050d9b0 > > Data Released: False > > Global Release Data: Off > > UpdateTime: 218 > > Field Data: > > Debug: Off > > Modified Time: 167 > > Reference Count: 1 > > Registered Events: (none) > > Number Of Arrays: 0 > > Number Of Components: 0 > > Number Of Tuples: 0 > > Number Of Points: 10229 > > Number Of Cells: 10229 > > It goes on for quite a bit more. As I said, when I feed this to a > vtkPolyDataMapper, it displays and works fine, but I want little spheres, > not little flat rectangles and I thought I could just redirect that into > the vtkGlyph3D object, but I must be misunderstanding something. > > Thank you, > > -Tom > > On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> You can try to see what the GetOutput() contains as my assumption it >> would be empty (No points => Number of Points: 0). >> >> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); >> >> What I mean was >> >> glyph3D->SetInputConnection(reader->GetOutputPort()); >> >> >> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas > > wrote: >> >>> Hi Sebastien: >>> >>> Sorry if that was unclear. The third block of code comes first, and >>> reader->Update() is called before I use its GetOutput(). In situ, it looks >>> like this: >>> >>> ... >>> vtkSmartPointer reader = >>> vtkSmartPointer::New(); >>> reader->SetFileName ( filePath.c_str() ); >>> reader->SetDataByteOrderToBigEndian(); >>> reader->Update(); >>> >>> // Create anything you want here, we will use a cube for the demo. >>> vtkSmartPointer cubeSource = >>> vtkSmartPointer::New(); >>> >>> vtkSmartPointer glyph3D = vtkSmartPointer::N >>> ew(); >>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>> glyph3D->SetInputData(reader->GetOutput()); >>> glyph3D->Update(); >>> >>> ... >>> >>> I don't think I understand what you mean by the connection instead of >>> the dataset directly. >>> >>> Is there a way to peek inside glyph3D and see what it thinks it has? >>> >>> Thank you, >>> >>> -Tom >>> >>> >>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain < >>> sebastien.jourdain at kitware.com> wrote: >>> >>>> Tom, >>>> >>>> Just make sure that reader->Update(); was called before >>>> glyph3D->SetInputData(reader->GetOutput()); >>>> But it would be better to use the connection instead of the dataset >>>> directly. >>>> >>>> Seb >>>> >>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas < >>>> thomas_sgouros at brown.edu> wrote: >>>> >>>>> Hello all: >>>>> >>>>> Can someone help me understand why this code works: >>>>> >>>>> vtkSmartPointer glyph3D = vtkSmartPointer::N >>>>> ew(); >>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>>>> glyph3D->SetInputData(polydata); >>>>> glyph3D->Update(); >>>>> >>>>> And this does not (nothing displayed)? >>>>> >>>>> vtkSmartPointer glyph3D = vtkSmartPointer::N >>>>> ew(); >>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>>>> glyph3D->SetInputData(reader->GetOutput()); >>>>> glyph3D->Update(); >>>>> >>>>> The first clip is from https://www.vtk.org/Wiki/ >>>>> VTK/Examples/Cxx/Filtering/Glyph3D >>>>> >>>>> The 'reader' object is stolen from the ParticleReader example: >>>>> >>>>> vtkSmartPointer reader = >>>>> vtkSmartPointer::New(); >>>>> reader->SetFileName ( filePath.c_str() ); >>>>> reader->SetDataByteOrderToBigEndian(); >>>>> reader->Update(); >>>>> >>>>> The program compiles, but no data appears. It works fine (data >>>>> appears) in the context of the ParticleReader example, where it shows all >>>>> the data points. But I want to see them as glyphs, not little squares. I >>>>> seem to be misunderstanding something fundamental, but not seeing what it >>>>> could be. >>>>> >>>>> Many thanks, >>>>> >>>>> -Tom >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> https://vtk.org/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Apr 3 16:46:56 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 3 Apr 2018 13:46:56 -0700 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Post a small compilable example, please. It is often some unexpected minor thing that causes the failure. Thanks, Bill BTW: The wiki examples have been replaced by VTKExamples here: https://lorensen.github.io/VTKExamples/site/ On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain wrote: > What you are doing seems correct and the data is valid (it has points). > > How do you render the glyph3d filter? Using a polydata mapper? I'm guessing > no issue on that end? > > Ideally you should use the glyph mapper instead of the filter. But if memory > is not a big deal, don't worry about it. > > Seb > > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas > wrote: >> >> This is reader->GetOutput() >> >> vtkPolyData (0x7f8ce050dad0) >> >> Debug: Off >> >> Modified Time: 217 >> >> Reference Count: 1 >> >> Registered Events: (none) >> >> Information: 0x7f8ce050d9b0 >> >> Data Released: False >> >> Global Release Data: Off >> >> UpdateTime: 218 >> >> Field Data: >> >> Debug: Off >> >> Modified Time: 167 >> >> Reference Count: 1 >> >> Registered Events: (none) >> >> Number Of Arrays: 0 >> >> Number Of Components: 0 >> >> Number Of Tuples: 0 >> >> Number Of Points: 10229 >> >> Number Of Cells: 10229 >> >> >> It goes on for quite a bit more. As I said, when I feed this to a >> vtkPolyDataMapper, it displays and works fine, but I want little spheres, >> not little flat rectangles and I thought I could just redirect that into the >> vtkGlyph3D object, but I must be misunderstanding something. >> >> Thank you, >> >> -Tom >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain >> wrote: >>> >>> You can try to see what the GetOutput() contains as my assumption it >>> would be empty (No points => Number of Points: 0). >>> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); >>> >>> What I mean was >>> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); >>> >>> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas >>> wrote: >>>> >>>> Hi Sebastien: >>>> >>>> Sorry if that was unclear. The third block of code comes first, and >>>> reader->Update() is called before I use its GetOutput(). In situ, it looks >>>> like this: >>>> >>>> ... >>>> vtkSmartPointer reader = >>>> vtkSmartPointer::New(); >>>> reader->SetFileName ( filePath.c_str() ); >>>> reader->SetDataByteOrderToBigEndian(); >>>> reader->Update(); >>>> >>>> // Create anything you want here, we will use a cube for the demo. >>>> vtkSmartPointer cubeSource = >>>> vtkSmartPointer::New(); >>>> >>>> vtkSmartPointer glyph3D = >>>> vtkSmartPointer::New(); >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>>> glyph3D->SetInputData(reader->GetOutput()); >>>> glyph3D->Update(); >>>> >>>> ... >>>> >>>> I don't think I understand what you mean by the connection instead of >>>> the dataset directly. >>>> >>>> Is there a way to peek inside glyph3D and see what it thinks it has? >>>> >>>> Thank you, >>>> >>>> -Tom >>>> >>>> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain >>>> wrote: >>>>> >>>>> Tom, >>>>> >>>>> Just make sure that reader->Update(); was called before >>>>> glyph3D->SetInputData(reader->GetOutput()); >>>>> But it would be better to use the connection instead of the dataset >>>>> directly. >>>>> >>>>> Seb >>>>> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas >>>>> wrote: >>>>>> >>>>>> Hello all: >>>>>> >>>>>> Can someone help me understand why this code works: >>>>>> >>>>>> vtkSmartPointer glyph3D = >>>>>> vtkSmartPointer::New(); >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>>>>> glyph3D->SetInputData(polydata); >>>>>> glyph3D->Update(); >>>>>> >>>>>> And this does not (nothing displayed)? >>>>>> >>>>>> vtkSmartPointer glyph3D = >>>>>> vtkSmartPointer::New(); >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >>>>>> glyph3D->SetInputData(reader->GetOutput()); >>>>>> glyph3D->Update(); >>>>>> >>>>>> The first clip is from >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D >>>>>> >>>>>> The 'reader' object is stolen from the ParticleReader example: >>>>>> >>>>>> vtkSmartPointer reader = >>>>>> vtkSmartPointer::New(); >>>>>> reader->SetFileName ( filePath.c_str() ); >>>>>> reader->SetDataByteOrderToBigEndian(); >>>>>> reader->Update(); >>>>>> >>>>>> The program compiles, but no data appears. It works fine (data >>>>>> appears) in the context of the ParticleReader example, where it shows all >>>>>> the data points. But I want to see them as glyphs, not little squares. I >>>>>> seem to be misunderstanding something fundamental, but not seeing what it >>>>>> could be. >>>>>> >>>>>> Many thanks, >>>>>> >>>>>> -Tom >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> https://vtk.org/mailman/listinfo/vtkusers >>>>>> >>>>> >>>> >>> >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com From thomas_sgouros at brown.edu Tue Apr 3 16:54:39 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Tue, 3 Apr 2018 16:54:39 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: "It is often some unexpected minor thing that causes the failure." I'm certain of that. Here's the code, mostly pinched straight from the Glyph3D example. (And I've tried swapping the endianness, just for giggles.) The data is an ASCII vtk file that you can get from sgouros.com/output_p40.vtk. Thank you, -Tom #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char* argv[]) { std::string filePath = argv[1]; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName ( filePath.c_str() ); // if nothing gets displayed or totally wrong, swap the endianness reader->SetDataByteOrderToBigEndian(); reader->Update(); // Create anything you want here, we will use a cube for the demo. vtkSmartPointer cubeSource = vtkSmartPointer::New(); vtkSmartPointer glyph3D = vtkSmartPointer::New(); glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); glyph3D->SetInputConnection(reader->GetOutputPort()); glyph3D->Update(); std::cout << *(reader->GetOutput()) << std::endl; // Visualize vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(glyph3D->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->AddActor(actor); renderer->SetBackground(.3, .6, .3); // Background color green renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen wrote: > Post a small compilable example, please. It is often some unexpected > minor thing that causes the failure. > > Thanks, > > Bill > > BTW: The wiki examples have been replaced by VTKExamples here: > > https://lorensen.github.io/VTKExamples/site/ > > > On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain > wrote: > > What you are doing seems correct and the data is valid (it has points). > > > > How do you render the glyph3d filter? Using a polydata mapper? I'm > guessing > > no issue on that end? > > > > Ideally you should use the glyph mapper instead of the filter. But if > memory > > is not a big deal, don't worry about it. > > > > Seb > > > > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas < > thomas_sgouros at brown.edu> > > wrote: > >> > >> This is reader->GetOutput() > >> > >> vtkPolyData (0x7f8ce050dad0) > >> > >> Debug: Off > >> > >> Modified Time: 217 > >> > >> Reference Count: 1 > >> > >> Registered Events: (none) > >> > >> Information: 0x7f8ce050d9b0 > >> > >> Data Released: False > >> > >> Global Release Data: Off > >> > >> UpdateTime: 218 > >> > >> Field Data: > >> > >> Debug: Off > >> > >> Modified Time: 167 > >> > >> Reference Count: 1 > >> > >> Registered Events: (none) > >> > >> Number Of Arrays: 0 > >> > >> Number Of Components: 0 > >> > >> Number Of Tuples: 0 > >> > >> Number Of Points: 10229 > >> > >> Number Of Cells: 10229 > >> > >> > >> It goes on for quite a bit more. As I said, when I feed this to a > >> vtkPolyDataMapper, it displays and works fine, but I want little > spheres, > >> not little flat rectangles and I thought I could just redirect that > into the > >> vtkGlyph3D object, but I must be misunderstanding something. > >> > >> Thank you, > >> > >> -Tom > >> > >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain > >> wrote: > >>> > >>> You can try to see what the GetOutput() contains as my assumption it > >>> would be empty (No points => Number of Points: 0). > >>> > >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); > >>> > >>> What I mean was > >>> > >>> glyph3D->SetInputConnection(reader->GetOutputPort()); > >>> > >>> > >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas > >>> wrote: > >>>> > >>>> Hi Sebastien: > >>>> > >>>> Sorry if that was unclear. The third block of code comes first, and > >>>> reader->Update() is called before I use its GetOutput(). In situ, it > looks > >>>> like this: > >>>> > >>>> ... > >>>> vtkSmartPointer reader = > >>>> vtkSmartPointer::New(); > >>>> reader->SetFileName ( filePath.c_str() ); > >>>> reader->SetDataByteOrderToBigEndian(); > >>>> reader->Update(); > >>>> > >>>> // Create anything you want here, we will use a cube for the demo. > >>>> vtkSmartPointer cubeSource = > >>>> vtkSmartPointer::New(); > >>>> > >>>> vtkSmartPointer glyph3D = > >>>> vtkSmartPointer::New(); > >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >>>> glyph3D->SetInputData(reader->GetOutput()); > >>>> glyph3D->Update(); > >>>> > >>>> ... > >>>> > >>>> I don't think I understand what you mean by the connection instead of > >>>> the dataset directly. > >>>> > >>>> Is there a way to peek inside glyph3D and see what it thinks it has? > >>>> > >>>> Thank you, > >>>> > >>>> -Tom > >>>> > >>>> > >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain > >>>> wrote: > >>>>> > >>>>> Tom, > >>>>> > >>>>> Just make sure that reader->Update(); was called before > >>>>> glyph3D->SetInputData(reader->GetOutput()); > >>>>> But it would be better to use the connection instead of the dataset > >>>>> directly. > >>>>> > >>>>> Seb > >>>>> > >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas > >>>>> wrote: > >>>>>> > >>>>>> Hello all: > >>>>>> > >>>>>> Can someone help me understand why this code works: > >>>>>> > >>>>>> vtkSmartPointer glyph3D = > >>>>>> vtkSmartPointer::New(); > >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >>>>>> glyph3D->SetInputData(polydata); > >>>>>> glyph3D->Update(); > >>>>>> > >>>>>> And this does not (nothing displayed)? > >>>>>> > >>>>>> vtkSmartPointer glyph3D = > >>>>>> vtkSmartPointer::New(); > >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >>>>>> glyph3D->SetInputData(reader->GetOutput()); > >>>>>> glyph3D->Update(); > >>>>>> > >>>>>> The first clip is from > >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D > >>>>>> > >>>>>> The 'reader' object is stolen from the ParticleReader example: > >>>>>> > >>>>>> vtkSmartPointer reader = > >>>>>> vtkSmartPointer::New(); > >>>>>> reader->SetFileName ( filePath.c_str() ); > >>>>>> reader->SetDataByteOrderToBigEndian(); > >>>>>> reader->Update(); > >>>>>> > >>>>>> The program compiles, but no data appears. It works fine (data > >>>>>> appears) in the context of the ParticleReader example, where it > shows all > >>>>>> the data points. But I want to see them as glyphs, not little > squares. I > >>>>>> seem to be misunderstanding something fundamental, but not seeing > what it > >>>>>> could be. > >>>>>> > >>>>>> Many thanks, > >>>>>> > >>>>>> -Tom > >>>>>> > >>>>>> > >>>>>> > >>>>>> _______________________________________________ > >>>>>> Powered by www.kitware.com > >>>>>> > >>>>>> Visit other Kitware open-source projects at > >>>>>> http://www.kitware.com/opensource/opensource.html > >>>>>> > >>>>>> Please keep messages on-topic and check the VTK FAQ at: > >>>>>> http://www.vtk.org/Wiki/VTK_FAQ > >>>>>> > >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>>>>> > >>>>>> Follow this link to subscribe/unsubscribe: > >>>>>> https://vtk.org/mailman/listinfo/vtkusers > >>>>>> > >>>>> > >>>> > >>> > >> > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://vtk.org/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsParadise at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Tue Apr 3 21:21:38 2018 From: nztoddler at yahoo.com (Todd) Date: Wed, 04 Apr 2018 13:21:38 +1200 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Apr 3 22:24:33 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 04 Apr 2018 02:24:33 +0000 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: Definitely, need to find a solution. Note that the pdf also is messed up. . On Tue, Apr 3, 2018, 6:21 PM Todd wrote: > Hi Bill > > Apart from the missing equations, parts of the text refer to the equation > variables. It would be great if the solution for embedding the equations > also permitted these to be displayed nicely. > > Todd > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bertram.Sabrowsky-Hirsch at risc-software.at Wed Apr 4 03:57:28 2018 From: Bertram.Sabrowsky-Hirsch at risc-software.at (Bertram Sabrowsky-Hirsch) Date: Wed, 4 Apr 2018 07:57:28 +0000 Subject: [vtkusers] vtkProjectedTetrahedraMapper to map one component only In-Reply-To: <1522440883890-0.post@n5.nabble.com> References: <2FAC7B9E487D2C478AB8E83F062AF680072E2BA5@doug.risc.local> <1522440883890-0.post@n5.nabble.com> Message-ID: <2FAC7B9E487D2C478AB8E83F062AF680072E3BF8@doug.risc.local> Hi, So that would involve creating a custom array, filling it with the extracted data, adding it to the unstructured grid and setting the active array? Thank you - that certainly solves my problem. However, I felt like there should exist a solution where extracting data to a designated array is not necessary as classes like vtkColorTransferFunction already offer the functionality to set individual vector components. This functionality seems to be ignored by the vtkProjectedTetrahedraMapper so I wonder if I missed out on something. I would prefer such a solution to adding an array to the unstructured grid because I also want to export the unstructured grid and modifying the original would complicate the export process since those changes need to be reversed. Kind regards, Bertram -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of ZACK Sent: 30 March 2018 22:15 To: vtkusers at vtk.org Subject: Re: [vtkusers] vtkProjectedTetrahedraMapper to map one component only Hi Bertram, I have unstructured grid vector plot and each point has xfield, yfield and z field values.You can accomplish what you're looking for by giving the user the option to plot X,Y,Z,XY,XZ,YZ or XYZ components Depending on user selection you can just compute the magnitude of selected component(s) and set the scalar values accordingly for contour plot or just use InsertNextTuple3(xfield,yfield, zfield) for vector plot Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers From addison.elliott at gmail.com Wed Apr 4 09:40:25 2018 From: addison.elliott at gmail.com (Addison Elliott) Date: Wed, 4 Apr 2018 08:40:25 -0500 Subject: [vtkusers] Multiple vtkRenderWindows - Error during cleanup: wglMakeCurrent failed in Clean() Message-ID: Hello everyone, I am receiving some errors on cleanup of my application. I am using Python 3.5.4 with PyQt5 and VTK 8.1 (Conda installed). I have a basic GUI with two widgets used with VTK, each one instantiates a QVTKRenderWindowInteractor, vtkRenderer and vtkRenderWindow like you'd expect. Here is a simplified test case I have made: https://pastebin.com/EwuHZBFG. For the test case, here is the output that is generated: *destructor* *SliceWidget_del1* *SliceWidget_del2* *SliceWidget_del3* *SliceWidget_del4* *SliceWidget_del1* *SliceWidget_del2* *ERROR: In ..\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 227* *vtkWin32OpenGLRenderWindow (00000258F6471A00): wglMakeCurrent failed in MakeCurrent(), error: The handle is invalid.* *ERROR: In ..\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 87* *vtkWin32OpenGLRenderWindow (00000258F6471A00): wglMakeCurrent failed in Clean(), error: 6* *SliceWidget_del3* *SliceWidget_del4* What this indicates is that on vtkRenderWindow.Finalize(), it is failing on the *SECOND* destructor. So naturally, I removed the second render window and found it works fine on applications with one render window. After extensive debugging, I have found that this issue can be resolved if vtkRenderWindow.Finalize() is called for both windows before the interactor, renderWindow and renderer are destroyed. At lines 71 and 72 in the test case if you uncomment them, then the code works fine. In other words, here is a basic example *# This WILL work* *sliceWidget1.Finalize()* *sliceWidget2.Finalize()* *delete sliceWidget1 (This will delete interactor, renderer and renderWindow)* *delete sliceWidget2 (This will delete interactor, renderer and renderWindow)* *# This WILL NOT work* *delete sliceWidget1 (This will delete interactor, renderer and renderWindow)* *sliceWidget1.Finalize()* *delete sliceWidget2 (This will delete interactor, renderer and renderWindow)* *sliceWidget2.Finalize()* Can anyone offer any assistance on where in VTK this may be causing an issue? My initial thoughts is that upon destruction of one of the VTK objects, the context device ID is destroyed and thus cannot be used in the second Finalize() call. I don't have much familiarity in the VTK source code, so I was fairly lost in trying to pinpoint the issue. Thanks, Addison -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Wed Apr 4 14:59:13 2018 From: bitminer at gmail.com (Brian Davis) Date: Wed, 4 Apr 2018 13:59:13 -0500 Subject: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go Message-ID: using 8.1.0 build now get: 'vtkVolumeTextureMapper3D.h': No such file or directory comparing https://www.vtk.org/doc/release/7.1/html/annotated.html and https://www.vtk.org/doc/nightly/html/annotated.html which appears to be 8.1.0 (not that this is clear) as https://www.vtk.org/documentation/ has no listing for 8.1.0, not that I expect it to be documented anywhere, like possibly https://www.vtk.org/doc/nightly/html/deprecated.html where-ohhh-where did vtkVolumeTextureMapper3D go.... where-ohhh-where did it go? -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Apr 4 15:52:47 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 4 Apr 2018 15:52:47 -0400 Subject: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go In-Reply-To: References: Message-ID: vtkVolumeTextureMapper3D has been removed as now we have two VTK mappers CPU and GPU one. vtkVolumeTextureMapper3D is based on a outdated technology. It was deprecated I believe and removed in later versions. Do you need it for any specific reasons? thanks, On Wed, Apr 4, 2018 at 2:59 PM, Brian Davis wrote: > using 8.1.0 build now get: > > 'vtkVolumeTextureMapper3D.h': No such file or directory > > comparing > > https://www.vtk.org/doc/release/7.1/html/annotated.html > > and > > https://www.vtk.org/doc/nightly/html/annotated.html > > which appears to be 8.1.0 (not that this is clear) as > > https://www.vtk.org/documentation/ > > has no listing for 8.1.0, not that I expect it to be documented anywhere, > like possibly > > https://www.vtk.org/doc/nightly/html/deprecated.html > > where-ohhh-where did vtkVolumeTextureMapper3D go.... where-ohhh-where did > it go? > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Thu Apr 5 03:33:00 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Thu, 5 Apr 2018 17:33:00 +1000 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: I'm having a go at converting what Bill has done to Latex. This is because Latex is really good at handling equations etc. Also it is easy to produce a PDF for publication for those who want a book format. I'm converting the markdown files that Bill has already done. Here is my first attempt at the Preface. I think I cal also add a little image at the top of each chapter. My Latex is pretty rusty but I will also have a go at Chapter 3 and 6. Regards Andrew On Wed, Apr 4, 2018 at 12:24 PM, Bill Lorensen wrote: > Definitely, need to find a solution. Note that the pdf also is messed up. > . > > On Tue, Apr 3, 2018, 6:21 PM Todd wrote: > >> Hi Bill >> >> Apart from the missing equations, parts of the text refer to the equation >> variables. It would be great if the solution for embedding the equations >> also permitted these to be displayed nicely. >> >> Todd >> > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VTKBookMain.pdf Type: application/pdf Size: 50765 bytes Desc: not available URL: From thomas_sgouros at brown.edu Thu Apr 5 08:50:04 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Thu, 5 Apr 2018 08:50:04 -0400 Subject: [vtkusers] vtkObjImporter and vtkPolyDataNormals Message-ID: Hello all: I'm looking at the example for the vtkObjImporter class found here: https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ There is a mapper created there whose inputs are set to the outputs of a vtkPolyDataNormals object (just a few lines back from the end). But its output is never set to anybody's input. Why is that? Asking because I need to insert a vtkTransformFilter into the mix, and I don't really see where it should go in order to transform the position of the imported object. Thank you, -Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Apr 5 10:04:43 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 5 Apr 2018 07:04:43 -0700 Subject: [vtkusers] vtkObjImporter and vtkPolyDataNormals In-Reply-To: References: Message-ID: The mapper is obtained from the actors created by the importer. You can build a pipeline and connect the last element of the pipeline to the mappers. Bill On Thu, Apr 5, 2018 at 5:50 AM, Sgouros, Thomas wrote: > Hello all: > > I'm looking at the example for the vtkObjImporter class found here: > > https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ > > There is a mapper created there whose inputs are set to the outputs of a > vtkPolyDataNormals object (just a few lines back from the end). But its > output is never set to anybody's input. Why is that? > > Asking because I need to insert a vtkTransformFilter into the mix, and I > don't really see where it should go in order to transform the position of > the imported object. > > Thank you, > > -Tom > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com From ashahrior.91994 at gmail.com Thu Apr 5 11:13:22 2018 From: ashahrior.91994 at gmail.com (Ashef Shahrior) Date: Thu, 5 Apr 2018 21:13:22 +0600 Subject: [vtkusers] ITK and VTK Integration Message-ID: I am following this tutorial: https://itk.org/CourseWare/Training/GettingStarted-II.pdf for integrating ITK with VTK. This is my code: https://paste.ubuntu.com/p/5Qs9RYpHjn/ taken exactly from the tutorial pdf. This is the CMakeList: https://paste.ubuntu.com/p/YpfQJyqM8j/ that I have used. Every time I try to build, this error is being shown - Can anyone please be kind enough to help me out? PS. I am a newbie. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 41696 bytes Desc: not available URL: From pluszcz at gmail.com Thu Apr 5 11:36:21 2018 From: pluszcz at gmail.com (Anka Kochanowska) Date: Thu, 5 Apr 2018 11:36:21 -0400 Subject: [vtkusers] ITK and VTK Integration In-Reply-To: References: Message-ID: What is your VTK version? You probably should use SetInputData. Anka On Thu, Apr 5, 2018 at 11:13 AM, Ashef Shahrior wrote: > I am following this tutorial: https://itk.org/CourseWare/Training/ > GettingStarted-II.pdf for integrating ITK with VTK. This is my code: > https://paste.ubuntu.com/p/5Qs9RYpHjn/ taken exactly from the tutorial > pdf. This is the CMakeList: https://paste.ubuntu.com/p/YpfQJyqM8j/ that I > have used. Every time I try to build, this error is being shown - > Can anyone please be kind enough to help me out? > PS. I am a newbie. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 41696 bytes Desc: not available URL: From bill.lorensen at gmail.com Thu Apr 5 12:44:34 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 5 Apr 2018 09:44:34 -0700 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: I found a good solution for embedding latex into markdown. I tried a couple of equations and it works! Now I need to learn how to do math in Latex. https://squidfunk.github.io/mkdocs-material/extensions/pymdown/ Bill On Tue, Apr 3, 2018 at 7:24 PM, Bill Lorensen wrote: > Definitely, need to find a solution. Note that the pdf also is messed up. > . > > On Tue, Apr 3, 2018, 6:21 PM Todd wrote: >> >> Hi Bill >> >> Apart from the missing equations, parts of the text refer to the equation >> variables. It would be great if the solution for embedding the equations >> also permitted these to be displayed nicely. >> >> Todd -- Unpaid intern in BillsParadise at noware dot com From will.schroeder at kitware.com Thu Apr 5 12:50:22 2018 From: will.schroeder at kitware.com (Will Schroeder) Date: Thu, 5 Apr 2018 12:50:22 -0400 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: Bill when I visit you on Saturday in Santa Cruz I will bring the framemaker files with me...... maybe that will help since the math is already done :-) On Thu, Apr 5, 2018 at 12:44 PM, Bill Lorensen wrote: > I found a good solution for embedding latex into markdown. I tried a > couple of equations and it works! Now I need to learn how to do math > in Latex. > https://squidfunk.github.io/mkdocs-material/extensions/pymdown/ > > Bill > > On Tue, Apr 3, 2018 at 7:24 PM, Bill Lorensen > wrote: > > Definitely, need to find a solution. Note that the pdf also is messed up. > > . > > > > On Tue, Apr 3, 2018, 6:21 PM Todd wrote: > >> > >> Hi Bill > >> > >> Apart from the missing equations, parts of the text refer to the > equation > >> variables. It would be great if the solution for embedding the equations > >> also permitted these to be displayed nicely. > >> > >> Todd > > > > -- > Unpaid intern in BillsParadise at noware dot com > -- 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 andrew.amaclean at gmail.com Thu Apr 5 17:58:18 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 6 Apr 2018 07:58:18 +1000 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: Hi Bill, This looks like it will be useful. I'll try it out on the VTKFileFormats sometime over the weekend. I wasn't happy with what I did there but it looked sort of OK. Regards Andrew On Fri, Apr 6, 2018 at 2:44 AM, Bill Lorensen wrote: > I found a good solution for embedding latex into markdown. I tried a > couple of equations and it works! Now I need to learn how to do math > in Latex. > https://squidfunk.github.io/mkdocs-material/extensions/pymdown/ > > Bill > > On Tue, Apr 3, 2018 at 7:24 PM, Bill Lorensen > wrote: > > Definitely, need to find a solution. Note that the pdf also is messed up. > > . > > > > On Tue, Apr 3, 2018, 6:21 PM Todd wrote: > >> > >> Hi Bill > >> > >> Apart from the missing equations, parts of the text refer to the > equation > >> variables. It would be great if the solution for embedding the equations > >> also permitted these to be displayed nicely. > >> > >> Todd > > > > -- > Unpaid intern in BillsParadise at noware dot com > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Thu Apr 5 19:05:11 2018 From: nztoddler at yahoo.com (Todd) Date: Fri, 06 Apr 2018 11:05:11 +1200 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From bitminer at gmail.com Thu Apr 5 19:30:03 2018 From: bitminer at gmail.com (Brian Davis) Date: Thu, 5 Apr 2018 18:30:03 -0500 Subject: [vtkusers] VTK 8.1.0 opengl 2 init.... how do I do this now? Message-ID: I use to: #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); //VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper); //VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper); and at times define vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)" vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) vtkRenderingCore=vtkRenderingOpenGL However in 8.1.0 build I get (void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) referenced in function "public: __cdecl vtkRenderingOpenGL_ModuleInit::vtkRenderingOpenGL_ModuleInit(void)" (??0vtkRenderingOpenGL_ModuleInit@@QEAA at XZ) which reminds me of every other time I try and build it when the version changes. What is special sauce recipe for 8.1.0 and building with post opengl 2 (GLSL shader enabled version) Anyone count the number of threads over the years that discuss the opengl init in VTK... there is such a sea of posts I am not even going to bother to fish out what may be the solution somewhere buried in the ether else I have to get out my heavy duty digital backhoe and realy dig for it. Sure I'll find it in some blog post somewhere. Any one at Kitware want to rethink the opengl design (Build and init process)? my superbuild of vtk defines: VTK_BUILD_DEFINITIONS -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DINSTALL_PREFIX=${INSTALL_PREFIX} # -DModule_vtkRenderingVolumeOpenGL=ON # -DModule_vtkRenderingVolumeOpenGLNew=ON -DModule_vtkTestingCore:BOOL=ON -DModule_vtkTestingRendering=ON -DModule_vtkRenderingVolumeOpenGL2=ON -DVTK_RENDERING_BACKEND=OpenGL2 -DBUILD_EXAMPLES=${VTK_BUILD_EXAMPLES} -DBUILD_TESTING=${VTK_BUILD_TESTING} ExternalProject_Add( ${VTK_VERSION_NAME} ... CMAKE_ARGS ${VTK_BUILD_DEFINITIONS} ... ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Thu Apr 5 19:38:48 2018 From: bitminer at gmail.com (Brian Davis) Date: Thu, 5 Apr 2018 18:38:48 -0500 Subject: [vtkusers] VTK 8.1.0 opengl 2 init.... how do I do this now? In-Reply-To: References: Message-ID: Part of solution may be to change: VTK_MODULE_INIT(vtkRenderingOpenGL); to VTK_MODULE_INIT(vtkRenderingOpenGL2); On Thu, Apr 5, 2018 at 6:30 PM, Brian Davis wrote: > I use to: > > #include > VTK_MODULE_INIT(vtkRenderingOpenGL); > VTK_MODULE_INIT(vtkInteractionStyle); > VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); > //VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper); > //VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper); > > > and at times define > > vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)" > vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) > vtkRenderingCore=vtkRenderingOpenGL > > However in 8.1.0 build I get > > (void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) referenced in > function "public: __cdecl vtkRenderingOpenGL_ModuleInit: > :vtkRenderingOpenGL_ModuleInit(void)" (??0vtkRenderingOpenGL_ModuleInit@ > @QEAA at XZ) > > which reminds me of every other time I try and build it when the version > changes. What is special sauce recipe for 8.1.0 and building with post > opengl 2 (GLSL shader enabled version) > > > Anyone count the number of threads over the years that discuss the opengl > init in VTK... there is such a sea of posts I am not even going to bother > to fish out what may be the solution somewhere buried in the ether else I > have to get out my heavy duty digital backhoe and realy dig for it. Sure > I'll find it in some blog post somewhere. > > Any one at Kitware want to rethink the opengl design (Build and init > process)? > > > my superbuild of vtk defines: > > VTK_BUILD_DEFINITIONS > -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} > -DINSTALL_PREFIX=${INSTALL_PREFIX} > # -DModule_vtkRenderingVolumeOpenGL=ON > # -DModule_vtkRenderingVolumeOpenGLNew=ON > -DModule_vtkTestingCore:BOOL=ON > -DModule_vtkTestingRendering=ON > -DModule_vtkRenderingVolumeOpenGL2=ON > > -DVTK_RENDERING_BACKEND=OpenGL2 > -DBUILD_EXAMPLES=${VTK_BUILD_EXAMPLES} > -DBUILD_TESTING=${VTK_BUILD_TESTING} > > > > ExternalProject_Add( > ${VTK_VERSION_NAME} > ... > CMAKE_ARGS ${VTK_BUILD_DEFINITIONS} > ... > ) > > > > -- Brian J. Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Thu Apr 5 19:54:53 2018 From: bitminer at gmail.com (Brian Davis) Date: Thu, 5 Apr 2018 18:54:53 -0500 Subject: [vtkusers] VTK 8.1.0 opengl 2 init.... how do I do this now? In-Reply-To: References: Message-ID: maybe: //VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingOpenGL2); VTK_MODULE_INIT(vtkInteractionStyle); //VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); //VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper); //VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper); and target_compile_definitions( vtk_volume_renderer PRIVATE volume_render_EXPORTS=yes vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)" vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) vtkRenderingCore=vtkRenderingOpenGL ) at least it compiles.with warning ... 2>C:/projects/4DDSA/brian/build/CMakeFiles/vtkRenderingCore_AUTOINIT_vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingOpenGL2.h(1): warning C4005: 'vtkRenderingCore_AUTOINIT' : macro redefinition 2> command-line arguments : see previous definition of 'vtkRenderingCore_AUTOINIT' ... ========== Build: 2 succeeded, 0 failed, 5 up-to-date, 0 skipped ========== On Thu, Apr 5, 2018 at 6:38 PM, Brian Davis wrote: > Part of solution may be to change: > > VTK_MODULE_INIT(vtkRenderingOpenGL); > > to > > VTK_MODULE_INIT(vtkRenderingOpenGL2); > > > > On Thu, Apr 5, 2018 at 6:30 PM, Brian Davis wrote: > >> I use to: >> >> #include >> VTK_MODULE_INIT(vtkRenderingOpenGL); >> VTK_MODULE_INIT(vtkInteractionStyle); >> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); >> //VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper); >> //VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper); >> >> >> and at times define >> >> vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)" >> vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) >> vtkRenderingCore=vtkRenderingOpenGL >> >> However in 8.1.0 build I get >> >> (void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) referenced in >> function "public: __cdecl vtkRenderingOpenGL_ModuleInit: >> :vtkRenderingOpenGL_ModuleInit(void)" (??0vtkRenderingOpenGL_ModuleInit@ >> @QEAA at XZ) >> >> which reminds me of every other time I try and build it when the version >> changes. What is special sauce recipe for 8.1.0 and building with post >> opengl 2 (GLSL shader enabled version) >> >> >> Anyone count the number of threads over the years that discuss the opengl >> init in VTK... there is such a sea of posts I am not even going to bother >> to fish out what may be the solution somewhere buried in the ether else I >> have to get out my heavy duty digital backhoe and realy dig for it. Sure >> I'll find it in some blog post somewhere. >> >> Any one at Kitware want to rethink the opengl design (Build and init >> process)? >> >> >> my superbuild of vtk defines: >> >> VTK_BUILD_DEFINITIONS >> -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} >> -DINSTALL_PREFIX=${INSTALL_PREFIX} >> # -DModule_vtkRenderingVolumeOpenGL=ON >> # -DModule_vtkRenderingVolumeOpenGLNew=ON >> -DModule_vtkTestingCore:BOOL=ON >> -DModule_vtkTestingRendering=ON >> -DModule_vtkRenderingVolumeOpenGL2=ON >> >> -DVTK_RENDERING_BACKEND=OpenGL2 >> -DBUILD_EXAMPLES=${VTK_BUILD_EXAMPLES} >> -DBUILD_TESTING=${VTK_BUILD_TESTING} >> >> >> >> ExternalProject_Add( >> ${VTK_VERSION_NAME} >> ... >> CMAKE_ARGS ${VTK_BUILD_DEFINITIONS} >> ... >> ) >> >> >> >> > > > -- > Brian J. Davis > -- Brian J. Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Fri Apr 6 02:20:58 2018 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Fri, 6 Apr 2018 08:20:58 +0200 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: Bill, Andrew, simply brilliant. I've spot some parts in the Chapters 3 and 6 strawmans that were already mentioned by you and Todd whose transition has some errors (links that are missing, missing cross-reference links to VTK classes, examples or bibliography, etc.). How can we contribute to fix them? Are you still working on the transition tools to improve the output, or you want us to manually try to fix them? I can help with/do all the Maths in LaTeX Bill. However, if the tool you found works or the transition will be automatic, I do not see where to help at this stage. Please, let me know. Otherwise, it's looking awesome. As for the LaTeX vs. Markdown/reStrucuredText discussion: I've contributed with some patches to the ITK SW Guide written in LaTeX. I guess at the time it was written Markdown and reStrucuredText were not available, so I think the choice was fair. Having said that, I admit that the learning curve for LaTeX may be higher than that for Markdown or reStrucuredText. The latter are tailored for web navigation, which is most people expect. And times have changed. I ignore whether Markdown/reStrucuredText support for tools to have proper printed texts is likely to be improved. I guess the ITK SW Guide requiring to be compiled (both the examples to generate the figures and LaTeX itself) is not a downside, since VTK Cxx examples used in this book need so. I guess having a first version for both cases (LaTeX and Markdown/reStrucuredText) is somehow costly at the beginning. Maintaining/sync'ing them once that is done every time there is a change may not effortless also. But that may be the price to pay. The ITK SW Guide keeps being maintained. I ignore whether the ITK folks at Kitware have considered to transition to Markdown or reStrucuredText. JON HAITZ -- On 6 April 2018 at 01:05, Todd via vtk-developers wrote: > Fantastic. I think Latex is definitely the way to go, although I'm no expert > in writing it. > > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtk-developers > > From thomas_sgouros at brown.edu Fri Apr 6 07:32:49 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Fri, 6 Apr 2018 07:32:49 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Hi All: Following up on this, can anyone advise me how to get the data out of a ParticleReader? I think my best option is just to build up data in a vtkPoints array by hand, as it were. But I can't find a ParticleReader::GetParticleData method or even anything that looks remotely like it. I tried converting it to a vtkTable, but that was rejected. The file is an ASCII vtk file, so I can always read it by hand, but that can't really be the right way to do this, can it? Thank you, -Tom On Tue, Apr 3, 2018 at 4:54 PM, Sgouros, Thomas wrote: > "It is often some unexpected minor thing that causes the failure." > > I'm certain of that. > > Here's the code, mostly pinched straight from the Glyph3D example. (And > I've tried swapping the endianness, just for giggles.) The data is an ASCII > vtk file that you can get from sgouros.com/output_p40.vtk. > > Thank you, > > -Tom > > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > int main(int argc, char* argv[]) { > > std::string filePath = argv[1]; > vtkSmartPointer reader = > vtkSmartPointer::New(); > > reader->SetFileName ( filePath.c_str() ); > // if nothing gets displayed or totally wrong, swap the endianness > reader->SetDataByteOrderToBigEndian(); > reader->Update(); > > // Create anything you want here, we will use a cube for the demo. > vtkSmartPointer cubeSource = > vtkSmartPointer::New(); > > vtkSmartPointer glyph3D = > vtkSmartPointer::New(); > > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > glyph3D->SetInputConnection(reader->GetOutputPort()); > > glyph3D->Update(); > > std::cout << *(reader->GetOutput()) << std::endl; > > // Visualize > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(glyph3D->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderer->AddActor(actor); > renderer->SetBackground(.3, .6, .3); // Background color green > > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > > On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen > wrote: > >> Post a small compilable example, please. It is often some unexpected >> minor thing that causes the failure. >> >> Thanks, >> >> Bill >> >> BTW: The wiki examples have been replaced by VTKExamples here: >> >> https://lorensen.github.io/VTKExamples/site/ >> >> >> On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain >> wrote: >> > What you are doing seems correct and the data is valid (it has points). >> > >> > How do you render the glyph3d filter? Using a polydata mapper? I'm >> guessing >> > no issue on that end? >> > >> > Ideally you should use the glyph mapper instead of the filter. But if >> memory >> > is not a big deal, don't worry about it. >> > >> > Seb >> > >> > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas < >> thomas_sgouros at brown.edu> >> > wrote: >> >> >> >> This is reader->GetOutput() >> >> >> >> vtkPolyData (0x7f8ce050dad0) >> >> >> >> Debug: Off >> >> >> >> Modified Time: 217 >> >> >> >> Reference Count: 1 >> >> >> >> Registered Events: (none) >> >> >> >> Information: 0x7f8ce050d9b0 >> >> >> >> Data Released: False >> >> >> >> Global Release Data: Off >> >> >> >> UpdateTime: 218 >> >> >> >> Field Data: >> >> >> >> Debug: Off >> >> >> >> Modified Time: 167 >> >> >> >> Reference Count: 1 >> >> >> >> Registered Events: (none) >> >> >> >> Number Of Arrays: 0 >> >> >> >> Number Of Components: 0 >> >> >> >> Number Of Tuples: 0 >> >> >> >> Number Of Points: 10229 >> >> >> >> Number Of Cells: 10229 >> >> >> >> >> >> It goes on for quite a bit more. As I said, when I feed this to a >> >> vtkPolyDataMapper, it displays and works fine, but I want little >> spheres, >> >> not little flat rectangles and I thought I could just redirect that >> into the >> >> vtkGlyph3D object, but I must be misunderstanding something. >> >> >> >> Thank you, >> >> >> >> -Tom >> >> >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain >> >> wrote: >> >>> >> >>> You can try to see what the GetOutput() contains as my assumption it >> >>> would be empty (No points => Number of Points: 0). >> >>> >> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); >> >>> >> >>> What I mean was >> >>> >> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); >> >>> >> >>> >> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas >> >>> wrote: >> >>>> >> >>>> Hi Sebastien: >> >>>> >> >>>> Sorry if that was unclear. The third block of code comes first, and >> >>>> reader->Update() is called before I use its GetOutput(). In situ, >> it looks >> >>>> like this: >> >>>> >> >>>> ... >> >>>> vtkSmartPointer reader = >> >>>> vtkSmartPointer::New(); >> >>>> reader->SetFileName ( filePath.c_str() ); >> >>>> reader->SetDataByteOrderToBigEndian(); >> >>>> reader->Update(); >> >>>> >> >>>> // Create anything you want here, we will use a cube for the demo. >> >>>> vtkSmartPointer cubeSource = >> >>>> vtkSmartPointer::New(); >> >>>> >> >>>> vtkSmartPointer glyph3D = >> >>>> vtkSmartPointer::New(); >> >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >>>> glyph3D->SetInputData(reader->GetOutput()); >> >>>> glyph3D->Update(); >> >>>> >> >>>> ... >> >>>> >> >>>> I don't think I understand what you mean by the connection instead of >> >>>> the dataset directly. >> >>>> >> >>>> Is there a way to peek inside glyph3D and see what it thinks it has? >> >>>> >> >>>> Thank you, >> >>>> >> >>>> -Tom >> >>>> >> >>>> >> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain >> >>>> wrote: >> >>>>> >> >>>>> Tom, >> >>>>> >> >>>>> Just make sure that reader->Update(); was called before >> >>>>> glyph3D->SetInputData(reader->GetOutput()); >> >>>>> But it would be better to use the connection instead of the dataset >> >>>>> directly. >> >>>>> >> >>>>> Seb >> >>>>> >> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas >> >>>>> wrote: >> >>>>>> >> >>>>>> Hello all: >> >>>>>> >> >>>>>> Can someone help me understand why this code works: >> >>>>>> >> >>>>>> vtkSmartPointer glyph3D = >> >>>>>> vtkSmartPointer::New(); >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >>>>>> glyph3D->SetInputData(polydata); >> >>>>>> glyph3D->Update(); >> >>>>>> >> >>>>>> And this does not (nothing displayed)? >> >>>>>> >> >>>>>> vtkSmartPointer glyph3D = >> >>>>>> vtkSmartPointer::New(); >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >>>>>> glyph3D->SetInputData(reader->GetOutput()); >> >>>>>> glyph3D->Update(); >> >>>>>> >> >>>>>> The first clip is from >> >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D >> >>>>>> >> >>>>>> The 'reader' object is stolen from the ParticleReader example: >> >>>>>> >> >>>>>> vtkSmartPointer reader = >> >>>>>> vtkSmartPointer::New(); >> >>>>>> reader->SetFileName ( filePath.c_str() ); >> >>>>>> reader->SetDataByteOrderToBigEndian(); >> >>>>>> reader->Update(); >> >>>>>> >> >>>>>> The program compiles, but no data appears. It works fine (data >> >>>>>> appears) in the context of the ParticleReader example, where it >> shows all >> >>>>>> the data points. But I want to see them as glyphs, not little >> squares. I >> >>>>>> seem to be misunderstanding something fundamental, but not seeing >> what it >> >>>>>> could be. >> >>>>>> >> >>>>>> Many thanks, >> >>>>>> >> >>>>>> -Tom >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> _______________________________________________ >> >>>>>> Powered by www.kitware.com >> >>>>>> >> >>>>>> Visit other Kitware open-source projects at >> >>>>>> http://www.kitware.com/opensource/opensource.html >> >>>>>> >> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >> >>>>>> >> >>>>>> Search the list archives at: http://markmail.org/search/?q= >> vtkusers >> >>>>>> >> >>>>>> Follow this link to subscribe/unsubscribe: >> >>>>>> https://vtk.org/mailman/listinfo/vtkusers >> >>>>>> >> >>>>> >> >>>> >> >>> >> >> >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > https://vtk.org/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Unpaid intern in BillsParadise at noware dot com >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas_sgouros at brown.edu Fri Apr 6 07:48:29 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Fri, 6 Apr 2018 07:48:29 -0400 Subject: [vtkusers] compiling with vtk Message-ID: Hi All: I have a CMakeLists.txt file with this in it: find_package(VTK REQUIRED) include(${VTK_USE_FILE}) message(STATUS "VTK: ${VTK_LIBRARIES}") ... And a subdirectory CMakeLists.txt file with this: add_executable(vtkObjViewer vtkObjViewer.cxx) target_link_libraries(vtkObjViewer PUBLIC MinVR::MinVR ${VTK_LIBRARIES} That produces this output: -- VTK: vtksys;vtkCommonCore;vtkCommonMath;vtkCommonMisc;... ... [ 50%] *Linking CXX executable ../bin/vtkObjViewer* ld: library not found for -lvtksys clang: *error: *linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/vtkObjViewer] Error 1 make[1]: *** [examples/CMakeFiles/vtkObjViewer.dir/all] Error 2 make: *** [all] Error 2 The vtksys library is obviously wtihin the libraries list, right there at the front, and I've confirmed that libvtksys exists and is in the directory where I've pointed cmake. Can anyone help me understand what I'm doing wrong? Or at least what else I should check? Thank you, -Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Apr 6 08:42:56 2018 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Apr 2018 08:42:56 -0400 Subject: [vtkusers] VTK 8.1.0 opengl 2 init.... how do I do this now? In-Reply-To: References: Message-ID: Supposedly you shouldn't need to do any of that and CMake will take care of it all assuming you link against the right targets (which generally works for me for my projects). In one case where that did not seem to work on an iOS app I added vtkRenderingOpenGL2ObjectFactory *of = vtkRenderingOpenGL2ObjectFactory::New(); vtkObjectFactory::RegisterFactory(of); to my source code to pull in and initialize the object factory I needed. On Thu, Apr 5, 2018 at 7:54 PM, Brian Davis wrote: > maybe: > > //VTK_MODULE_INIT(vtkRenderingOpenGL); > VTK_MODULE_INIT(vtkRenderingOpenGL2); > VTK_MODULE_INIT(vtkInteractionStyle); > //VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); > //VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper); > //VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper); > > > and > > target_compile_definitions( > vtk_volume_renderer > PRIVATE > volume_render_EXPORTS=yes > vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)" > vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) > vtkRenderingCore=vtkRenderingOpenGL > ) > > at least it compiles.with warning > > ... > 2>C:/projects/4DDSA/brian/build/CMakeFiles/vtkRenderingCore_AUTOINIT_ > vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingOpenGL2.h(1): > warning C4005: 'vtkRenderingCore_AUTOINIT' : macro redefinition > 2> command-line arguments : see previous definition of > 'vtkRenderingCore_AUTOINIT' > ... > ========== Build: 2 succeeded, 0 failed, 5 up-to-date, 0 skipped ========== > > > > > On Thu, Apr 5, 2018 at 6:38 PM, Brian Davis wrote: > >> Part of solution may be to change: >> >> VTK_MODULE_INIT(vtkRenderingOpenGL); >> >> to >> >> VTK_MODULE_INIT(vtkRenderingOpenGL2); >> >> >> >> On Thu, Apr 5, 2018 at 6:30 PM, Brian Davis wrote: >> >>> I use to: >>> >>> #include >>> VTK_MODULE_INIT(vtkRenderingOpenGL); >>> VTK_MODULE_INIT(vtkInteractionStyle); >>> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); >>> //VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper); >>> //VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper); >>> >>> >>> and at times define >>> >>> vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)" >>> vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) >>> vtkRenderingCore=vtkRenderingOpenGL >>> >>> However in 8.1.0 build I get >>> >>> (void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) referenced in >>> function "public: __cdecl vtkRenderingOpenGL_ModuleInit: >>> :vtkRenderingOpenGL_ModuleInit(void)" (??0vtkRenderingOpenGL_ModuleInit@ >>> @QEAA at XZ) >>> >>> which reminds me of every other time I try and build it when the version >>> changes. What is special sauce recipe for 8.1.0 and building with post >>> opengl 2 (GLSL shader enabled version) >>> >>> >>> Anyone count the number of threads over the years that discuss the >>> opengl init in VTK... there is such a sea of posts I am not even going to >>> bother to fish out what may be the solution somewhere buried in the ether >>> else I have to get out my heavy duty digital backhoe and realy dig for it. >>> Sure I'll find it in some blog post somewhere. >>> >>> Any one at Kitware want to rethink the opengl design (Build and init >>> process)? >>> >>> >>> my superbuild of vtk defines: >>> >>> VTK_BUILD_DEFINITIONS >>> -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} >>> -DINSTALL_PREFIX=${INSTALL_PREFIX} >>> # -DModule_vtkRenderingVolumeOpenGL=ON >>> # -DModule_vtkRenderingVolumeOpenGLNew=ON >>> -DModule_vtkTestingCore:BOOL=ON >>> -DModule_vtkTestingRendering=ON >>> -DModule_vtkRenderingVolumeOpenGL2=ON >>> >>> -DVTK_RENDERING_BACKEND=OpenGL2 >>> -DBUILD_EXAMPLES=${VTK_BUILD_EXAMPLES} >>> -DBUILD_TESTING=${VTK_BUILD_TESTING} >>> >>> >>> >>> ExternalProject_Add( >>> ${VTK_VERSION_NAME} >>> ... >>> CMAKE_ARGS ${VTK_BUILD_DEFINITIONS} >>> ... >>> ) >>> >>> >>> >>> >> >> >> -- >> Brian J. Davis >> > > > > -- > Brian J. Davis > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 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 ken.martin at kitware.com Fri Apr 6 08:44:12 2018 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Apr 2018 08:44:12 -0400 Subject: [vtkusers] Build Error concerning VTK's OpenVR Module In-Reply-To: References: Message-ID: BTW I merged a fix for this into master and tested it against the latest OpenVR API and it seems to work. So hopefully we are good until they change something else :-) On Tue, Apr 3, 2018 at 12:29 PM, Jamil Goettlich wrote: > Hi Ken, > > thanks alot for the fast answer, it compiles now! I just commented the two > error lines out and removed the bool "bIsInputCapturedByAnotherProcess" > from another if-condition. > > Thanks, > Jamil > > 2018-04-03 18:15 GMT+02:00 Ken Martin : > >> Nah, they (steam/openvr) just changed the API and removed that function. >> You can remove it in your copy of VTK or I'll push a patch later today to >> do it. >> >> Thanks! >> Ken >> >> On Tue, Apr 3, 2018 at 11:44 AM, Jamil Goettlich < >> jamil.goettlich at gmail.com> wrote: >> >>> Hello VTK Users, >>> >>> I am having trouble compiling VTK's OpenVR Module. I am using Visual >>> Studio 15 2017 Win64 compiler on a Windows 10 machine. >>> I linked include files and the library from the openVR Module: >>> https://github.com/ValveSoftware/openvr >>> I also downloaded SDL2, but it was not asked within the configuring >>> process. >>> The error I get in Visual Studio is the following: >>> Error C2039 'IsInputFocusCapturedByAnotherProcess': is not a member of >>> 'vr::IVRSystem' Project: vtkRenderingOpenVR >>> C:\Tools\VTK-8.1.0\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx line 281 >>> >>> What am I doing wrong in the build process? Did I forget to link >>> anything? >>> >>> Thanks a lot, >>> Jamil >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> >> 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. >> > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 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 DLRdave at aol.com Fri Apr 6 09:28:15 2018 From: DLRdave at aol.com (David Cole) Date: Fri, 6 Apr 2018 09:28:15 -0400 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: "I ignore whether Markdown/reStrucuredText support for tools to have proper printed texts is likely to be improved." I have become a big fan of "print to pdf using the Chrome browser" to get a printed copy of web content these days. It's actually not a bad way to go if you don't need to refer to page numbers within the text. And now, this is just my opinion, so take with yet another grain of salt: The available "writer pool" for LaTeX is far far smaller than that for markdown. If the math stuff must be in LaTeX, I'd very strongly prefer to see it as embedded chunks of LaTeX than have the whole thing be in LaTeX. Nice work, as usual Bill. Thanks, David C. On Fri, Apr 6, 2018 at 2:20 AM, Jon Haitz Legarreta wrote: > Bill, Andrew, simply brilliant. > > I've spot some parts in the Chapters 3 and 6 strawmans that were > already mentioned by you and Todd whose transition has some errors > (links that are missing, missing cross-reference links to VTK classes, > examples or bibliography, etc.). > > How can we contribute to fix them? Are you still working on the > transition tools to improve the output, or you want us to manually try > to fix them? > > I can help with/do all the Maths in LaTeX Bill. However, if the tool > you found works or the transition will be automatic, I do not see > where to help at this stage. Please, let me know. > > Otherwise, it's looking awesome. > > As for the LaTeX vs. Markdown/reStrucuredText discussion: > > I've contributed with some patches to the ITK SW Guide written in > LaTeX. I guess at the time it was written Markdown and reStrucuredText > were not available, so I think the choice was fair. > > Having said that, I admit that the learning curve for LaTeX may be > higher than that for Markdown or reStrucuredText. The latter are > tailored for web navigation, which is most people expect. And times > have changed. I ignore whether Markdown/reStrucuredText support for > tools to have proper printed texts is likely to be improved. > > I guess the ITK SW Guide requiring to be compiled (both the examples > to generate the figures and LaTeX itself) is not a downside, since VTK > Cxx examples used in this book need so. > > I guess having a first version for both cases (LaTeX and > Markdown/reStrucuredText) is somehow costly at the beginning. > Maintaining/sync'ing them once that is done every time there is a > change may not effortless also. But that may be the price to pay. > > The ITK SW Guide keeps being maintained. I ignore whether the ITK > folks at Kitware have considered to transition to Markdown or > reStrucuredText. > > JON HAITZ > > -- > > > On 6 April 2018 at 01:05, Todd via vtk-developers > wrote: >> Fantastic. I think Latex is definitely the way to go, although I'm no expert >> in writing it. >> >> _______________________________________________ >> 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: >> https://vtk.org/mailman/listinfo/vtk-developers >> >> > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtk-developers > From jamil.goettlich at gmail.com Fri Apr 6 10:09:25 2018 From: jamil.goettlich at gmail.com (Jamil Goettlich) Date: Fri, 6 Apr 2018 16:09:25 +0200 Subject: [vtkusers] Build Error concerning VTK's OpenVR Module In-Reply-To: References: Message-ID: Awesome thank you :) As there is now a new Vive on the market (HTC Vive Pro), we are considering getting one. It says on the website that there is backwards compatibility. Has anyone tried vtk and OpenVR with the new hardware and can verify that? 2018-04-06 14:44 GMT+02:00 Ken Martin : > BTW I merged a fix for this into master and tested it against the latest > OpenVR API and it seems to work. So hopefully we are good until they change > something else :-) > > On Tue, Apr 3, 2018 at 12:29 PM, Jamil Goettlich < > jamil.goettlich at gmail.com> wrote: > >> Hi Ken, >> >> thanks alot for the fast answer, it compiles now! I just commented the >> two error lines out and removed the bool "bIsInputCapturedByAnotherProcess" >> from another if-condition. >> >> Thanks, >> Jamil >> >> 2018-04-03 18:15 GMT+02:00 Ken Martin : >> >>> Nah, they (steam/openvr) just changed the API and removed that function. >>> You can remove it in your copy of VTK or I'll push a patch later today to >>> do it. >>> >>> Thanks! >>> Ken >>> >>> On Tue, Apr 3, 2018 at 11:44 AM, Jamil Goettlich < >>> jamil.goettlich at gmail.com> wrote: >>> >>>> Hello VTK Users, >>>> >>>> I am having trouble compiling VTK's OpenVR Module. I am using Visual >>>> Studio 15 2017 Win64 compiler on a Windows 10 machine. >>>> I linked include files and the library from the openVR Module: >>>> https://github.com/ValveSoftware/openvr >>>> I also downloaded SDL2, but it was not asked within the configuring >>>> process. >>>> The error I get in Visual Studio is the following: >>>> Error C2039 'IsInputFocusCapturedByAnotherProcess': is not a member of >>>> 'vr::IVRSystem' Project: vtkRenderingOpenVR >>>> C:\Tools\VTK-8.1.0\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx line 281 >>>> >>>> What am I doing wrong in the build process? Did I forget to link >>>> anything? >>>> >>>> Thanks a lot, >>>> Jamil >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> https://vtk.org/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Ken Martin PhD >>> Distinguished Engineer >>> Kitware Inc. >>> 28 Corporate Drive >>> >>> Clifton Park NY 12065 >>> >>> >>> 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. >>> >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > > Clifton Park NY 12065 > > > 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 bill.lorensen at gmail.com Fri Apr 6 10:11:52 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 6 Apr 2018 07:11:52 -0700 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: More progress.I found a great online tool to generate Latex formulas. With no previous Latex experience,I was able to generate all of the equations for Chapter 3. I can embed Latex in the markdown. The equations are rendered by MathJax. Here is the online website: http://www.hostmath.com/ and here is the updated Chapter 3: https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter3/ Bill On Fri, Apr 6, 2018 at 6:28 AM, David Cole via vtk-developers wrote: > "I ignore whether Markdown/reStrucuredText support for > tools to have proper printed texts is likely to be improved." > > I have become a big fan of "print to pdf using the Chrome browser" to > get a printed copy of web content these days. It's actually not a bad > way to go if you don't need to refer to page numbers within the text. > > > And now, this is just my opinion, so take with yet another grain of salt: > > The available "writer pool" for LaTeX is far far smaller than that for > markdown. If the math stuff must be in LaTeX, I'd very strongly prefer > to see it as embedded chunks of LaTeX than have the whole thing be in > LaTeX. > > > Nice work, as usual Bill. > > > Thanks, > David C. > > > > On Fri, Apr 6, 2018 at 2:20 AM, Jon Haitz Legarreta > wrote: >> Bill, Andrew, simply brilliant. >> >> I've spot some parts in the Chapters 3 and 6 strawmans that were >> already mentioned by you and Todd whose transition has some errors >> (links that are missing, missing cross-reference links to VTK classes, >> examples or bibliography, etc.). >> >> How can we contribute to fix them? Are you still working on the >> transition tools to improve the output, or you want us to manually try >> to fix them? >> >> I can help with/do all the Maths in LaTeX Bill. However, if the tool >> you found works or the transition will be automatic, I do not see >> where to help at this stage. Please, let me know. >> >> Otherwise, it's looking awesome. >> >> As for the LaTeX vs. Markdown/reStrucuredText discussion: >> >> I've contributed with some patches to the ITK SW Guide written in >> LaTeX. I guess at the time it was written Markdown and reStrucuredText >> were not available, so I think the choice was fair. >> >> Having said that, I admit that the learning curve for LaTeX may be >> higher than that for Markdown or reStrucuredText. The latter are >> tailored for web navigation, which is most people expect. And times >> have changed. I ignore whether Markdown/reStrucuredText support for >> tools to have proper printed texts is likely to be improved. >> >> I guess the ITK SW Guide requiring to be compiled (both the examples >> to generate the figures and LaTeX itself) is not a downside, since VTK >> Cxx examples used in this book need so. >> >> I guess having a first version for both cases (LaTeX and >> Markdown/reStrucuredText) is somehow costly at the beginning. >> Maintaining/sync'ing them once that is done every time there is a >> change may not effortless also. But that may be the price to pay. >> >> The ITK SW Guide keeps being maintained. I ignore whether the ITK >> folks at Kitware have considered to transition to Markdown or >> reStrucuredText. >> >> JON HAITZ >> >> -- >> >> >> On 6 April 2018 at 01:05, Todd via vtk-developers >> wrote: >>> Fantastic. I think Latex is definitely the way to go, although I'm no expert >>> in writing it. >>> >>> _______________________________________________ >>> 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: >>> https://vtk.org/mailman/listinfo/vtk-developers >>> >>> >> _______________________________________________ >> 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: >> https://vtk.org/mailman/listinfo/vtk-developers >> > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtk-developers > -- Unpaid intern in BillsParadise at noware dot com From jamil.goettlich at gmail.com Fri Apr 6 10:46:00 2018 From: jamil.goettlich at gmail.com (Jamil Goettlich) Date: Fri, 6 Apr 2018 16:46:00 +0200 Subject: [vtkusers] General Question to VTK in VR Message-ID: Hello VTK Users, I have some general questions to the current state of VR in VTK. Please let me know if this is not the right place to ask questions about that. According to what I have read (among others "Enhancements to VTK enabling scientific visualization in immersive environments") there are two favourized ways of bringing VTK into VR: - VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs) - OpenGL context sharing (VTK Rendering External) --> Using existing contexts from other (VR-)Toolkits (Multiple devices) Until now I have only seen single frames being displayed in VR (in VTK as well as in Paraview), not unsteady state (e.g. in ParaView 5.3, OpenVR version, I cannot press the play button and send the content to OpenVR, I can only see one frame on the HMD). >From what I have seen so far, the VR-Plugin of ParaView does not use any of the two methods. They are using the library VRPN for interacting but all the rest is done within ParaView. My questions are the following: - Is there anybody who has displayed unsteady states with VTK in VR and if so what method was used and how was that done? - Is there any paper or detailled documentation to the OpenGL context sharing method? I did not find alot to that except from the testing example "TestGLUTRenderWindow.cxx" which I was not able to build properly until now. Also, if anyone has experience using FreeVR with VTK OpenGL context sharing method, I would be very interested in that too. I hope my questions are appropriate (and not too widespread) and I would be very happy to be pointed to some current sources, especially concerning unsteady state simulations with VTK in VR. I would be very happy for anyone to share their own experiences or some current papers to that topic. Thanks alot, Jamil -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Fri Apr 6 10:49:01 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 6 Apr 2018 23:49:01 +0900 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Hello Tom, Your code and data work without any problem and display glyphs. The testing data is attached. There is some doubt whether the problem always occurs. Thanks, 2018-04-04 5:54 GMT+09:00 Sgouros, Thomas : > "It is often some unexpected minor thing that causes the failure." > > I'm certain of that. > > Here's the code, mostly pinched straight from the Glyph3D example. (And I've > tried swapping the endianness, just for giggles.) The data is an ASCII vtk > file that you can get from sgouros.com/output_p40.vtk. > > Thank you, > > -Tom > > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > int main(int argc, char* argv[]) { > > std::string filePath = argv[1]; > vtkSmartPointer reader = > vtkSmartPointer::New(); > > reader->SetFileName ( filePath.c_str() ); > // if nothing gets displayed or totally wrong, swap the endianness > reader->SetDataByteOrderToBigEndian(); > reader->Update(); > > // Create anything you want here, we will use a cube for the demo. > vtkSmartPointer cubeSource = > vtkSmartPointer::New(); > > vtkSmartPointer glyph3D = > vtkSmartPointer::New(); > > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > glyph3D->SetInputConnection(reader->GetOutputPort()); > > glyph3D->Update(); > > std::cout << *(reader->GetOutput()) << std::endl; > > // Visualize > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(glyph3D->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderer->AddActor(actor); > renderer->SetBackground(.3, .6, .3); // Background color green > > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > > On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen > wrote: >> >> Post a small compilable example, please. It is often some unexpected >> minor thing that causes the failure. >> >> Thanks, >> >> Bill >> >> BTW: The wiki examples have been replaced by VTKExamples here: >> >> https://lorensen.github.io/VTKExamples/site/ >> >> >> On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain >> wrote: >> > What you are doing seems correct and the data is valid (it has points). >> > >> > How do you render the glyph3d filter? Using a polydata mapper? I'm >> > guessing >> > no issue on that end? >> > >> > Ideally you should use the glyph mapper instead of the filter. But if >> > memory >> > is not a big deal, don't worry about it. >> > >> > Seb >> > >> > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas >> > >> > wrote: >> >> >> >> This is reader->GetOutput() >> >> >> >> vtkPolyData (0x7f8ce050dad0) >> >> >> >> Debug: Off >> >> >> >> Modified Time: 217 >> >> >> >> Reference Count: 1 >> >> >> >> Registered Events: (none) >> >> >> >> Information: 0x7f8ce050d9b0 >> >> >> >> Data Released: False >> >> >> >> Global Release Data: Off >> >> >> >> UpdateTime: 218 >> >> >> >> Field Data: >> >> >> >> Debug: Off >> >> >> >> Modified Time: 167 >> >> >> >> Reference Count: 1 >> >> >> >> Registered Events: (none) >> >> >> >> Number Of Arrays: 0 >> >> >> >> Number Of Components: 0 >> >> >> >> Number Of Tuples: 0 >> >> >> >> Number Of Points: 10229 >> >> >> >> Number Of Cells: 10229 >> >> >> >> >> >> It goes on for quite a bit more. As I said, when I feed this to a >> >> vtkPolyDataMapper, it displays and works fine, but I want little >> >> spheres, >> >> not little flat rectangles and I thought I could just redirect that >> >> into the >> >> vtkGlyph3D object, but I must be misunderstanding something. >> >> >> >> Thank you, >> >> >> >> -Tom >> >> >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain >> >> wrote: >> >>> >> >>> You can try to see what the GetOutput() contains as my assumption it >> >>> would be empty (No points => Number of Points: 0). >> >>> >> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); >> >>> >> >>> What I mean was >> >>> >> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); >> >>> >> >>> >> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas >> >>> wrote: >> >>>> >> >>>> Hi Sebastien: >> >>>> >> >>>> Sorry if that was unclear. The third block of code comes first, and >> >>>> reader->Update() is called before I use its GetOutput(). In situ, it >> >>>> looks >> >>>> like this: >> >>>> >> >>>> ... >> >>>> vtkSmartPointer reader = >> >>>> vtkSmartPointer::New(); >> >>>> reader->SetFileName ( filePath.c_str() ); >> >>>> reader->SetDataByteOrderToBigEndian(); >> >>>> reader->Update(); >> >>>> >> >>>> // Create anything you want here, we will use a cube for the demo. >> >>>> vtkSmartPointer cubeSource = >> >>>> vtkSmartPointer::New(); >> >>>> >> >>>> vtkSmartPointer glyph3D = >> >>>> vtkSmartPointer::New(); >> >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >>>> glyph3D->SetInputData(reader->GetOutput()); >> >>>> glyph3D->Update(); >> >>>> >> >>>> ... >> >>>> >> >>>> I don't think I understand what you mean by the connection instead of >> >>>> the dataset directly. >> >>>> >> >>>> Is there a way to peek inside glyph3D and see what it thinks it has? >> >>>> >> >>>> Thank you, >> >>>> >> >>>> -Tom >> >>>> >> >>>> >> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain >> >>>> wrote: >> >>>>> >> >>>>> Tom, >> >>>>> >> >>>>> Just make sure that reader->Update(); was called before >> >>>>> glyph3D->SetInputData(reader->GetOutput()); >> >>>>> But it would be better to use the connection instead of the dataset >> >>>>> directly. >> >>>>> >> >>>>> Seb >> >>>>> >> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas >> >>>>> wrote: >> >>>>>> >> >>>>>> Hello all: >> >>>>>> >> >>>>>> Can someone help me understand why this code works: >> >>>>>> >> >>>>>> vtkSmartPointer glyph3D = >> >>>>>> vtkSmartPointer::New(); >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >>>>>> glyph3D->SetInputData(polydata); >> >>>>>> glyph3D->Update(); >> >>>>>> >> >>>>>> And this does not (nothing displayed)? >> >>>>>> >> >>>>>> vtkSmartPointer glyph3D = >> >>>>>> vtkSmartPointer::New(); >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >>>>>> glyph3D->SetInputData(reader->GetOutput()); >> >>>>>> glyph3D->Update(); >> >>>>>> >> >>>>>> The first clip is from >> >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D >> >>>>>> >> >>>>>> The 'reader' object is stolen from the ParticleReader example: >> >>>>>> >> >>>>>> vtkSmartPointer reader = >> >>>>>> vtkSmartPointer::New(); >> >>>>>> reader->SetFileName ( filePath.c_str() ); >> >>>>>> reader->SetDataByteOrderToBigEndian(); >> >>>>>> reader->Update(); >> >>>>>> >> >>>>>> The program compiles, but no data appears. It works fine (data >> >>>>>> appears) in the context of the ParticleReader example, where it >> >>>>>> shows all >> >>>>>> the data points. But I want to see them as glyphs, not little >> >>>>>> squares. I >> >>>>>> seem to be misunderstanding something fundamental, but not seeing >> >>>>>> what it >> >>>>>> could be. >> >>>>>> >> >>>>>> Many thanks, >> >>>>>> >> >>>>>> -Tom >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> _______________________________________________ >> >>>>>> Powered by www.kitware.com >> >>>>>> >> >>>>>> Visit other Kitware open-source projects at >> >>>>>> http://www.kitware.com/opensource/opensource.html >> >>>>>> >> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >> >>>>>> >> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >>>>>> >> >>>>>> Follow this link to subscribe/unsubscribe: >> >>>>>> https://vtk.org/mailman/listinfo/vtkusers >> >>>>>> >> >>>>> >> >>>> >> >>> >> >> >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > https://vtk.org/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Unpaid intern in BillsParadise at noware dot com > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- A non-text attachment was scrubbed... Name: ParticleGlyph.tar.gz Type: application/x-gzip Size: 57499 bytes Desc: not available URL: From ken.martin at kitware.com Fri Apr 6 11:01:05 2018 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Apr 2018 11:01:05 -0400 Subject: [vtkusers] General Question to VTK in VR In-Reply-To: References: Message-ID: At a high level the OpenVR module in VTK definitely supports animations in VR. We have a demo of 4D pediatric medical data and another of airflow stream particles. Both run nicely with no issues. So technically there is no problem with it. I believe the nightly PV builds for windows now include the OpenVR plugin and it also supports animations using the OpenVR plugin. This version may be more recent and capable than the OpenVR specific executable that I previously posted. I think you send to OpenVR first, and then start playing the animation. I have tested this, just not in the past month or so. But....200 fps animations are not really PVs strong suit (never really been a main use case for it) so you may run into performance issues unless you are careful. FWIW PV uses the shared context approach for OpenVR. The VR (not openVR) plugin for PV is a completely different beast. - Ken On Fri, Apr 6, 2018 at 10:46 AM, Jamil Goettlich wrote: > Hello VTK Users, > > I have some general questions to the current state of VR in VTK. Please > let me know if this is not the right place to ask questions about that. > According to what I have read (among others "Enhancements to VTK enabling > scientific visualization in immersive environments") there are two > favourized ways of bringing VTK into VR: > - VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs) > - OpenGL context sharing (VTK Rendering External) --> Using existing > contexts from other (VR-)Toolkits (Multiple devices) > > Until now I have only seen single frames being displayed in VR (in VTK as > well as in Paraview), not unsteady state (e.g. in ParaView 5.3, OpenVR > version, I cannot press the play button and send the content to OpenVR, I > can only see one frame on the HMD). > From what I have seen so far, the VR-Plugin of ParaView does not use any > of the two methods. They are using the library VRPN for interacting but all > the rest is done within ParaView. > > My questions are the following: > - Is there anybody who has displayed unsteady states with VTK in VR and if > so what method was used and how was that done? > - Is there any paper or detailled documentation to the OpenGL context > sharing method? I did not find alot to that except from the testing example > "TestGLUTRenderWindow.cxx" which I was not able to build properly until > now. Also, if anyone has experience using FreeVR with VTK OpenGL context > sharing method, I would be very interested in that too. > > I hope my questions are appropriate (and not too widespread) and I would > be very happy to be pointed to some current sources, especially concerning > unsteady state simulations with VTK in VR. I would be very happy for anyone > to share their own experiences or some current papers to that topic. > > Thanks alot, > > Jamil > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 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 lasso at queensu.ca Fri Apr 6 11:05:39 2018 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 6 Apr 2018 15:05:39 +0000 Subject: [vtkusers] General Question to VTK in VR In-Reply-To: References: Message-ID: > Is there anybody who has displayed unsteady states with VTK in VR and if so what method was used and how was that done? Yes! 3D Slicer has an awesome VR viewer. With a single click, the 3D scene appears in your headset and the application remains fully interactive ? you can manipulate objects both on the desktop using keyboard and mouse, and using VR controllers in the VR view. You can also view dynamic content, such as 4D volumes even using volume rendering. The source code is available here: https://github.com/KitwareMedical/SlicerVirtualReality. You should be able to find all the implementation details there. To try it: Download a recent Slicer nightly version (https://download.slicer.org), install SlicerVirtualReality extension from Slicer?s extension manager. After you loaded your data you just need to click the VR headset button on the toolbar (?Show scene in virtual reality?). Limitations: There is a bug in volume rendering that clips the volume at unexpected locations (Kitware is working on a fix, expected to be ready soon). Position of objects that are moved using VR controllers are not yet synchronization back to the scene displayed in the main window (this is the next focus of development). Andras From: vtkusers On Behalf Of Jamil Goettlich Sent: Friday, April 6, 2018 10:46 AM To: vtk Subject: [vtkusers] General Question to VTK in VR Hello VTK Users, I have some general questions to the current state of VR in VTK. Please let me know if this is not the right place to ask questions about that. According to what I have read (among others "Enhancements to VTK enabling scientific visualization in immersive environments") there are two favourized ways of bringing VTK into VR: - VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs) - OpenGL context sharing (VTK Rendering External) --> Using existing contexts from other (VR-)Toolkits (Multiple devices) Until now I have only seen single frames being displayed in VR (in VTK as well as in Paraview), not unsteady state (e.g. in ParaView 5.3, OpenVR version, I cannot press the play button and send the content to OpenVR, I can only see one frame on the HMD). From what I have seen so far, the VR-Plugin of ParaView does not use any of the two methods. They are using the library VRPN for interacting but all the rest is done within ParaView. My questions are the following: - Is there anybody who has displayed unsteady states with VTK in VR and if so what method was used and how was that done? - Is there any paper or detailled documentation to the OpenGL context sharing method? I did not find alot to that except from the testing example "TestGLUTRenderWindow.cxx" which I was not able to build properly until now. Also, if anyone has experience using FreeVR with VTK OpenGL context sharing method, I would be very interested in that too. I hope my questions are appropriate (and not too widespread) and I would be very happy to be pointed to some current sources, especially concerning unsteady state simulations with VTK in VR. I would be very happy for anyone to share their own experiences or some current papers to that topic. Thanks alot, Jamil -------------- next part -------------- An HTML attachment was scrubbed... URL: From Zoltan.Kovacs at esi-group.com Fri Apr 6 11:50:18 2018 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Fri, 6 Apr 2018 15:50:18 +0000 Subject: [vtkusers] Animation with VTU files. Message-ID: Dear VTK Users, I have a question on animation with VTU file series. I wrote a code which displays particels modeled with sphere glyphs, where the particle positions and radii are read from VTU files: VTK_CREATE(vtkXMLUnstructuredGridReader, particleReader); VTK_CREATE(vtkSphereSource, sphere); VTK_CREATE(vtkGlyph3D, sphereGlyph); VTK_CREATE(vtkVertexGlyphFilter, glyphFilter); VTK_CREATE(vtkPolyDataMapper, particleMapper); VTK_CREATE(vtkActor, particleActor); particleReader->SetFileName( particleName.c_str() ); particleReader->Update(); vtkUnstructuredGrid *grid = particleReader->GetOutput(); vtkPointData *pointData = grid->GetPointData(); pointData->SetActiveScalars("Radii"); glyphFilter->SetInputData(grid); glyphFilter->Update(); sphere->SetRadius(1); sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); particleMapper->SetScalarModeToUsePointFieldData(); particleMapper->Update(); particleActor->SetMapper(particleMapper); VTK_CREATE(vtkRenderer, renderer); VTK_CREATE(vtkRenderWindow, renderWindow); VTK_CREATE(vtkRenderWindowInteractor, renderWindowInteractor); renderWindow->AddRenderer(renderer); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->AddActor(particleActor); renderer->SetBackground(.3, .6, .3); renderWindow->Render(); renderWindowInteractor->Start(); I would like to make an animation where the particle postions are updated. Thus I would change the string particleName in the argument of the function particleReader->SetFileName() reading a new VTU file and update the whole procedure with the unstructured grid / 3D glyph / glyp filter obejcts. I try to use vktProgrammableFilter and vtkCallbackCommand to impelment the animation process as I found in the example https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/DataAnimation/ The example uses an vtkSphereSource as an input for the programmable filter, so the example has essentially the code VTK_CREATE(vtkSphereSource, sphere); VTK_CREATE(vtkProgrammableFilter, filter); filter->SetInputConnection(sphere->GetOutputPort()); filter->SetExecuteMethod(AdjustPoints2, filter); where the function "AdjustPoints2" updates some point position for the sphere source. I try to figure out what kind of input can be given to the programmable filter in the case of the VTU files. If would like to pass the reader itself to the programmable filer, so that it could be updated for each file and I could make the proper update for the grid and the glyphs too. Then the updating function for the programmable filter execution method looked like: void Update(void *filterPointer) { vtkSmartPointer filter = static_cast(filterPointer); ... GetNewVTUFileName(particeName); particleReader->SetFileName( particleName.c_str() ); particleReader->Update(); vtkUnstructuredGrid *grid = particleReader->GetOutput(); vtkPointData *pointData = grid->GetPointData(); pointData->SetActiveScalars("Radii"); glyphFilter->SetInputData(grid); glyphFilter->Update(); sphere->SetRadius(1); sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); particleMapper->SetScalarModeToUsePointFieldData(); particleMapper->Update(); } I am not sure if this is feasible since I do not see how to pass the reader itself to the programmable filter. Could anyone help me with this problem? Thank you, Zoltan -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Apr 6 12:15:21 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 6 Apr 2018 18:15:21 +0200 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: Looks great on my phone, including the mathjax rendered equations (see attached screenshot). This will be great material for my morning bus rides to work :) I also think markdown embedded latex is the way to go, instead of full-out latex. Elvis Den 6 apr. 2018 4:11 em skrev "Bill Lorensen" : > More progress.I found a great online tool to generate Latex formulas. > With no previous Latex experience,I was able to generate all of the > equations for Chapter 3. I can embed Latex in the markdown. The > equations are rendered by MathJax. > > Here is the online website: > http://www.hostmath.com/ > > and here is the updated Chapter 3: > > https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter3/ > > Bill > > On Fri, Apr 6, 2018 at 6:28 AM, David Cole via vtk-developers > wrote: > > "I ignore whether Markdown/reStrucuredText support for > > tools to have proper printed texts is likely to be improved." > > > > I have become a big fan of "print to pdf using the Chrome browser" to > > get a printed copy of web content these days. It's actually not a bad > > way to go if you don't need to refer to page numbers within the text. > > > > > > And now, this is just my opinion, so take with yet another grain of salt: > > > > The available "writer pool" for LaTeX is far far smaller than that for > > markdown. If the math stuff must be in LaTeX, I'd very strongly prefer > > to see it as embedded chunks of LaTeX than have the whole thing be in > > LaTeX. > > > > > > Nice work, as usual Bill. > > > > > > Thanks, > > David C. > > > > > > > > On Fri, Apr 6, 2018 at 2:20 AM, Jon Haitz Legarreta > > wrote: > >> Bill, Andrew, simply brilliant. > >> > >> I've spot some parts in the Chapters 3 and 6 strawmans that were > >> already mentioned by you and Todd whose transition has some errors > >> (links that are missing, missing cross-reference links to VTK classes, > >> examples or bibliography, etc.). > >> > >> How can we contribute to fix them? Are you still working on the > >> transition tools to improve the output, or you want us to manually try > >> to fix them? > >> > >> I can help with/do all the Maths in LaTeX Bill. However, if the tool > >> you found works or the transition will be automatic, I do not see > >> where to help at this stage. Please, let me know. > >> > >> Otherwise, it's looking awesome. > >> > >> As for the LaTeX vs. Markdown/reStrucuredText discussion: > >> > >> I've contributed with some patches to the ITK SW Guide written in > >> LaTeX. I guess at the time it was written Markdown and reStrucuredText > >> were not available, so I think the choice was fair. > >> > >> Having said that, I admit that the learning curve for LaTeX may be > >> higher than that for Markdown or reStrucuredText. The latter are > >> tailored for web navigation, which is most people expect. And times > >> have changed. I ignore whether Markdown/reStrucuredText support for > >> tools to have proper printed texts is likely to be improved. > >> > >> I guess the ITK SW Guide requiring to be compiled (both the examples > >> to generate the figures and LaTeX itself) is not a downside, since VTK > >> Cxx examples used in this book need so. > >> > >> I guess having a first version for both cases (LaTeX and > >> Markdown/reStrucuredText) is somehow costly at the beginning. > >> Maintaining/sync'ing them once that is done every time there is a > >> change may not effortless also. But that may be the price to pay. > >> > >> The ITK SW Guide keeps being maintained. I ignore whether the ITK > >> folks at Kitware have considered to transition to Markdown or > >> reStrucuredText. > >> > >> JON HAITZ > >> > >> -- > >> > >> > >> On 6 April 2018 at 01:05, Todd via vtk-developers > >> wrote: > >>> Fantastic. I think Latex is definitely the way to go, although I'm no > expert > >>> in writing it. > >>> > >>> _______________________________________________ > >>> 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: > >>> https://vtk.org/mailman/listinfo/vtk-developers > >>> > >>> > >> _______________________________________________ > >> 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: > >> https://vtk.org/mailman/listinfo/vtk-developers > >> > > _______________________________________________ > > 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: > > https://vtk.org/mailman/listinfo/vtk-developers > > > > > > -- > Unpaid intern in BillsParadise 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: > https://vtk.org/mailman/listinfo/vtk-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot_20180406-181207.png Type: image/png Size: 167660 bytes Desc: not available URL: From bill.lorensen at gmail.com Fri Apr 6 13:25:36 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 06 Apr 2018 17:25:36 +0000 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: References: Message-ID: Thanks for the feedback! On Fri, Apr 6, 2018, 9:15 AM Elvis Stansvik wrote: > Looks great on my phone, including the mathjax rendered equations (see > attached screenshot). > > This will be great material for my morning bus rides to work :) > > I also think markdown embedded latex is the way to go, instead of full-out > latex. > > Elvis > > Den 6 apr. 2018 4:11 em skrev "Bill Lorensen" : > >> More progress.I found a great online tool to generate Latex formulas. >> With no previous Latex experience,I was able to generate all of the >> equations for Chapter 3. I can embed Latex in the markdown. The >> equations are rendered by MathJax. >> >> Here is the online website: >> http://www.hostmath.com/ >> >> and here is the updated Chapter 3: >> >> https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter3/ >> >> Bill >> >> On Fri, Apr 6, 2018 at 6:28 AM, David Cole via vtk-developers >> wrote: >> > "I ignore whether Markdown/reStrucuredText support for >> > tools to have proper printed texts is likely to be improved." >> > >> > I have become a big fan of "print to pdf using the Chrome browser" to >> > get a printed copy of web content these days. It's actually not a bad >> > way to go if you don't need to refer to page numbers within the text. >> > >> > >> > And now, this is just my opinion, so take with yet another grain of >> salt: >> > >> > The available "writer pool" for LaTeX is far far smaller than that for >> > markdown. If the math stuff must be in LaTeX, I'd very strongly prefer >> > to see it as embedded chunks of LaTeX than have the whole thing be in >> > LaTeX. >> > >> > >> > Nice work, as usual Bill. >> > >> > >> > Thanks, >> > David C. >> > >> > >> > >> > On Fri, Apr 6, 2018 at 2:20 AM, Jon Haitz Legarreta >> > wrote: >> >> Bill, Andrew, simply brilliant. >> >> >> >> I've spot some parts in the Chapters 3 and 6 strawmans that were >> >> already mentioned by you and Todd whose transition has some errors >> >> (links that are missing, missing cross-reference links to VTK classes, >> >> examples or bibliography, etc.). >> >> >> >> How can we contribute to fix them? Are you still working on the >> >> transition tools to improve the output, or you want us to manually try >> >> to fix them? >> >> >> >> I can help with/do all the Maths in LaTeX Bill. However, if the tool >> >> you found works or the transition will be automatic, I do not see >> >> where to help at this stage. Please, let me know. >> >> >> >> Otherwise, it's looking awesome. >> >> >> >> As for the LaTeX vs. Markdown/reStrucuredText discussion: >> >> >> >> I've contributed with some patches to the ITK SW Guide written in >> >> LaTeX. I guess at the time it was written Markdown and reStrucuredText >> >> were not available, so I think the choice was fair. >> >> >> >> Having said that, I admit that the learning curve for LaTeX may be >> >> higher than that for Markdown or reStrucuredText. The latter are >> >> tailored for web navigation, which is most people expect. And times >> >> have changed. I ignore whether Markdown/reStrucuredText support for >> >> tools to have proper printed texts is likely to be improved. >> >> >> >> I guess the ITK SW Guide requiring to be compiled (both the examples >> >> to generate the figures and LaTeX itself) is not a downside, since VTK >> >> Cxx examples used in this book need so. >> >> >> >> I guess having a first version for both cases (LaTeX and >> >> Markdown/reStrucuredText) is somehow costly at the beginning. >> >> Maintaining/sync'ing them once that is done every time there is a >> >> change may not effortless also. But that may be the price to pay. >> >> >> >> The ITK SW Guide keeps being maintained. I ignore whether the ITK >> >> folks at Kitware have considered to transition to Markdown or >> >> reStrucuredText. >> >> >> >> JON HAITZ >> >> >> >> -- >> >> >> >> >> >> On 6 April 2018 at 01:05, Todd via vtk-developers >> >> wrote: >> >>> Fantastic. I think Latex is definitely the way to go, although I'm no >> expert >> >>> in writing it. >> >>> >> >>> _______________________________________________ >> >>> 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: >> >>> https://vtk.org/mailman/listinfo/vtk-developers >> >>> >> >>> >> >> _______________________________________________ >> >> 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: >> >> https://vtk.org/mailman/listinfo/vtk-developers >> >> >> > _______________________________________________ >> > 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: >> > https://vtk.org/mailman/listinfo/vtk-developers >> > >> >> >> >> -- >> Unpaid intern in BillsParadise 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: >> https://vtk.org/mailman/listinfo/vtk-developers >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas_sgouros at brown.edu Fri Apr 6 14:30:18 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Fri, 6 Apr 2018 14:30:18 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Thank you, you are very kind to have taken this time. My original program does indeed work with your data and your data is the same as mine, but the data files are in different formats, even though they are both ASCII and contain the same data. The top of my file looks like this: # vtk DataFile Version 2.0 particlePositions ASCII DATASET POLYDATA POINTS 5111 float 13.451000 37.225000 0.417060 14.771000 10.352000 17.837000 18.511000 32.313000 12.778000 0.644430 21.956000 50.414000 12.346000 22.660000 50.371000 7.361000 7.991100 45.339000 24.999000 16.144000 27.909000 ... There are 5,111 data points in this file, followed by a few thousand 1.0's. The top of the file you sent back to me looks like this, and this one works fine. 13.451000 37.225000 0.417060 1.0 14.771000 10.352000 17.837000 1.0 18.511000 32.313000 12.778000 1.0 0.644430 21.956000 50.414000 1.0 12.346000 22.660000 50.371000 1.0 7.361000 7.991100 45.339000 1.0 24.999000 16.144000 27.909000 1.0 ... Both files read without obvious error, but only one of them shows data. Can anyone explain this to me? Or is there somewhere I should be looking for errors? (And what did you use to convert it?) Many thanks, -Tom On Fri, Apr 6, 2018 at 10:49 AM, kenichiro yoshimi wrote: > Hello Tom, > > Your code and data work without any problem and display glyphs. The > testing data is attached. > There is some doubt whether the problem always occurs. > > Thanks, > > 2018-04-04 5:54 GMT+09:00 Sgouros, Thomas : > > "It is often some unexpected minor thing that causes the failure." > > > > I'm certain of that. > > > > Here's the code, mostly pinched straight from the Glyph3D example. (And > I've > > tried swapping the endianness, just for giggles.) The data is an ASCII > vtk > > file that you can get from sgouros.com/output_p40.vtk. > > > > Thank you, > > > > -Tom > > > > > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > > > int main(int argc, char* argv[]) { > > > > std::string filePath = argv[1]; > > vtkSmartPointer reader = > > vtkSmartPointer::New(); > > > > reader->SetFileName ( filePath.c_str() ); > > // if nothing gets displayed or totally wrong, swap the endianness > > reader->SetDataByteOrderToBigEndian(); > > reader->Update(); > > > > // Create anything you want here, we will use a cube for the demo. > > vtkSmartPointer cubeSource = > > vtkSmartPointer::New(); > > > > vtkSmartPointer glyph3D = > > vtkSmartPointer::New(); > > > > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > > glyph3D->SetInputConnection(reader->GetOutputPort()); > > > > glyph3D->Update(); > > > > std::cout << *(reader->GetOutput()) << std::endl; > > > > // Visualize > > vtkSmartPointer mapper = > > vtkSmartPointer::New(); > > mapper->SetInputConnection(glyph3D->GetOutputPort()); > > > > vtkSmartPointer actor = > > vtkSmartPointer::New(); > > actor->SetMapper(mapper); > > > > vtkSmartPointer renderer = > > vtkSmartPointer::New(); > > vtkSmartPointer renderWindow = > > vtkSmartPointer::New(); > > renderWindow->AddRenderer(renderer); > > vtkSmartPointer renderWindowInteractor = > > vtkSmartPointer::New(); > > renderWindowInteractor->SetRenderWindow(renderWindow); > > > > renderer->AddActor(actor); > > renderer->SetBackground(.3, .6, .3); // Background color green > > > > renderWindow->Render(); > > renderWindowInteractor->Start(); > > > > return EXIT_SUCCESS; > > } > > > > > > On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen > > wrote: > >> > >> Post a small compilable example, please. It is often some unexpected > >> minor thing that causes the failure. > >> > >> Thanks, > >> > >> Bill > >> > >> BTW: The wiki examples have been replaced by VTKExamples here: > >> > >> https://lorensen.github.io/VTKExamples/site/ > >> > >> > >> On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain > >> wrote: > >> > What you are doing seems correct and the data is valid (it has > points). > >> > > >> > How do you render the glyph3d filter? Using a polydata mapper? I'm > >> > guessing > >> > no issue on that end? > >> > > >> > Ideally you should use the glyph mapper instead of the filter. But if > >> > memory > >> > is not a big deal, don't worry about it. > >> > > >> > Seb > >> > > >> > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas > >> > > >> > wrote: > >> >> > >> >> This is reader->GetOutput() > >> >> > >> >> vtkPolyData (0x7f8ce050dad0) > >> >> > >> >> Debug: Off > >> >> > >> >> Modified Time: 217 > >> >> > >> >> Reference Count: 1 > >> >> > >> >> Registered Events: (none) > >> >> > >> >> Information: 0x7f8ce050d9b0 > >> >> > >> >> Data Released: False > >> >> > >> >> Global Release Data: Off > >> >> > >> >> UpdateTime: 218 > >> >> > >> >> Field Data: > >> >> > >> >> Debug: Off > >> >> > >> >> Modified Time: 167 > >> >> > >> >> Reference Count: 1 > >> >> > >> >> Registered Events: (none) > >> >> > >> >> Number Of Arrays: 0 > >> >> > >> >> Number Of Components: 0 > >> >> > >> >> Number Of Tuples: 0 > >> >> > >> >> Number Of Points: 10229 > >> >> > >> >> Number Of Cells: 10229 > >> >> > >> >> > >> >> It goes on for quite a bit more. As I said, when I feed this to a > >> >> vtkPolyDataMapper, it displays and works fine, but I want little > >> >> spheres, > >> >> not little flat rectangles and I thought I could just redirect that > >> >> into the > >> >> vtkGlyph3D object, but I must be misunderstanding something. > >> >> > >> >> Thank you, > >> >> > >> >> -Tom > >> >> > >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain > >> >> wrote: > >> >>> > >> >>> You can try to see what the GetOutput() contains as my assumption it > >> >>> would be empty (No points => Number of Points: 0). > >> >>> > >> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); > >> >>> > >> >>> What I mean was > >> >>> > >> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); > >> >>> > >> >>> > >> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas > >> >>> wrote: > >> >>>> > >> >>>> Hi Sebastien: > >> >>>> > >> >>>> Sorry if that was unclear. The third block of code comes first, and > >> >>>> reader->Update() is called before I use its GetOutput(). In situ, > it > >> >>>> looks > >> >>>> like this: > >> >>>> > >> >>>> ... > >> >>>> vtkSmartPointer reader = > >> >>>> vtkSmartPointer::New(); > >> >>>> reader->SetFileName ( filePath.c_str() ); > >> >>>> reader->SetDataByteOrderToBigEndian(); > >> >>>> reader->Update(); > >> >>>> > >> >>>> // Create anything you want here, we will use a cube for the > demo. > >> >>>> vtkSmartPointer cubeSource = > >> >>>> vtkSmartPointer::New(); > >> >>>> > >> >>>> vtkSmartPointer glyph3D = > >> >>>> vtkSmartPointer::New(); > >> >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >>>> glyph3D->SetInputData(reader->GetOutput()); > >> >>>> glyph3D->Update(); > >> >>>> > >> >>>> ... > >> >>>> > >> >>>> I don't think I understand what you mean by the connection instead > of > >> >>>> the dataset directly. > >> >>>> > >> >>>> Is there a way to peek inside glyph3D and see what it thinks it > has? > >> >>>> > >> >>>> Thank you, > >> >>>> > >> >>>> -Tom > >> >>>> > >> >>>> > >> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain > >> >>>> wrote: > >> >>>>> > >> >>>>> Tom, > >> >>>>> > >> >>>>> Just make sure that reader->Update(); was called before > >> >>>>> glyph3D->SetInputData(reader->GetOutput()); > >> >>>>> But it would be better to use the connection instead of the > dataset > >> >>>>> directly. > >> >>>>> > >> >>>>> Seb > >> >>>>> > >> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas > >> >>>>> wrote: > >> >>>>>> > >> >>>>>> Hello all: > >> >>>>>> > >> >>>>>> Can someone help me understand why this code works: > >> >>>>>> > >> >>>>>> vtkSmartPointer glyph3D = > >> >>>>>> vtkSmartPointer::New(); > >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >>>>>> glyph3D->SetInputData(polydata); > >> >>>>>> glyph3D->Update(); > >> >>>>>> > >> >>>>>> And this does not (nothing displayed)? > >> >>>>>> > >> >>>>>> vtkSmartPointer glyph3D = > >> >>>>>> vtkSmartPointer::New(); > >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >>>>>> glyph3D->SetInputData(reader->GetOutput()); > >> >>>>>> glyph3D->Update(); > >> >>>>>> > >> >>>>>> The first clip is from > >> >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D > >> >>>>>> > >> >>>>>> The 'reader' object is stolen from the ParticleReader example: > >> >>>>>> > >> >>>>>> vtkSmartPointer reader = > >> >>>>>> vtkSmartPointer::New(); > >> >>>>>> reader->SetFileName ( filePath.c_str() ); > >> >>>>>> reader->SetDataByteOrderToBigEndian(); > >> >>>>>> reader->Update(); > >> >>>>>> > >> >>>>>> The program compiles, but no data appears. It works fine (data > >> >>>>>> appears) in the context of the ParticleReader example, where it > >> >>>>>> shows all > >> >>>>>> the data points. But I want to see them as glyphs, not little > >> >>>>>> squares. I > >> >>>>>> seem to be misunderstanding something fundamental, but not seeing > >> >>>>>> what it > >> >>>>>> could be. > >> >>>>>> > >> >>>>>> Many thanks, > >> >>>>>> > >> >>>>>> -Tom > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> _______________________________________________ > >> >>>>>> Powered by www.kitware.com > >> >>>>>> > >> >>>>>> Visit other Kitware open-source projects at > >> >>>>>> http://www.kitware.com/opensource/opensource.html > >> >>>>>> > >> >>>>>> Please keep messages on-topic and check the VTK FAQ at: > >> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ > >> >>>>>> > >> >>>>>> Search the list archives at: http://markmail.org/search/?q= > vtkusers > >> >>>>>> > >> >>>>>> Follow this link to subscribe/unsubscribe: > >> >>>>>> https://vtk.org/mailman/listinfo/vtkusers > >> >>>>>> > >> >>>>> > >> >>>> > >> >>> > >> >> > >> > > >> > > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > https://vtk.org/mailman/listinfo/vtkusers > >> > > >> > >> > >> > >> -- > >> Unpaid intern in BillsParadise at noware dot com > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://vtk.org/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas_sgouros at brown.edu Fri Apr 6 14:46:57 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Fri, 6 Apr 2018 14:46:57 -0400 Subject: [vtkusers] General Question to VTK in VR In-Reply-To: References: Message-ID: I'm sure the preceding answers to the question will be more than enough to satisfy the OP, but there is yet another way, a project called MinVR that is in alpha, but is meant to be a generic and relatively straightforward way to convert any old 3D graphics program to VR, and that is compatible with a wide range of displays, including head-mounted displays like the Oculus and HTC, caves, desktop VR displays, and regular laptop and desktop screens. I'm working on vtk examples now to illustrate its use with vtk, not that I'm all that fluent in that dialect. This is a joint project of people at UMinn and Brown University, and can be found at github.com/MinVR. -Tom On Fri, Apr 6, 2018 at 11:05 AM, Andras Lasso wrote: > > Is there anybody who has displayed unsteady states with VTK in VR and if > so what method was used and how was that done? > > > > Yes! 3D Slicer has an awesome VR viewer. With a single click, the 3D scene > appears in your headset and the application remains fully interactive ? you > can manipulate objects both on the desktop using keyboard and mouse, and > using VR controllers in the VR view. You can also view dynamic content, > such as 4D volumes even using volume rendering. > > > > The source code is available here: https://github.com/KitwareMedical/ > SlicerVirtualReality. You should be able to find all the implementation > details there. > > > > To try it: Download a recent Slicer nightly version ( > https://download.slicer.org), install SlicerVirtualReality extension from > Slicer?s extension manager. After you loaded your data you just need to > click the VR headset button on the toolbar (?Show scene in virtual > reality?). > > > > Limitations: There is a bug in volume rendering that clips the volume at > unexpected locations (Kitware is working on a fix, expected to be ready > soon). Position of objects that are moved using VR controllers are not yet > synchronization back to the scene displayed in the main window (this is the > next focus of development). > > > > Andras > > > > > > *From:* vtkusers *On Behalf Of *Jamil Goettlich > *Sent:* Friday, April 6, 2018 10:46 AM > *To:* vtk > *Subject:* [vtkusers] General Question to VTK in VR > > > > Hello VTK Users, > > > > I have some general questions to the current state of VR in VTK. Please > let me know if this is not the right place to ask questions about that. > According to what I have read (among others "Enhancements to VTK enabling > scientific visualization in immersive environments") there are two > favourized ways of bringing VTK into VR: > - VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs) > > - OpenGL context sharing (VTK Rendering External) --> Using existing > contexts from other (VR-)Toolkits (Multiple devices) > > > > Until now I have only seen single frames being displayed in VR (in VTK as > well as in Paraview), not unsteady state (e.g. in ParaView 5.3, OpenVR > version, I cannot press the play button and send the content to OpenVR, I > can only see one frame on the HMD). > > From what I have seen so far, the VR-Plugin of ParaView does not use any > of the two methods. They are using the library VRPN for interacting but all > the rest is done within ParaView. > > > > My questions are the following: > > - Is there anybody who has displayed unsteady states with VTK in VR and if > so what method was used and how was that done? > > - Is there any paper or detailled documentation to the OpenGL context > sharing method? I did not find alot to that except from the testing example > > "TestGLUTRenderWindow.cxx" which I was not able to build properly until > now. Also, if anyone has experience using FreeVR with VTK OpenGL context > sharing method, I would be very interested in that too. > > I hope my questions are appropriate (and not too widespread) and I would > be very happy to be pointed to some current sources, especially concerning > unsteady state simulations with VTK in VR. I would be very happy for anyone > to share their own experiences or some current papers to that topic. > > > > Thanks alot, > > > > Jamil > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Fri Apr 6 19:43:13 2018 From: nztoddler at yahoo.com (Todd) Date: Sat, 07 Apr 2018 11:43:13 +1200 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: Message-ID: <66336ca8-139a-4c56-ac70-eb6f9f228dd3@email.android.com> An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Fri Apr 6 20:21:51 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sat, 7 Apr 2018 09:21:51 +0900 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Hi Tom, At last I can replicate your problem. This may be caused by not selecting an appropriate reader. vtkParticleReader can't read output_p40.vtk you upload since the expected format is something like: x, y, z, scalar It also allows for x\ty\tz\tscalar or x y z scalar. See the documentation about vtkParticleReader. https://www.vtk.org/doc/nightly/html/classvtkParticleReader.html#details The correct way to read output_p40.vtk is to use vtkPolyDataReader rather than vtkParticleReader. I hope this will be of some help. Thanks, 2018-04-07 3:30 GMT+09:00 Sgouros, Thomas : > Thank you, you are very kind to have taken this time. My original program > does indeed work with your data and your data is the same as mine, but the > data files are in different formats, even though they are both ASCII and > contain the same data. The top of my file looks like this: > > # vtk DataFile Version 2.0 > particlePositions > ASCII > DATASET POLYDATA > POINTS 5111 float > 13.451000 37.225000 0.417060 > 14.771000 10.352000 17.837000 > 18.511000 32.313000 12.778000 > 0.644430 21.956000 50.414000 > 12.346000 22.660000 50.371000 > 7.361000 7.991100 45.339000 > 24.999000 16.144000 27.909000 ... > > There are 5,111 data points in this file, followed by a few thousand 1.0's. > > The top of the file you sent back to me looks like this, and this one works > fine. > > 13.451000 37.225000 0.417060 1.0 > 14.771000 10.352000 17.837000 1.0 > 18.511000 32.313000 12.778000 1.0 > 0.644430 21.956000 50.414000 1.0 > 12.346000 22.660000 50.371000 1.0 > 7.361000 7.991100 45.339000 1.0 > 24.999000 16.144000 27.909000 1.0 ... > > Both files read without obvious error, but only one of them shows data. Can > anyone explain this to me? Or is there somewhere I should be looking for > errors? (And what did you use to convert it?) > > Many thanks, > > -Tom > > > On Fri, Apr 6, 2018 at 10:49 AM, kenichiro yoshimi > wrote: >> >> Hello Tom, >> >> Your code and data work without any problem and display glyphs. The >> testing data is attached. >> There is some doubt whether the problem always occurs. >> >> Thanks, >> >> 2018-04-04 5:54 GMT+09:00 Sgouros, Thomas : >> > "It is often some unexpected minor thing that causes the failure." >> > >> > I'm certain of that. >> > >> > Here's the code, mostly pinched straight from the Glyph3D example. (And >> > I've >> > tried swapping the endianness, just for giggles.) The data is an ASCII >> > vtk >> > file that you can get from sgouros.com/output_p40.vtk. >> > >> > Thank you, >> > >> > -Tom >> > >> > >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > >> > >> > int main(int argc, char* argv[]) { >> > >> > std::string filePath = argv[1]; >> > vtkSmartPointer reader = >> > vtkSmartPointer::New(); >> > >> > reader->SetFileName ( filePath.c_str() ); >> > // if nothing gets displayed or totally wrong, swap the endianness >> > reader->SetDataByteOrderToBigEndian(); >> > reader->Update(); >> > >> > // Create anything you want here, we will use a cube for the demo. >> > vtkSmartPointer cubeSource = >> > vtkSmartPointer::New(); >> > >> > vtkSmartPointer glyph3D = >> > vtkSmartPointer::New(); >> > >> > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> > glyph3D->SetInputConnection(reader->GetOutputPort()); >> > >> > glyph3D->Update(); >> > >> > std::cout << *(reader->GetOutput()) << std::endl; >> > >> > // Visualize >> > vtkSmartPointer mapper = >> > vtkSmartPointer::New(); >> > mapper->SetInputConnection(glyph3D->GetOutputPort()); >> > >> > vtkSmartPointer actor = >> > vtkSmartPointer::New(); >> > actor->SetMapper(mapper); >> > >> > vtkSmartPointer renderer = >> > vtkSmartPointer::New(); >> > vtkSmartPointer renderWindow = >> > vtkSmartPointer::New(); >> > renderWindow->AddRenderer(renderer); >> > vtkSmartPointer renderWindowInteractor = >> > vtkSmartPointer::New(); >> > renderWindowInteractor->SetRenderWindow(renderWindow); >> > >> > renderer->AddActor(actor); >> > renderer->SetBackground(.3, .6, .3); // Background color green >> > >> > renderWindow->Render(); >> > renderWindowInteractor->Start(); >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen >> > wrote: >> >> >> >> Post a small compilable example, please. It is often some unexpected >> >> minor thing that causes the failure. >> >> >> >> Thanks, >> >> >> >> Bill >> >> >> >> BTW: The wiki examples have been replaced by VTKExamples here: >> >> >> >> https://lorensen.github.io/VTKExamples/site/ >> >> >> >> >> >> On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain >> >> wrote: >> >> > What you are doing seems correct and the data is valid (it has >> >> > points). >> >> > >> >> > How do you render the glyph3d filter? Using a polydata mapper? I'm >> >> > guessing >> >> > no issue on that end? >> >> > >> >> > Ideally you should use the glyph mapper instead of the filter. But if >> >> > memory >> >> > is not a big deal, don't worry about it. >> >> > >> >> > Seb >> >> > >> >> > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas >> >> > >> >> > wrote: >> >> >> >> >> >> This is reader->GetOutput() >> >> >> >> >> >> vtkPolyData (0x7f8ce050dad0) >> >> >> >> >> >> Debug: Off >> >> >> >> >> >> Modified Time: 217 >> >> >> >> >> >> Reference Count: 1 >> >> >> >> >> >> Registered Events: (none) >> >> >> >> >> >> Information: 0x7f8ce050d9b0 >> >> >> >> >> >> Data Released: False >> >> >> >> >> >> Global Release Data: Off >> >> >> >> >> >> UpdateTime: 218 >> >> >> >> >> >> Field Data: >> >> >> >> >> >> Debug: Off >> >> >> >> >> >> Modified Time: 167 >> >> >> >> >> >> Reference Count: 1 >> >> >> >> >> >> Registered Events: (none) >> >> >> >> >> >> Number Of Arrays: 0 >> >> >> >> >> >> Number Of Components: 0 >> >> >> >> >> >> Number Of Tuples: 0 >> >> >> >> >> >> Number Of Points: 10229 >> >> >> >> >> >> Number Of Cells: 10229 >> >> >> >> >> >> >> >> >> It goes on for quite a bit more. As I said, when I feed this to a >> >> >> vtkPolyDataMapper, it displays and works fine, but I want little >> >> >> spheres, >> >> >> not little flat rectangles and I thought I could just redirect that >> >> >> into the >> >> >> vtkGlyph3D object, but I must be misunderstanding something. >> >> >> >> >> >> Thank you, >> >> >> >> >> >> -Tom >> >> >> >> >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain >> >> >> wrote: >> >> >>> >> >> >>> You can try to see what the GetOutput() contains as my assumption >> >> >>> it >> >> >>> would be empty (No points => Number of Points: 0). >> >> >>> >> >> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); >> >> >>> >> >> >>> What I mean was >> >> >>> >> >> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); >> >> >>> >> >> >>> >> >> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas >> >> >>> wrote: >> >> >>>> >> >> >>>> Hi Sebastien: >> >> >>>> >> >> >>>> Sorry if that was unclear. The third block of code comes first, >> >> >>>> and >> >> >>>> reader->Update() is called before I use its GetOutput(). In situ, >> >> >>>> it >> >> >>>> looks >> >> >>>> like this: >> >> >>>> >> >> >>>> ... >> >> >>>> vtkSmartPointer reader = >> >> >>>> vtkSmartPointer::New(); >> >> >>>> reader->SetFileName ( filePath.c_str() ); >> >> >>>> reader->SetDataByteOrderToBigEndian(); >> >> >>>> reader->Update(); >> >> >>>> >> >> >>>> // Create anything you want here, we will use a cube for the >> >> >>>> demo. >> >> >>>> vtkSmartPointer cubeSource = >> >> >>>> vtkSmartPointer::New(); >> >> >>>> >> >> >>>> vtkSmartPointer glyph3D = >> >> >>>> vtkSmartPointer::New(); >> >> >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >> >>>> glyph3D->SetInputData(reader->GetOutput()); >> >> >>>> glyph3D->Update(); >> >> >>>> >> >> >>>> ... >> >> >>>> >> >> >>>> I don't think I understand what you mean by the connection instead >> >> >>>> of >> >> >>>> the dataset directly. >> >> >>>> >> >> >>>> Is there a way to peek inside glyph3D and see what it thinks it >> >> >>>> has? >> >> >>>> >> >> >>>> Thank you, >> >> >>>> >> >> >>>> -Tom >> >> >>>> >> >> >>>> >> >> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain >> >> >>>> wrote: >> >> >>>>> >> >> >>>>> Tom, >> >> >>>>> >> >> >>>>> Just make sure that reader->Update(); was called before >> >> >>>>> glyph3D->SetInputData(reader->GetOutput()); >> >> >>>>> But it would be better to use the connection instead of the >> >> >>>>> dataset >> >> >>>>> directly. >> >> >>>>> >> >> >>>>> Seb >> >> >>>>> >> >> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas >> >> >>>>> wrote: >> >> >>>>>> >> >> >>>>>> Hello all: >> >> >>>>>> >> >> >>>>>> Can someone help me understand why this code works: >> >> >>>>>> >> >> >>>>>> vtkSmartPointer glyph3D = >> >> >>>>>> vtkSmartPointer::New(); >> >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >> >>>>>> glyph3D->SetInputData(polydata); >> >> >>>>>> glyph3D->Update(); >> >> >>>>>> >> >> >>>>>> And this does not (nothing displayed)? >> >> >>>>>> >> >> >>>>>> vtkSmartPointer glyph3D = >> >> >>>>>> vtkSmartPointer::New(); >> >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >> >>>>>> glyph3D->SetInputData(reader->GetOutput()); >> >> >>>>>> glyph3D->Update(); >> >> >>>>>> >> >> >>>>>> The first clip is from >> >> >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D >> >> >>>>>> >> >> >>>>>> The 'reader' object is stolen from the ParticleReader example: >> >> >>>>>> >> >> >>>>>> vtkSmartPointer reader = >> >> >>>>>> vtkSmartPointer::New(); >> >> >>>>>> reader->SetFileName ( filePath.c_str() ); >> >> >>>>>> reader->SetDataByteOrderToBigEndian(); >> >> >>>>>> reader->Update(); >> >> >>>>>> >> >> >>>>>> The program compiles, but no data appears. It works fine (data >> >> >>>>>> appears) in the context of the ParticleReader example, where it >> >> >>>>>> shows all >> >> >>>>>> the data points. But I want to see them as glyphs, not little >> >> >>>>>> squares. I >> >> >>>>>> seem to be misunderstanding something fundamental, but not >> >> >>>>>> seeing >> >> >>>>>> what it >> >> >>>>>> could be. >> >> >>>>>> >> >> >>>>>> Many thanks, >> >> >>>>>> >> >> >>>>>> -Tom >> >> >>>>>> >> >> >>>>>> >> >> >>>>>> >> >> >>>>>> _______________________________________________ >> >> >>>>>> Powered by www.kitware.com >> >> >>>>>> >> >> >>>>>> Visit other Kitware open-source projects at >> >> >>>>>> http://www.kitware.com/opensource/opensource.html >> >> >>>>>> >> >> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >> >> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >> >> >>>>>> >> >> >>>>>> Search the list archives at: >> >> >>>>>> http://markmail.org/search/?q=vtkusers >> >> >>>>>> >> >> >>>>>> Follow this link to subscribe/unsubscribe: >> >> >>>>>> https://vtk.org/mailman/listinfo/vtkusers >> >> >>>>>> >> >> >>>>> >> >> >>>> >> >> >>> >> >> >> >> >> > >> >> > >> >> > _______________________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Please keep messages on-topic and check the VTK FAQ at: >> >> > http://www.vtk.org/Wiki/VTK_FAQ >> >> > >> >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > https://vtk.org/mailman/listinfo/vtkusers >> >> > >> >> >> >> >> >> >> >> -- >> >> Unpaid intern in BillsParadise at noware dot com >> > >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > https://vtk.org/mailman/listinfo/vtkusers >> > > > From thomas_sgouros at brown.edu Fri Apr 6 20:56:48 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Fri, 6 Apr 2018 20:56:48 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Thank you, this is very kind again. How did you convert it? I would expect that a reader that did not read a file properly would issue an error message. But perhaps I should modify those expectations. Thank you, -Tom On Fri, Apr 6, 2018 at 8:21 PM, kenichiro yoshimi wrote: > Hi Tom, > > At last I can replicate your problem. This may be caused by not > selecting an appropriate reader. > > vtkParticleReader can't read output_p40.vtk you upload since the > expected format is something like: > x, y, z, scalar > It also allows for x\ty\tz\tscalar or x y z scalar. See the > documentation about vtkParticleReader. > https://www.vtk.org/doc/nightly/html/classvtkParticleReader.html#details > > The correct way to read output_p40.vtk is to use vtkPolyDataReader > rather than vtkParticleReader. > > I hope this will be of some help. > Thanks, > > 2018-04-07 3:30 GMT+09:00 Sgouros, Thomas : > > Thank you, you are very kind to have taken this time. My original program > > does indeed work with your data and your data is the same as mine, but > the > > data files are in different formats, even though they are both ASCII and > > contain the same data. The top of my file looks like this: > > > > # vtk DataFile Version 2.0 > > particlePositions > > ASCII > > DATASET POLYDATA > > POINTS 5111 float > > 13.451000 37.225000 0.417060 > > 14.771000 10.352000 17.837000 > > 18.511000 32.313000 12.778000 > > 0.644430 21.956000 50.414000 > > 12.346000 22.660000 50.371000 > > 7.361000 7.991100 45.339000 > > 24.999000 16.144000 27.909000 ... > > > > There are 5,111 data points in this file, followed by a few thousand > 1.0's. > > > > The top of the file you sent back to me looks like this, and this one > works > > fine. > > > > 13.451000 37.225000 0.417060 1.0 > > 14.771000 10.352000 17.837000 1.0 > > 18.511000 32.313000 12.778000 1.0 > > 0.644430 21.956000 50.414000 1.0 > > 12.346000 22.660000 50.371000 1.0 > > 7.361000 7.991100 45.339000 1.0 > > 24.999000 16.144000 27.909000 1.0 ... > > > > Both files read without obvious error, but only one of them shows data. > Can > > anyone explain this to me? Or is there somewhere I should be looking for > > errors? (And what did you use to convert it?) > > > > Many thanks, > > > > -Tom > > > > > > On Fri, Apr 6, 2018 at 10:49 AM, kenichiro yoshimi < > rccm.kyoshimi at gmail.com> > > wrote: > >> > >> Hello Tom, > >> > >> Your code and data work without any problem and display glyphs. The > >> testing data is attached. > >> There is some doubt whether the problem always occurs. > >> > >> Thanks, > >> > >> 2018-04-04 5:54 GMT+09:00 Sgouros, Thomas : > >> > "It is often some unexpected minor thing that causes the failure." > >> > > >> > I'm certain of that. > >> > > >> > Here's the code, mostly pinched straight from the Glyph3D example. > (And > >> > I've > >> > tried swapping the endianness, just for giggles.) The data is an ASCII > >> > vtk > >> > file that you can get from sgouros.com/output_p40.vtk. > >> > > >> > Thank you, > >> > > >> > -Tom > >> > > >> > > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > #include > >> > > >> > > >> > int main(int argc, char* argv[]) { > >> > > >> > std::string filePath = argv[1]; > >> > vtkSmartPointer reader = > >> > vtkSmartPointer::New(); > >> > > >> > reader->SetFileName ( filePath.c_str() ); > >> > // if nothing gets displayed or totally wrong, swap the endianness > >> > reader->SetDataByteOrderToBigEndian(); > >> > reader->Update(); > >> > > >> > // Create anything you want here, we will use a cube for the demo. > >> > vtkSmartPointer cubeSource = > >> > vtkSmartPointer::New(); > >> > > >> > vtkSmartPointer glyph3D = > >> > vtkSmartPointer::New(); > >> > > >> > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> > glyph3D->SetInputConnection(reader->GetOutputPort()); > >> > > >> > glyph3D->Update(); > >> > > >> > std::cout << *(reader->GetOutput()) << std::endl; > >> > > >> > // Visualize > >> > vtkSmartPointer mapper = > >> > vtkSmartPointer::New(); > >> > mapper->SetInputConnection(glyph3D->GetOutputPort()); > >> > > >> > vtkSmartPointer actor = > >> > vtkSmartPointer::New(); > >> > actor->SetMapper(mapper); > >> > > >> > vtkSmartPointer renderer = > >> > vtkSmartPointer::New(); > >> > vtkSmartPointer renderWindow = > >> > vtkSmartPointer::New(); > >> > renderWindow->AddRenderer(renderer); > >> > vtkSmartPointer renderWindowInteractor = > >> > vtkSmartPointer::New(); > >> > renderWindowInteractor->SetRenderWindow(renderWindow); > >> > > >> > renderer->AddActor(actor); > >> > renderer->SetBackground(.3, .6, .3); // Background color green > >> > > >> > renderWindow->Render(); > >> > renderWindowInteractor->Start(); > >> > > >> > return EXIT_SUCCESS; > >> > } > >> > > >> > > >> > On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen < > bill.lorensen at gmail.com> > >> > wrote: > >> >> > >> >> Post a small compilable example, please. It is often some unexpected > >> >> minor thing that causes the failure. > >> >> > >> >> Thanks, > >> >> > >> >> Bill > >> >> > >> >> BTW: The wiki examples have been replaced by VTKExamples here: > >> >> > >> >> https://lorensen.github.io/VTKExamples/site/ > >> >> > >> >> > >> >> On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain > >> >> wrote: > >> >> > What you are doing seems correct and the data is valid (it has > >> >> > points). > >> >> > > >> >> > How do you render the glyph3d filter? Using a polydata mapper? I'm > >> >> > guessing > >> >> > no issue on that end? > >> >> > > >> >> > Ideally you should use the glyph mapper instead of the filter. But > if > >> >> > memory > >> >> > is not a big deal, don't worry about it. > >> >> > > >> >> > Seb > >> >> > > >> >> > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas > >> >> > > >> >> > wrote: > >> >> >> > >> >> >> This is reader->GetOutput() > >> >> >> > >> >> >> vtkPolyData (0x7f8ce050dad0) > >> >> >> > >> >> >> Debug: Off > >> >> >> > >> >> >> Modified Time: 217 > >> >> >> > >> >> >> Reference Count: 1 > >> >> >> > >> >> >> Registered Events: (none) > >> >> >> > >> >> >> Information: 0x7f8ce050d9b0 > >> >> >> > >> >> >> Data Released: False > >> >> >> > >> >> >> Global Release Data: Off > >> >> >> > >> >> >> UpdateTime: 218 > >> >> >> > >> >> >> Field Data: > >> >> >> > >> >> >> Debug: Off > >> >> >> > >> >> >> Modified Time: 167 > >> >> >> > >> >> >> Reference Count: 1 > >> >> >> > >> >> >> Registered Events: (none) > >> >> >> > >> >> >> Number Of Arrays: 0 > >> >> >> > >> >> >> Number Of Components: 0 > >> >> >> > >> >> >> Number Of Tuples: 0 > >> >> >> > >> >> >> Number Of Points: 10229 > >> >> >> > >> >> >> Number Of Cells: 10229 > >> >> >> > >> >> >> > >> >> >> It goes on for quite a bit more. As I said, when I feed this to a > >> >> >> vtkPolyDataMapper, it displays and works fine, but I want little > >> >> >> spheres, > >> >> >> not little flat rectangles and I thought I could just redirect > that > >> >> >> into the > >> >> >> vtkGlyph3D object, but I must be misunderstanding something. > >> >> >> > >> >> >> Thank you, > >> >> >> > >> >> >> -Tom > >> >> >> > >> >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain > >> >> >> wrote: > >> >> >>> > >> >> >>> You can try to see what the GetOutput() contains as my assumption > >> >> >>> it > >> >> >>> would be empty (No points => Number of Points: 0). > >> >> >>> > >> >> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); > >> >> >>> > >> >> >>> What I mean was > >> >> >>> > >> >> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); > >> >> >>> > >> >> >>> > >> >> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas > >> >> >>> wrote: > >> >> >>>> > >> >> >>>> Hi Sebastien: > >> >> >>>> > >> >> >>>> Sorry if that was unclear. The third block of code comes first, > >> >> >>>> and > >> >> >>>> reader->Update() is called before I use its GetOutput(). In > situ, > >> >> >>>> it > >> >> >>>> looks > >> >> >>>> like this: > >> >> >>>> > >> >> >>>> ... > >> >> >>>> vtkSmartPointer reader = > >> >> >>>> vtkSmartPointer::New(); > >> >> >>>> reader->SetFileName ( filePath.c_str() ); > >> >> >>>> reader->SetDataByteOrderToBigEndian(); > >> >> >>>> reader->Update(); > >> >> >>>> > >> >> >>>> // Create anything you want here, we will use a cube for the > >> >> >>>> demo. > >> >> >>>> vtkSmartPointer cubeSource = > >> >> >>>> vtkSmartPointer::New(); > >> >> >>>> > >> >> >>>> vtkSmartPointer glyph3D = > >> >> >>>> vtkSmartPointer::New(); > >> >> >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >> >>>> glyph3D->SetInputData(reader->GetOutput()); > >> >> >>>> glyph3D->Update(); > >> >> >>>> > >> >> >>>> ... > >> >> >>>> > >> >> >>>> I don't think I understand what you mean by the connection > instead > >> >> >>>> of > >> >> >>>> the dataset directly. > >> >> >>>> > >> >> >>>> Is there a way to peek inside glyph3D and see what it thinks it > >> >> >>>> has? > >> >> >>>> > >> >> >>>> Thank you, > >> >> >>>> > >> >> >>>> -Tom > >> >> >>>> > >> >> >>>> > >> >> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain > >> >> >>>> wrote: > >> >> >>>>> > >> >> >>>>> Tom, > >> >> >>>>> > >> >> >>>>> Just make sure that reader->Update(); was called before > >> >> >>>>> glyph3D->SetInputData(reader->GetOutput()); > >> >> >>>>> But it would be better to use the connection instead of the > >> >> >>>>> dataset > >> >> >>>>> directly. > >> >> >>>>> > >> >> >>>>> Seb > >> >> >>>>> > >> >> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas > >> >> >>>>> wrote: > >> >> >>>>>> > >> >> >>>>>> Hello all: > >> >> >>>>>> > >> >> >>>>>> Can someone help me understand why this code works: > >> >> >>>>>> > >> >> >>>>>> vtkSmartPointer glyph3D = > >> >> >>>>>> vtkSmartPointer::New(); > >> >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >> >>>>>> glyph3D->SetInputData(polydata); > >> >> >>>>>> glyph3D->Update(); > >> >> >>>>>> > >> >> >>>>>> And this does not (nothing displayed)? > >> >> >>>>>> > >> >> >>>>>> vtkSmartPointer glyph3D = > >> >> >>>>>> vtkSmartPointer::New(); > >> >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >> >>>>>> glyph3D->SetInputData(reader->GetOutput()); > >> >> >>>>>> glyph3D->Update(); > >> >> >>>>>> > >> >> >>>>>> The first clip is from > >> >> >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D > >> >> >>>>>> > >> >> >>>>>> The 'reader' object is stolen from the ParticleReader example: > >> >> >>>>>> > >> >> >>>>>> vtkSmartPointer reader = > >> >> >>>>>> vtkSmartPointer::New(); > >> >> >>>>>> reader->SetFileName ( filePath.c_str() ); > >> >> >>>>>> reader->SetDataByteOrderToBigEndian(); > >> >> >>>>>> reader->Update(); > >> >> >>>>>> > >> >> >>>>>> The program compiles, but no data appears. It works fine (data > >> >> >>>>>> appears) in the context of the ParticleReader example, where > it > >> >> >>>>>> shows all > >> >> >>>>>> the data points. But I want to see them as glyphs, not little > >> >> >>>>>> squares. I > >> >> >>>>>> seem to be misunderstanding something fundamental, but not > >> >> >>>>>> seeing > >> >> >>>>>> what it > >> >> >>>>>> could be. > >> >> >>>>>> > >> >> >>>>>> Many thanks, > >> >> >>>>>> > >> >> >>>>>> -Tom > >> >> >>>>>> > >> >> >>>>>> > >> >> >>>>>> > >> >> >>>>>> _______________________________________________ > >> >> >>>>>> Powered by www.kitware.com > >> >> >>>>>> > >> >> >>>>>> Visit other Kitware open-source projects at > >> >> >>>>>> http://www.kitware.com/opensource/opensource.html > >> >> >>>>>> > >> >> >>>>>> Please keep messages on-topic and check the VTK FAQ at: > >> >> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ > >> >> >>>>>> > >> >> >>>>>> Search the list archives at: > >> >> >>>>>> http://markmail.org/search/?q=vtkusers > >> >> >>>>>> > >> >> >>>>>> Follow this link to subscribe/unsubscribe: > >> >> >>>>>> https://vtk.org/mailman/listinfo/vtkusers > >> >> >>>>>> > >> >> >>>>> > >> >> >>>> > >> >> >>> > >> >> >> > >> >> > > >> >> > > >> >> > _______________________________________________ > >> >> > Powered by www.kitware.com > >> >> > > >> >> > Visit other Kitware open-source projects at > >> >> > http://www.kitware.com/opensource/opensource.html > >> >> > > >> >> > Please keep messages on-topic and check the VTK FAQ at: > >> >> > http://www.vtk.org/Wiki/VTK_FAQ > >> >> > > >> >> > Search the list archives at: http://markmail.org/search/?q= > vtkusers > >> >> > > >> >> > Follow this link to subscribe/unsubscribe: > >> >> > https://vtk.org/mailman/listinfo/vtkusers > >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> Unpaid intern in BillsParadise at noware dot com > >> > > >> > > >> > > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > https://vtk.org/mailman/listinfo/vtkusers > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Sat Apr 7 00:38:35 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sat, 7 Apr 2018 13:38:35 +0900 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Hi Tom, I could easily convert the vtk file to a particles file. Would you see the attached code? Best Regards, 2018-04-07 9:56 GMT+09:00 Sgouros, Thomas : > Thank you, this is very kind again. How did you convert it? > > I would expect that a reader that did not read a file properly would issue > an error message. But perhaps I should modify those expectations. > > Thank you, > > -Tom > > On Fri, Apr 6, 2018 at 8:21 PM, kenichiro yoshimi > wrote: >> >> Hi Tom, >> >> At last I can replicate your problem. This may be caused by not >> selecting an appropriate reader. >> >> vtkParticleReader can't read output_p40.vtk you upload since the >> expected format is something like: >> x, y, z, scalar >> It also allows for x\ty\tz\tscalar or x y z scalar. See the >> documentation about vtkParticleReader. >> https://www.vtk.org/doc/nightly/html/classvtkParticleReader.html#details >> >> The correct way to read output_p40.vtk is to use vtkPolyDataReader >> rather than vtkParticleReader. >> >> I hope this will be of some help. >> Thanks, >> >> 2018-04-07 3:30 GMT+09:00 Sgouros, Thomas : >> > Thank you, you are very kind to have taken this time. My original >> > program >> > does indeed work with your data and your data is the same as mine, but >> > the >> > data files are in different formats, even though they are both ASCII and >> > contain the same data. The top of my file looks like this: >> > >> > # vtk DataFile Version 2.0 >> > particlePositions >> > ASCII >> > DATASET POLYDATA >> > POINTS 5111 float >> > 13.451000 37.225000 0.417060 >> > 14.771000 10.352000 17.837000 >> > 18.511000 32.313000 12.778000 >> > 0.644430 21.956000 50.414000 >> > 12.346000 22.660000 50.371000 >> > 7.361000 7.991100 45.339000 >> > 24.999000 16.144000 27.909000 ... >> > >> > There are 5,111 data points in this file, followed by a few thousand >> > 1.0's. >> > >> > The top of the file you sent back to me looks like this, and this one >> > works >> > fine. >> > >> > 13.451000 37.225000 0.417060 1.0 >> > 14.771000 10.352000 17.837000 1.0 >> > 18.511000 32.313000 12.778000 1.0 >> > 0.644430 21.956000 50.414000 1.0 >> > 12.346000 22.660000 50.371000 1.0 >> > 7.361000 7.991100 45.339000 1.0 >> > 24.999000 16.144000 27.909000 1.0 ... >> > >> > Both files read without obvious error, but only one of them shows data. >> > Can >> > anyone explain this to me? Or is there somewhere I should be looking for >> > errors? (And what did you use to convert it?) >> > >> > Many thanks, >> > >> > -Tom >> > >> > >> > On Fri, Apr 6, 2018 at 10:49 AM, kenichiro yoshimi >> > >> > wrote: >> >> >> >> Hello Tom, >> >> >> >> Your code and data work without any problem and display glyphs. The >> >> testing data is attached. >> >> There is some doubt whether the problem always occurs. >> >> >> >> Thanks, >> >> >> >> 2018-04-04 5:54 GMT+09:00 Sgouros, Thomas : >> >> > "It is often some unexpected minor thing that causes the failure." >> >> > >> >> > I'm certain of that. >> >> > >> >> > Here's the code, mostly pinched straight from the Glyph3D example. >> >> > (And >> >> > I've >> >> > tried swapping the endianness, just for giggles.) The data is an >> >> > ASCII >> >> > vtk >> >> > file that you can get from sgouros.com/output_p40.vtk. >> >> > >> >> > Thank you, >> >> > >> >> > -Tom >> >> > >> >> > >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > #include >> >> > >> >> > >> >> > int main(int argc, char* argv[]) { >> >> > >> >> > std::string filePath = argv[1]; >> >> > vtkSmartPointer reader = >> >> > vtkSmartPointer::New(); >> >> > >> >> > reader->SetFileName ( filePath.c_str() ); >> >> > // if nothing gets displayed or totally wrong, swap the endianness >> >> > reader->SetDataByteOrderToBigEndian(); >> >> > reader->Update(); >> >> > >> >> > // Create anything you want here, we will use a cube for the demo. >> >> > vtkSmartPointer cubeSource = >> >> > vtkSmartPointer::New(); >> >> > >> >> > vtkSmartPointer glyph3D = >> >> > vtkSmartPointer::New(); >> >> > >> >> > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >> > glyph3D->SetInputConnection(reader->GetOutputPort()); >> >> > >> >> > glyph3D->Update(); >> >> > >> >> > std::cout << *(reader->GetOutput()) << std::endl; >> >> > >> >> > // Visualize >> >> > vtkSmartPointer mapper = >> >> > vtkSmartPointer::New(); >> >> > mapper->SetInputConnection(glyph3D->GetOutputPort()); >> >> > >> >> > vtkSmartPointer actor = >> >> > vtkSmartPointer::New(); >> >> > actor->SetMapper(mapper); >> >> > >> >> > vtkSmartPointer renderer = >> >> > vtkSmartPointer::New(); >> >> > vtkSmartPointer renderWindow = >> >> > vtkSmartPointer::New(); >> >> > renderWindow->AddRenderer(renderer); >> >> > vtkSmartPointer renderWindowInteractor = >> >> > vtkSmartPointer::New(); >> >> > renderWindowInteractor->SetRenderWindow(renderWindow); >> >> > >> >> > renderer->AddActor(actor); >> >> > renderer->SetBackground(.3, .6, .3); // Background color green >> >> > >> >> > renderWindow->Render(); >> >> > renderWindowInteractor->Start(); >> >> > >> >> > return EXIT_SUCCESS; >> >> > } >> >> > >> >> > >> >> > On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen >> >> > >> >> > wrote: >> >> >> >> >> >> Post a small compilable example, please. It is often some unexpected >> >> >> minor thing that causes the failure. >> >> >> >> >> >> Thanks, >> >> >> >> >> >> Bill >> >> >> >> >> >> BTW: The wiki examples have been replaced by VTKExamples here: >> >> >> >> >> >> https://lorensen.github.io/VTKExamples/site/ >> >> >> >> >> >> >> >> >> On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain >> >> >> wrote: >> >> >> > What you are doing seems correct and the data is valid (it has >> >> >> > points). >> >> >> > >> >> >> > How do you render the glyph3d filter? Using a polydata mapper? I'm >> >> >> > guessing >> >> >> > no issue on that end? >> >> >> > >> >> >> > Ideally you should use the glyph mapper instead of the filter. But >> >> >> > if >> >> >> > memory >> >> >> > is not a big deal, don't worry about it. >> >> >> > >> >> >> > Seb >> >> >> > >> >> >> > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas >> >> >> > >> >> >> > wrote: >> >> >> >> >> >> >> >> This is reader->GetOutput() >> >> >> >> >> >> >> >> vtkPolyData (0x7f8ce050dad0) >> >> >> >> >> >> >> >> Debug: Off >> >> >> >> >> >> >> >> Modified Time: 217 >> >> >> >> >> >> >> >> Reference Count: 1 >> >> >> >> >> >> >> >> Registered Events: (none) >> >> >> >> >> >> >> >> Information: 0x7f8ce050d9b0 >> >> >> >> >> >> >> >> Data Released: False >> >> >> >> >> >> >> >> Global Release Data: Off >> >> >> >> >> >> >> >> UpdateTime: 218 >> >> >> >> >> >> >> >> Field Data: >> >> >> >> >> >> >> >> Debug: Off >> >> >> >> >> >> >> >> Modified Time: 167 >> >> >> >> >> >> >> >> Reference Count: 1 >> >> >> >> >> >> >> >> Registered Events: (none) >> >> >> >> >> >> >> >> Number Of Arrays: 0 >> >> >> >> >> >> >> >> Number Of Components: 0 >> >> >> >> >> >> >> >> Number Of Tuples: 0 >> >> >> >> >> >> >> >> Number Of Points: 10229 >> >> >> >> >> >> >> >> Number Of Cells: 10229 >> >> >> >> >> >> >> >> >> >> >> >> It goes on for quite a bit more. As I said, when I feed this to a >> >> >> >> vtkPolyDataMapper, it displays and works fine, but I want little >> >> >> >> spheres, >> >> >> >> not little flat rectangles and I thought I could just redirect >> >> >> >> that >> >> >> >> into the >> >> >> >> vtkGlyph3D object, but I must be misunderstanding something. >> >> >> >> >> >> >> >> Thank you, >> >> >> >> >> >> >> >> -Tom >> >> >> >> >> >> >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain >> >> >> >> wrote: >> >> >> >>> >> >> >> >>> You can try to see what the GetOutput() contains as my >> >> >> >>> assumption >> >> >> >>> it >> >> >> >>> would be empty (No points => Number of Points: 0). >> >> >> >>> >> >> >> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); >> >> >> >>> >> >> >> >>> What I mean was >> >> >> >>> >> >> >> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); >> >> >> >>> >> >> >> >>> >> >> >> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas >> >> >> >>> wrote: >> >> >> >>>> >> >> >> >>>> Hi Sebastien: >> >> >> >>>> >> >> >> >>>> Sorry if that was unclear. The third block of code comes first, >> >> >> >>>> and >> >> >> >>>> reader->Update() is called before I use its GetOutput(). In >> >> >> >>>> situ, >> >> >> >>>> it >> >> >> >>>> looks >> >> >> >>>> like this: >> >> >> >>>> >> >> >> >>>> ... >> >> >> >>>> vtkSmartPointer reader = >> >> >> >>>> vtkSmartPointer::New(); >> >> >> >>>> reader->SetFileName ( filePath.c_str() ); >> >> >> >>>> reader->SetDataByteOrderToBigEndian(); >> >> >> >>>> reader->Update(); >> >> >> >>>> >> >> >> >>>> // Create anything you want here, we will use a cube for the >> >> >> >>>> demo. >> >> >> >>>> vtkSmartPointer cubeSource = >> >> >> >>>> vtkSmartPointer::New(); >> >> >> >>>> >> >> >> >>>> vtkSmartPointer glyph3D = >> >> >> >>>> vtkSmartPointer::New(); >> >> >> >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >> >> >>>> glyph3D->SetInputData(reader->GetOutput()); >> >> >> >>>> glyph3D->Update(); >> >> >> >>>> >> >> >> >>>> ... >> >> >> >>>> >> >> >> >>>> I don't think I understand what you mean by the connection >> >> >> >>>> instead >> >> >> >>>> of >> >> >> >>>> the dataset directly. >> >> >> >>>> >> >> >> >>>> Is there a way to peek inside glyph3D and see what it thinks it >> >> >> >>>> has? >> >> >> >>>> >> >> >> >>>> Thank you, >> >> >> >>>> >> >> >> >>>> -Tom >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain >> >> >> >>>> wrote: >> >> >> >>>>> >> >> >> >>>>> Tom, >> >> >> >>>>> >> >> >> >>>>> Just make sure that reader->Update(); was called before >> >> >> >>>>> glyph3D->SetInputData(reader->GetOutput()); >> >> >> >>>>> But it would be better to use the connection instead of the >> >> >> >>>>> dataset >> >> >> >>>>> directly. >> >> >> >>>>> >> >> >> >>>>> Seb >> >> >> >>>>> >> >> >> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas >> >> >> >>>>> wrote: >> >> >> >>>>>> >> >> >> >>>>>> Hello all: >> >> >> >>>>>> >> >> >> >>>>>> Can someone help me understand why this code works: >> >> >> >>>>>> >> >> >> >>>>>> vtkSmartPointer glyph3D = >> >> >> >>>>>> vtkSmartPointer::New(); >> >> >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >> >> >>>>>> glyph3D->SetInputData(polydata); >> >> >> >>>>>> glyph3D->Update(); >> >> >> >>>>>> >> >> >> >>>>>> And this does not (nothing displayed)? >> >> >> >>>>>> >> >> >> >>>>>> vtkSmartPointer glyph3D = >> >> >> >>>>>> vtkSmartPointer::New(); >> >> >> >>>>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); >> >> >> >>>>>> glyph3D->SetInputData(reader->GetOutput()); >> >> >> >>>>>> glyph3D->Update(); >> >> >> >>>>>> >> >> >> >>>>>> The first clip is from >> >> >> >>>>>> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D >> >> >> >>>>>> >> >> >> >>>>>> The 'reader' object is stolen from the ParticleReader >> >> >> >>>>>> example: >> >> >> >>>>>> >> >> >> >>>>>> vtkSmartPointer reader = >> >> >> >>>>>> vtkSmartPointer::New(); >> >> >> >>>>>> reader->SetFileName ( filePath.c_str() ); >> >> >> >>>>>> reader->SetDataByteOrderToBigEndian(); >> >> >> >>>>>> reader->Update(); >> >> >> >>>>>> >> >> >> >>>>>> The program compiles, but no data appears. It works fine >> >> >> >>>>>> (data >> >> >> >>>>>> appears) in the context of the ParticleReader example, where >> >> >> >>>>>> it >> >> >> >>>>>> shows all >> >> >> >>>>>> the data points. But I want to see them as glyphs, not little >> >> >> >>>>>> squares. I >> >> >> >>>>>> seem to be misunderstanding something fundamental, but not >> >> >> >>>>>> seeing >> >> >> >>>>>> what it >> >> >> >>>>>> could be. >> >> >> >>>>>> >> >> >> >>>>>> Many thanks, >> >> >> >>>>>> >> >> >> >>>>>> -Tom >> >> >> >>>>>> >> >> >> >>>>>> >> >> >> >>>>>> >> >> >> >>>>>> _______________________________________________ >> >> >> >>>>>> Powered by www.kitware.com >> >> >> >>>>>> >> >> >> >>>>>> Visit other Kitware open-source projects at >> >> >> >>>>>> http://www.kitware.com/opensource/opensource.html >> >> >> >>>>>> >> >> >> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >> >> >> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >>>>>> >> >> >> >>>>>> Search the list archives at: >> >> >> >>>>>> http://markmail.org/search/?q=vtkusers >> >> >> >>>>>> >> >> >> >>>>>> Follow this link to subscribe/unsubscribe: >> >> >> >>>>>> https://vtk.org/mailman/listinfo/vtkusers >> >> >> >>>>>> >> >> >> >>>>> >> >> >> >>>> >> >> >> >>> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > _______________________________________________ >> >> >> > Powered by www.kitware.com >> >> >> > >> >> >> > Visit other Kitware open-source projects at >> >> >> > http://www.kitware.com/opensource/opensource.html >> >> >> > >> >> >> > Please keep messages on-topic and check the VTK FAQ at: >> >> >> > http://www.vtk.org/Wiki/VTK_FAQ >> >> >> > >> >> >> > Search the list archives at: >> >> >> > http://markmail.org/search/?q=vtkusers >> >> >> > >> >> >> > Follow this link to subscribe/unsubscribe: >> >> >> > https://vtk.org/mailman/listinfo/vtkusers >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> Unpaid intern in BillsParadise at noware dot com >> >> > >> >> > >> >> > >> >> > _______________________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Please keep messages on-topic and check the VTK FAQ at: >> >> > http://www.vtk.org/Wiki/VTK_FAQ >> >> > >> >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > https://vtk.org/mailman/listinfo/vtkusers >> >> > >> > >> > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: ToParticles.tar.gz Type: application/x-gzip Size: 929 bytes Desc: not available URL: From jamil.goettlich at gmail.com Sat Apr 7 06:12:13 2018 From: jamil.goettlich at gmail.com (Jamil Goettlich) Date: Sat, 7 Apr 2018 12:12:13 +0200 Subject: [vtkusers] General Question to VTK in VR In-Reply-To: References: Message-ID: That is all really great information, thank you so much! Jamil 2018-04-06 20:46 GMT+02:00 Sgouros, Thomas : > I'm sure the preceding answers to the question will be more than enough to > satisfy the OP, but there is yet another way, a project called MinVR that > is in alpha, but is meant to be a generic and relatively straightforward > way to convert any old 3D graphics program to VR, and that is compatible > with a wide range of displays, including head-mounted displays like the > Oculus and HTC, caves, desktop VR displays, and regular laptop and desktop > screens. I'm working on vtk examples now to illustrate its use with vtk, > not that I'm all that fluent in that dialect. This is a joint project of > people at UMinn and Brown University, and can be found at github.com/MinVR > . > > -Tom > > On Fri, Apr 6, 2018 at 11:05 AM, Andras Lasso wrote: > >> > Is there anybody who has displayed unsteady states with VTK in VR and >> if so what method was used and how was that done? >> >> >> >> Yes! 3D Slicer has an awesome VR viewer. With a single click, the 3D >> scene appears in your headset and the application remains fully interactive >> ? you can manipulate objects both on the desktop using keyboard and mouse, >> and using VR controllers in the VR view. You can also view dynamic content, >> such as 4D volumes even using volume rendering. >> >> >> >> The source code is available here: https://github.com/KitwareMedi >> cal/SlicerVirtualReality. You should be able to find all the >> implementation details there. >> >> >> >> To try it: Download a recent Slicer nightly version ( >> https://download.slicer.org), install SlicerVirtualReality extension >> from Slicer?s extension manager. After you loaded your data you just need >> to click the VR headset button on the toolbar (?Show scene in virtual >> reality?). >> >> >> >> Limitations: There is a bug in volume rendering that clips the volume at >> unexpected locations (Kitware is working on a fix, expected to be ready >> soon). Position of objects that are moved using VR controllers are not yet >> synchronization back to the scene displayed in the main window (this is the >> next focus of development). >> >> >> >> Andras >> >> >> >> >> >> *From:* vtkusers *On Behalf Of *Jamil >> Goettlich >> *Sent:* Friday, April 6, 2018 10:46 AM >> *To:* vtk >> *Subject:* [vtkusers] General Question to VTK in VR >> >> >> >> Hello VTK Users, >> >> >> >> I have some general questions to the current state of VR in VTK. Please >> let me know if this is not the right place to ask questions about that. >> According to what I have read (among others "Enhancements to VTK enabling >> scientific visualization in immersive environments") there are two >> favourized ways of bringing VTK into VR: >> - VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs) >> >> - OpenGL context sharing (VTK Rendering External) --> Using existing >> contexts from other (VR-)Toolkits (Multiple devices) >> >> >> >> Until now I have only seen single frames being displayed in VR (in VTK >> as well as in Paraview), not unsteady state (e.g. in ParaView 5.3, >> OpenVR version, I cannot press the play button and send the content to >> OpenVR, I can only see one frame on the HMD). >> >> From what I have seen so far, the VR-Plugin of ParaView does not use any >> of the two methods. They are using the library VRPN for interacting but all >> the rest is done within ParaView. >> >> >> >> My questions are the following: >> >> - Is there anybody who has displayed unsteady states with VTK in VR and >> if so what method was used and how was that done? >> >> - Is there any paper or detailled documentation to the OpenGL context >> sharing method? I did not find alot to that except from the testing example >> >> "TestGLUTRenderWindow.cxx" which I was not able to build properly until >> now. Also, if anyone has experience using FreeVR with VTK OpenGL context >> sharing method, I would be very interested in that too. >> >> I hope my questions are appropriate (and not too widespread) and I would >> be very happy to be pointed to some current sources, especially concerning >> unsteady state simulations with VTK in VR. I would be very happy for anyone >> to share their own experiences or some current papers to that topic. >> >> >> >> Thanks alot, >> >> >> >> Jamil >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas_sgouros at brown.edu Sat Apr 7 09:06:13 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Sat, 7 Apr 2018 09:06:13 -0400 Subject: [vtkusers] vtkParticleReader and vtkGlyph3D In-Reply-To: References: Message-ID: Thank you again for the time and attention. I wish I had understood that I can't use vtkParticleReader for particle data, even though it appeared to read my data successfully. Thank you, -Tom On Sat, Apr 7, 2018 at 12:38 AM, kenichiro yoshimi wrote: > Hi Tom, > > I could easily convert the vtk file to a particles file. Would you see > the attached code? > > Best Regards, > > 2018-04-07 9:56 GMT+09:00 Sgouros, Thomas : > > Thank you, this is very kind again. How did you convert it? > > > > I would expect that a reader that did not read a file properly would > issue > > an error message. But perhaps I should modify those expectations. > > > > Thank you, > > > > -Tom > > > > On Fri, Apr 6, 2018 at 8:21 PM, kenichiro yoshimi < > rccm.kyoshimi at gmail.com> > > wrote: > >> > >> Hi Tom, > >> > >> At last I can replicate your problem. This may be caused by not > >> selecting an appropriate reader. > >> > >> vtkParticleReader can't read output_p40.vtk you upload since the > >> expected format is something like: > >> x, y, z, scalar > >> It also allows for x\ty\tz\tscalar or x y z scalar. See the > >> documentation about vtkParticleReader. > >> https://www.vtk.org/doc/nightly/html/classvtkParticleReader.html# > details > >> > >> The correct way to read output_p40.vtk is to use vtkPolyDataReader > >> rather than vtkParticleReader. > >> > >> I hope this will be of some help. > >> Thanks, > >> > >> 2018-04-07 3:30 GMT+09:00 Sgouros, Thomas : > >> > Thank you, you are very kind to have taken this time. My original > >> > program > >> > does indeed work with your data and your data is the same as mine, but > >> > the > >> > data files are in different formats, even though they are both ASCII > and > >> > contain the same data. The top of my file looks like this: > >> > > >> > # vtk DataFile Version 2.0 > >> > particlePositions > >> > ASCII > >> > DATASET POLYDATA > >> > POINTS 5111 float > >> > 13.451000 37.225000 0.417060 > >> > 14.771000 10.352000 17.837000 > >> > 18.511000 32.313000 12.778000 > >> > 0.644430 21.956000 50.414000 > >> > 12.346000 22.660000 50.371000 > >> > 7.361000 7.991100 45.339000 > >> > 24.999000 16.144000 27.909000 ... > >> > > >> > There are 5,111 data points in this file, followed by a few thousand > >> > 1.0's. > >> > > >> > The top of the file you sent back to me looks like this, and this one > >> > works > >> > fine. > >> > > >> > 13.451000 37.225000 0.417060 1.0 > >> > 14.771000 10.352000 17.837000 1.0 > >> > 18.511000 32.313000 12.778000 1.0 > >> > 0.644430 21.956000 50.414000 1.0 > >> > 12.346000 22.660000 50.371000 1.0 > >> > 7.361000 7.991100 45.339000 1.0 > >> > 24.999000 16.144000 27.909000 1.0 ... > >> > > >> > Both files read without obvious error, but only one of them shows > data. > >> > Can > >> > anyone explain this to me? Or is there somewhere I should be looking > for > >> > errors? (And what did you use to convert it?) > >> > > >> > Many thanks, > >> > > >> > -Tom > >> > > >> > > >> > On Fri, Apr 6, 2018 at 10:49 AM, kenichiro yoshimi > >> > > >> > wrote: > >> >> > >> >> Hello Tom, > >> >> > >> >> Your code and data work without any problem and display glyphs. The > >> >> testing data is attached. > >> >> There is some doubt whether the problem always occurs. > >> >> > >> >> Thanks, > >> >> > >> >> 2018-04-04 5:54 GMT+09:00 Sgouros, Thomas >: > >> >> > "It is often some unexpected minor thing that causes the failure." > >> >> > > >> >> > I'm certain of that. > >> >> > > >> >> > Here's the code, mostly pinched straight from the Glyph3D example. > >> >> > (And > >> >> > I've > >> >> > tried swapping the endianness, just for giggles.) The data is an > >> >> > ASCII > >> >> > vtk > >> >> > file that you can get from sgouros.com/output_p40.vtk. > >> >> > > >> >> > Thank you, > >> >> > > >> >> > -Tom > >> >> > > >> >> > > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > #include > >> >> > > >> >> > > >> >> > int main(int argc, char* argv[]) { > >> >> > > >> >> > std::string filePath = argv[1]; > >> >> > vtkSmartPointer reader = > >> >> > vtkSmartPointer::New(); > >> >> > > >> >> > reader->SetFileName ( filePath.c_str() ); > >> >> > // if nothing gets displayed or totally wrong, swap the > endianness > >> >> > reader->SetDataByteOrderToBigEndian(); > >> >> > reader->Update(); > >> >> > > >> >> > // Create anything you want here, we will use a cube for the > demo. > >> >> > vtkSmartPointer cubeSource = > >> >> > vtkSmartPointer::New(); > >> >> > > >> >> > vtkSmartPointer glyph3D = > >> >> > vtkSmartPointer::New(); > >> >> > > >> >> > glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >> > glyph3D->SetInputConnection(reader->GetOutputPort()); > >> >> > > >> >> > glyph3D->Update(); > >> >> > > >> >> > std::cout << *(reader->GetOutput()) << std::endl; > >> >> > > >> >> > // Visualize > >> >> > vtkSmartPointer mapper = > >> >> > vtkSmartPointer::New(); > >> >> > mapper->SetInputConnection(glyph3D->GetOutputPort()); > >> >> > > >> >> > vtkSmartPointer actor = > >> >> > vtkSmartPointer::New(); > >> >> > actor->SetMapper(mapper); > >> >> > > >> >> > vtkSmartPointer renderer = > >> >> > vtkSmartPointer::New(); > >> >> > vtkSmartPointer renderWindow = > >> >> > vtkSmartPointer::New(); > >> >> > renderWindow->AddRenderer(renderer); > >> >> > vtkSmartPointer > renderWindowInteractor = > >> >> > vtkSmartPointer::New(); > >> >> > renderWindowInteractor->SetRenderWindow(renderWindow); > >> >> > > >> >> > renderer->AddActor(actor); > >> >> > renderer->SetBackground(.3, .6, .3); // Background color green > >> >> > > >> >> > renderWindow->Render(); > >> >> > renderWindowInteractor->Start(); > >> >> > > >> >> > return EXIT_SUCCESS; > >> >> > } > >> >> > > >> >> > > >> >> > On Tue, Apr 3, 2018 at 4:46 PM, Bill Lorensen > >> >> > > >> >> > wrote: > >> >> >> > >> >> >> Post a small compilable example, please. It is often some > unexpected > >> >> >> minor thing that causes the failure. > >> >> >> > >> >> >> Thanks, > >> >> >> > >> >> >> Bill > >> >> >> > >> >> >> BTW: The wiki examples have been replaced by VTKExamples here: > >> >> >> > >> >> >> https://lorensen.github.io/VTKExamples/site/ > >> >> >> > >> >> >> > >> >> >> On Tue, Apr 3, 2018 at 1:43 PM, Sebastien Jourdain > >> >> >> wrote: > >> >> >> > What you are doing seems correct and the data is valid (it has > >> >> >> > points). > >> >> >> > > >> >> >> > How do you render the glyph3d filter? Using a polydata mapper? > I'm > >> >> >> > guessing > >> >> >> > no issue on that end? > >> >> >> > > >> >> >> > Ideally you should use the glyph mapper instead of the filter. > But > >> >> >> > if > >> >> >> > memory > >> >> >> > is not a big deal, don't worry about it. > >> >> >> > > >> >> >> > Seb > >> >> >> > > >> >> >> > On Tue, Apr 3, 2018 at 1:47 PM, Sgouros, Thomas > >> >> >> > > >> >> >> > wrote: > >> >> >> >> > >> >> >> >> This is reader->GetOutput() > >> >> >> >> > >> >> >> >> vtkPolyData (0x7f8ce050dad0) > >> >> >> >> > >> >> >> >> Debug: Off > >> >> >> >> > >> >> >> >> Modified Time: 217 > >> >> >> >> > >> >> >> >> Reference Count: 1 > >> >> >> >> > >> >> >> >> Registered Events: (none) > >> >> >> >> > >> >> >> >> Information: 0x7f8ce050d9b0 > >> >> >> >> > >> >> >> >> Data Released: False > >> >> >> >> > >> >> >> >> Global Release Data: Off > >> >> >> >> > >> >> >> >> UpdateTime: 218 > >> >> >> >> > >> >> >> >> Field Data: > >> >> >> >> > >> >> >> >> Debug: Off > >> >> >> >> > >> >> >> >> Modified Time: 167 > >> >> >> >> > >> >> >> >> Reference Count: 1 > >> >> >> >> > >> >> >> >> Registered Events: (none) > >> >> >> >> > >> >> >> >> Number Of Arrays: 0 > >> >> >> >> > >> >> >> >> Number Of Components: 0 > >> >> >> >> > >> >> >> >> Number Of Tuples: 0 > >> >> >> >> > >> >> >> >> Number Of Points: 10229 > >> >> >> >> > >> >> >> >> Number Of Cells: 10229 > >> >> >> >> > >> >> >> >> > >> >> >> >> It goes on for quite a bit more. As I said, when I feed this > to a > >> >> >> >> vtkPolyDataMapper, it displays and works fine, but I want > little > >> >> >> >> spheres, > >> >> >> >> not little flat rectangles and I thought I could just redirect > >> >> >> >> that > >> >> >> >> into the > >> >> >> >> vtkGlyph3D object, but I must be misunderstanding something. > >> >> >> >> > >> >> >> >> Thank you, > >> >> >> >> > >> >> >> >> -Tom > >> >> >> >> > >> >> >> >> On Tue, Apr 3, 2018 at 3:26 PM, Sebastien Jourdain > >> >> >> >> wrote: > >> >> >> >>> > >> >> >> >>> You can try to see what the GetOutput() contains as my > >> >> >> >>> assumption > >> >> >> >>> it > >> >> >> >>> would be empty (No points => Number of Points: 0). > >> >> >> >>> > >> >> >> >>> reader->GetOutput()->PrintSelf(cout, vtkIndent(2)); > >> >> >> >>> > >> >> >> >>> What I mean was > >> >> >> >>> > >> >> >> >>> glyph3D->SetInputConnection(reader->GetOutputPort()); > >> >> >> >>> > >> >> >> >>> > >> >> >> >>> On Tue, Apr 3, 2018 at 1:23 PM, Sgouros, Thomas > >> >> >> >>> wrote: > >> >> >> >>>> > >> >> >> >>>> Hi Sebastien: > >> >> >> >>>> > >> >> >> >>>> Sorry if that was unclear. The third block of code comes > first, > >> >> >> >>>> and > >> >> >> >>>> reader->Update() is called before I use its GetOutput(). In > >> >> >> >>>> situ, > >> >> >> >>>> it > >> >> >> >>>> looks > >> >> >> >>>> like this: > >> >> >> >>>> > >> >> >> >>>> ... > >> >> >> >>>> vtkSmartPointer reader = > >> >> >> >>>> vtkSmartPointer::New(); > >> >> >> >>>> reader->SetFileName ( filePath.c_str() ); > >> >> >> >>>> reader->SetDataByteOrderToBigEndian(); > >> >> >> >>>> reader->Update(); > >> >> >> >>>> > >> >> >> >>>> // Create anything you want here, we will use a cube for > the > >> >> >> >>>> demo. > >> >> >> >>>> vtkSmartPointer cubeSource = > >> >> >> >>>> vtkSmartPointer::New(); > >> >> >> >>>> > >> >> >> >>>> vtkSmartPointer glyph3D = > >> >> >> >>>> vtkSmartPointer::New(); > >> >> >> >>>> glyph3D->SetSourceConnection(cubeSource->GetOutputPort()); > >> >> >> >>>> glyph3D->SetInputData(reader->GetOutput()); > >> >> >> >>>> glyph3D->Update(); > >> >> >> >>>> > >> >> >> >>>> ... > >> >> >> >>>> > >> >> >> >>>> I don't think I understand what you mean by the connection > >> >> >> >>>> instead > >> >> >> >>>> of > >> >> >> >>>> the dataset directly. > >> >> >> >>>> > >> >> >> >>>> Is there a way to peek inside glyph3D and see what it thinks > it > >> >> >> >>>> has? > >> >> >> >>>> > >> >> >> >>>> Thank you, > >> >> >> >>>> > >> >> >> >>>> -Tom > >> >> >> >>>> > >> >> >> >>>> > >> >> >> >>>> On Tue, Apr 3, 2018 at 2:53 PM, Sebastien Jourdain > >> >> >> >>>> wrote: > >> >> >> >>>>> > >> >> >> >>>>> Tom, > >> >> >> >>>>> > >> >> >> >>>>> Just make sure that reader->Update(); was called before > >> >> >> >>>>> glyph3D->SetInputData(reader->GetOutput()); > >> >> >> >>>>> But it would be better to use the connection instead of the > >> >> >> >>>>> dataset > >> >> >> >>>>> directly. > >> >> >> >>>>> > >> >> >> >>>>> Seb > >> >> >> >>>>> > >> >> >> >>>>> On Tue, Apr 3, 2018 at 12:27 PM, Sgouros, Thomas > >> >> >> >>>>> wrote: > >> >> >> >>>>>> > >> >> >> >>>>>> Hello all: > >> >> >> >>>>>> > >> >> >> >>>>>> Can someone help me understand why this code works: > >> >> >> >>>>>> > >> >> >> >>>>>> vtkSmartPointer glyph3D = > >> >> >> >>>>>> vtkSmartPointer::New(); > >> >> >> >>>>>> glyph3D->SetSourceConnection( > cubeSource->GetOutputPort()); > >> >> >> >>>>>> glyph3D->SetInputData(polydata); > >> >> >> >>>>>> glyph3D->Update(); > >> >> >> >>>>>> > >> >> >> >>>>>> And this does not (nothing displayed)? > >> >> >> >>>>>> > >> >> >> >>>>>> vtkSmartPointer glyph3D = > >> >> >> >>>>>> vtkSmartPointer::New(); > >> >> >> >>>>>> glyph3D->SetSourceConnection( > cubeSource->GetOutputPort()); > >> >> >> >>>>>> glyph3D->SetInputData(reader->GetOutput()); > >> >> >> >>>>>> glyph3D->Update(); > >> >> >> >>>>>> > >> >> >> >>>>>> The first clip is from > >> >> >> >>>>>> https://www.vtk.org/Wiki/VTK/ > Examples/Cxx/Filtering/Glyph3D > >> >> >> >>>>>> > >> >> >> >>>>>> The 'reader' object is stolen from the ParticleReader > >> >> >> >>>>>> example: > >> >> >> >>>>>> > >> >> >> >>>>>> vtkSmartPointer reader = > >> >> >> >>>>>> vtkSmartPointer::New(); > >> >> >> >>>>>> reader->SetFileName ( filePath.c_str() ); > >> >> >> >>>>>> reader->SetDataByteOrderToBigEndian(); > >> >> >> >>>>>> reader->Update(); > >> >> >> >>>>>> > >> >> >> >>>>>> The program compiles, but no data appears. It works fine > >> >> >> >>>>>> (data > >> >> >> >>>>>> appears) in the context of the ParticleReader example, > where > >> >> >> >>>>>> it > >> >> >> >>>>>> shows all > >> >> >> >>>>>> the data points. But I want to see them as glyphs, not > little > >> >> >> >>>>>> squares. I > >> >> >> >>>>>> seem to be misunderstanding something fundamental, but not > >> >> >> >>>>>> seeing > >> >> >> >>>>>> what it > >> >> >> >>>>>> could be. > >> >> >> >>>>>> > >> >> >> >>>>>> Many thanks, > >> >> >> >>>>>> > >> >> >> >>>>>> -Tom > >> >> >> >>>>>> > >> >> >> >>>>>> > >> >> >> >>>>>> > >> >> >> >>>>>> _______________________________________________ > >> >> >> >>>>>> Powered by www.kitware.com > >> >> >> >>>>>> > >> >> >> >>>>>> Visit other Kitware open-source projects at > >> >> >> >>>>>> http://www.kitware.com/opensource/opensource.html > >> >> >> >>>>>> > >> >> >> >>>>>> Please keep messages on-topic and check the VTK FAQ at: > >> >> >> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ > >> >> >> >>>>>> > >> >> >> >>>>>> Search the list archives at: > >> >> >> >>>>>> http://markmail.org/search/?q=vtkusers > >> >> >> >>>>>> > >> >> >> >>>>>> Follow this link to subscribe/unsubscribe: > >> >> >> >>>>>> https://vtk.org/mailman/listinfo/vtkusers > >> >> >> >>>>>> > >> >> >> >>>>> > >> >> >> >>>> > >> >> >> >>> > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> >> > _______________________________________________ > >> >> >> > Powered by www.kitware.com > >> >> >> > > >> >> >> > Visit other Kitware open-source projects at > >> >> >> > http://www.kitware.com/opensource/opensource.html > >> >> >> > > >> >> >> > Please keep messages on-topic and check the VTK FAQ at: > >> >> >> > http://www.vtk.org/Wiki/VTK_FAQ > >> >> >> > > >> >> >> > Search the list archives at: > >> >> >> > http://markmail.org/search/?q=vtkusers > >> >> >> > > >> >> >> > Follow this link to subscribe/unsubscribe: > >> >> >> > https://vtk.org/mailman/listinfo/vtkusers > >> >> >> > > >> >> >> > >> >> >> > >> >> >> > >> >> >> -- > >> >> >> Unpaid intern in BillsParadise at noware dot com > >> >> > > >> >> > > >> >> > > >> >> > _______________________________________________ > >> >> > Powered by www.kitware.com > >> >> > > >> >> > Visit other Kitware open-source projects at > >> >> > http://www.kitware.com/opensource/opensource.html > >> >> > > >> >> > Please keep messages on-topic and check the VTK FAQ at: > >> >> > http://www.vtk.org/Wiki/VTK_FAQ > >> >> > > >> >> > Search the list archives at: http://markmail.org/search/?q= > vtkusers > >> >> > > >> >> > Follow this link to subscribe/unsubscribe: > >> >> > https://vtk.org/mailman/listinfo/vtkusers > >> >> > > >> > > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Sat Apr 7 15:45:23 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Sat, 07 Apr 2018 19:45:23 +0000 Subject: [vtkusers] General Question to VTK in VR In-Reply-To: References: Message-ID: Hi Jamil, The OpenGL context sharing mechanism as exercised by vtkRenderingExternal module was used to produce a bunch of examples for rendering VTK in a CAVE environment. The examples are available as part of VruiVTK project on GitHub. While those examples used VRUI as the VR engine, you could just as easily swap it out with FreeVR. The general logic used is that VRUI/FreeVR would create the OpenGL context. In the first display call initialize ExternalVTKWidget to share the existing context with VTK. Hope that helps. Thanks, Sankhesh ? On Sat, Apr 7, 2018 at 6:12 AM Jamil Goettlich wrote: > That is all really great information, thank you so much! > > Jamil > > 2018-04-06 20:46 GMT+02:00 Sgouros, Thomas : > >> I'm sure the preceding answers to the question will be more than enough >> to satisfy the OP, but there is yet another way, a project called MinVR >> that is in alpha, but is meant to be a generic and relatively >> straightforward way to convert any old 3D graphics program to VR, and that >> is compatible with a wide range of displays, including head-mounted >> displays like the Oculus and HTC, caves, desktop VR displays, and regular >> laptop and desktop screens. I'm working on vtk examples now to illustrate >> its use with vtk, not that I'm all that fluent in that dialect. This is a >> joint project of people at UMinn and Brown University, and can be found at >> github.com/MinVR. >> >> -Tom >> >> On Fri, Apr 6, 2018 at 11:05 AM, Andras Lasso wrote: >> >>> > Is there anybody who has displayed unsteady states with VTK in VR and >>> if so what method was used and how was that done? >>> >>> >>> >>> Yes! 3D Slicer has an awesome VR viewer. With a single click, the 3D >>> scene appears in your headset and the application remains fully interactive >>> ? you can manipulate objects both on the desktop using keyboard and mouse, >>> and using VR controllers in the VR view. You can also view dynamic content, >>> such as 4D volumes even using volume rendering. >>> >>> >>> >>> The source code is available here: >>> https://github.com/KitwareMedical/SlicerVirtualReality. You should be >>> able to find all the implementation details there. >>> >>> >>> >>> To try it: Download a recent Slicer nightly version ( >>> https://download.slicer.org), install SlicerVirtualReality extension >>> from Slicer?s extension manager. After you loaded your data you just need >>> to click the VR headset button on the toolbar (?Show scene in virtual >>> reality?). >>> >>> >>> >>> Limitations: There is a bug in volume rendering that clips the volume at >>> unexpected locations (Kitware is working on a fix, expected to be ready >>> soon). Position of objects that are moved using VR controllers are not yet >>> synchronization back to the scene displayed in the main window (this is the >>> next focus of development). >>> >>> >>> >>> Andras >>> >>> >>> >>> >>> >>> *From:* vtkusers *On Behalf Of *Jamil >>> Goettlich >>> *Sent:* Friday, April 6, 2018 10:46 AM >>> *To:* vtk >>> *Subject:* [vtkusers] General Question to VTK in VR >>> >>> >>> >>> Hello VTK Users, >>> >>> >>> >>> I have some general questions to the current state of VR in VTK. Please >>> let me know if this is not the right place to ask questions about that. >>> According to what I have read (among others "Enhancements to VTK enabling >>> scientific visualization in immersive environments") there are two >>> favourized ways of bringing VTK into VR: >>> - VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs) >>> >>> - OpenGL context sharing (VTK Rendering External) --> Using existing >>> contexts from other (VR-)Toolkits (Multiple devices) >>> >>> >>> >>> Until now I have only seen single frames being displayed in VR (in VTK >>> as well as in Paraview), not unsteady state (e.g. in ParaView 5.3, >>> OpenVR version, I cannot press the play button and send the content to >>> OpenVR, I can only see one frame on the HMD). >>> >>> From what I have seen so far, the VR-Plugin of ParaView does not use any >>> of the two methods. They are using the library VRPN for interacting but all >>> the rest is done within ParaView. >>> >>> >>> >>> My questions are the following: >>> >>> - Is there anybody who has displayed unsteady states with VTK in VR and >>> if so what method was used and how was that done? >>> >>> - Is there any paper or detailled documentation to the OpenGL context >>> sharing method? I did not find alot to that except from the testing example >>> >>> "TestGLUTRenderWindow.cxx" which I was not able to build properly until >>> now. Also, if anyone has experience using FreeVR with VTK OpenGL context >>> sharing method, I would be very interested in that too. >>> >>> I hope my questions are appropriate (and not too widespread) and I would >>> be very happy to be pointed to some current sources, especially concerning >>> unsteady state simulations with VTK in VR. I would be very happy for anyone >>> to share their own experiences or some current papers to that topic. >>> >>> >>> >>> Thanks alot, >>> >>> >>> >>> Jamil >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >>> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From zozonmr at gmail.com Sat Apr 7 17:52:30 2018 From: zozonmr at gmail.com (Zoltan Takacs) Date: Sat, 7 Apr 2018 22:52:30 +0100 Subject: [vtkusers] multiple charts/plots in one window Message-ID: Hi, I am trying to get 4 charts (vtkChartXY) into a window (multiple contextviews in a window I guess). I have looked at the examples for lineplot and scatterplot however if I add a chart2 to view they are displayed on the top each other. What is the best way to achieve this? Thanks! From rccm.kyoshimi at gmail.com Sun Apr 8 00:56:28 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sun, 8 Apr 2018 13:56:28 +0900 Subject: [vtkusers] Animation with VTU files. In-Reply-To: References: Message-ID: Hello Zoltan, Probably it is possible to retrieve the vtkXMLUnstructuredGridReader object from the object that sets the reader as input connection like something below: sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); sphereGlyph->SetInputConnection(reader->GetOutputPort()); // reversely access auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( sphereGlyph->GetInputConnection(0, 0)->GetProducer()); Here is ReverseAccess example from VTK examples https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ReverseAccess/ And I attach a simple code without programmable filter though I'm not sure if this is a correct usage.. Thanks 2018-04-07 0:50 GMT+09:00 Zoltan Kovacs : > Dear VTK Users, > > > > I have a question on animation with VTU file series. I wrote a code which > displays particels modeled with sphere > > glyphs, where the particle positions and radii are read from VTU files: > > > > VTK_CREATE(vtkXMLUnstructuredGridReader, particleReader); > > VTK_CREATE(vtkSphereSource, sphere); > > VTK_CREATE(vtkGlyph3D, sphereGlyph); > > VTK_CREATE(vtkVertexGlyphFilter, glyphFilter); > > VTK_CREATE(vtkPolyDataMapper, particleMapper); > > VTK_CREATE(vtkActor, particleActor); > > > > particleReader->SetFileName( particleName.c_str() ); > > particleReader->Update(); > > > > vtkUnstructuredGrid *grid = particleReader->GetOutput(); > > vtkPointData *pointData = grid->GetPointData(); > > pointData->SetActiveScalars("Radii"); > > > > glyphFilter->SetInputData(grid); > > glyphFilter->Update(); > > > > sphere->SetRadius(1); > > sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); > > sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); > > > > particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); > > particleMapper->SetScalarModeToUsePointFieldData(); > > particleMapper->Update(); > > particleActor->SetMapper(particleMapper); > > > > VTK_CREATE(vtkRenderer, renderer); > > VTK_CREATE(vtkRenderWindow, renderWindow); > > VTK_CREATE(vtkRenderWindowInteractor, renderWindowInteractor); > > > > renderWindow->AddRenderer(renderer); > > renderWindowInteractor->SetRenderWindow(renderWindow); > > > > renderer->AddActor(particleActor); > > renderer->SetBackground(.3, .6, .3); > > > > renderWindow->Render(); > > renderWindowInteractor->Start(); > > > > I would like to make an animation where the particle postions are updated. > Thus I would change the string particleName in the argument of the function > particleReader->SetFileName() reading a new VTU file and update the whole > procedure with the unstructured grid / 3D glyph / glyp filter obejcts. I try > to use vktProgrammableFilter and vtkCallbackCommand to impelment the > animation process as I found in the example > > https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/DataAnimation/ > > > > The example uses an vtkSphereSource as an input for the programmable filter, > so the example has essentially the code > > > > VTK_CREATE(vtkSphereSource, sphere); > > VTK_CREATE(vtkProgrammableFilter, filter); > > filter->SetInputConnection(sphere->GetOutputPort()); > > filter->SetExecuteMethod(AdjustPoints2, filter); > > where the function "AdjustPoints2" updates some point position for the > sphere source. > > > > I try to figure out what kind of input can be given to the programmable > filter in the case of the VTU files. > > If would like to pass the reader itself to the programmable filer, so that > it could be updated for each file > > and I could make the proper update for the grid and the glyphs too. Then the > updating function for the > > programmable filter execution method looked like: > > > > void Update(void *filterPointer) > > { > > vtkSmartPointer filter = > static_cast(filterPointer); > > > > ... > > > > GetNewVTUFileName(particeName); > > particleReader->SetFileName( particleName.c_str() ); > > particleReader->Update(); > > > > vtkUnstructuredGrid *grid = particleReader->GetOutput(); > > vtkPointData *pointData = grid->GetPointData(); > > pointData->SetActiveScalars("Radii"); > > > > glyphFilter->SetInputData(grid); > > glyphFilter->Update(); > > > > sphere->SetRadius(1); > > sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); > > sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); > > > > particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); > > particleMapper->SetScalarModeToUsePointFieldData(); > > particleMapper->Update(); > > > > } > > > > I am not sure if this is feasible since I do not see how to pass the reader > itself to the programmable filter. > > Could anyone help me with this problem? > > > > Thank you, > > Zoltan > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- A non-text attachment was scrubbed... Name: DataAnimation.tar.gz Type: application/x-gzip Size: 3442 bytes Desc: not available URL: From kayarre at gmail.com Sun Apr 8 01:55:38 2018 From: kayarre at gmail.com (Kurt Sansom) Date: Sun, 08 Apr 2018 05:55:38 +0000 Subject: [vtkusers] Fluent hdf5 format Message-ID: First, I really don't like fluent, however I don't something better yet. Second, I found out I can export fluent .Cas and .Dat files in hdf5 format and I would like to read it into vtk/paraview. I also discovered xdmf as a nice path to do this, but as fluent is face based storage vs vtk being cell based, has anyone tried to describe this kind of conversion in the xdmf format? Or does someone have a ready made solution? I have found vtkfluentreader to be relatively slow and only work for matching .Cas and .Dat files, but I need to read many different .Dat files. I have used the ensight gold format in the past but it is restricted to single precision and gives me incorrect values when do post processing calculations. Kurt -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sun Apr 8 02:04:09 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 8 Apr 2018 16:04:09 +1000 Subject: [vtkusers] [vtk-developers] VTKBook Strawman - Chapter 3 In-Reply-To: <66336ca8-139a-4c56-ac70-eb6f9f228dd3@email.android.com> References: <66336ca8-139a-4c56-ac70-eb6f9f228dd3@email.android.com> Message-ID: Hi All, It looks like it is also possible to get a pdf version of the book. There is still a lot to sort out but here is a first attempt. I can take the markdown files that Bill is producing and use them which is great. Note that the hyperlinks (inside and outside the document) seem to work Ok. I haven't indexed anything yet and obviously the illustrations will need placing correctly. Still have to figure out how to get an image at top left of the chapter heading. So setting up the environment is ongoing. Regards Andrew On Sat, Apr 7, 2018 at 9:43 AM, Todd wrote: > That looks great. It's nice to see the formula variables formatted > properly in the text. I agree that LaTeX embedded in markdown is a good > choice! > > > On 7 Apr 2018 2:11 a.m., Bill Lorensen wrote: > > More progress.I found a great online tool to generate Latex formulas. > With no previous Latex experience,I was able to generate all of the > equations for Chapter 3. I can embed Latex in the markdown. The > equations are rendered by MathJax. > > Here is the online website: > http://www.hostmath.com/ > > and here is the updated Chapter 3: > > https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter3/ > > Bill > > On Fri, Apr 6, 2018 at 6:28 AM, David Cole via vtk-developers > wrote: > > "I ignore whether Markdown/reStrucuredText support for > > tools to have proper printed texts is likely to be improved." > > > > I have become a big fan of "print to pdf using the Chrome browser" to > > get a printed copy of web content these days. It's actually not a bad > > way to go if you don't need to refer to page numbers within the text. > > > > > > And now, this is just my opinion, so take with yet another grain of > salt: > > > > The available "writer pool" for LaTeX is far far smaller than that for > > markdown. If the math stuff must be in LaTeX, I'd very strongly prefer > > to see it as embedded chunks of LaTeX than have the whole thing be in > > LaTeX. > > > > > > Nice work, as usual Bill. > > > > > > Thanks, > > David C. > > > > > > > > On Fri, Apr 6, 2018 at 2:20 AM, Jon Haitz Legarreta > > wrote: > >> Bill, Andrew, simply brilliant. > >> > >> I've spot some parts in the Chapters 3 and 6 strawmans that were > >> already mentioned by you and Todd whose transition has some errors > >> (links that are missing, missing cross-reference links to VTK classes, > >> examples or bibliography, etc.). > >> > >> How can we contribute to fix them? Are you still working on the > >> transition tools to improve the output, or you want us to manually try > >> to fix them? > >> > >> I can help with/do all the Maths in LaTeX Bill. However, if the tool > >> you found works or the transition will be automatic, I do not see > >> where to help at this stage. Please, let me know. > >> > >> Otherwise, it's looking awesome. > >> > >> As for the LaTeX vs. Markdown/reStrucuredText discussion: > >> > >> I've contributed with some patches to the ITK SW Guide written in > >> LaTeX. I guess at the time it was written Markdown and reStrucuredText > >> were not available, so I think the choice was fair. > >> > >> Having said that, I admit that the learning curve for LaTeX may be > >> higher than that for Markdown or reStrucuredText. The latter are > >> tailored for web navigation, which is most people expect. And times > >> have changed. I ignore whether Markdown/reStrucuredText support for > >> tools to have proper printed texts is likely to be improved. > >> > >> I guess the ITK SW Guide requiring to be compiled (both the examples > >> to generate the figures and LaTeX itself) is not a downside, since VTK > >> Cxx examples used in this book need so. > >> > >> I guess having a first version for both cases (LaTeX and > >> Markdown/reStrucuredText) is somehow costly at the beginning. > >> Maintaining/sync'ing them once that is done every time there is a > >> change may not effortless also. But that may be the price to pay. > >> > >> The ITK SW Guide keeps being maintained. I ignore whether the ITK > >> folks at Kitware have considered to transition to Markdown or > >> reStrucuredText. > >> > >> JON HAITZ > >> > >> -- > >> > >> > >> On 6 April 2018 at 01:05, Todd via vtk-developers > >> wrote: > >>> Fantastic. I think Latex is definitely the way to go, although I'm no > expert > >>> in writing it. > >>> > >>> _______________________________________________ > >>> 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: > >>> https://vtk.org/mailman/listinfo/vtk-developers > >>> > >>> > >> _______________________________________________ > >> 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: > >> https://vtk.org/mailman/listinfo/vtk-developers > >> > > _______________________________________________ > > 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: > > https://vtk.org/mailman/listinfo/vtk-developers > > > > > > -- > Unpaid intern in BillsParadise at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VTKTextBook.pdf Type: application/pdf Size: 380878 bytes Desc: not available URL: From lorfalwit at gmail.com Mon Apr 9 02:29:42 2018 From: lorfalwit at gmail.com (lor fal) Date: Mon, 9 Apr 2018 14:29:42 +0800 Subject: [vtkusers] Render images in threads other than main thread In-Reply-To: References: Message-ID: Hi Todd, Thanks for your advice. The problem is that I want to render the image in real-time. The solution suggested in the link you posted is no other than a repeating timer. Is there some way in Vtk to control the update rate? On Mon, Apr 2, 2018 at 6:31 PM, Todd wrote: > Hi Hugh > > GUI elements are normally only updated on the main thread, so I suspect > you need to synchronize your callback from the worker thread. I'm not > familiar with Qt, but it seems to be documented. > http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3 > > Todd > > > On 2 Apr 2018 10:00 p.m., lor fal wrote: > > Hi all: > > I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I > trying to call vtkRenderWindowInteractor::Render in worker thread, it > always report error like "makeCurrent() error", which seems something wrong > while changing OpenGL context. I have googled my questions and found some > suggestions but none of them could work. > > Does anybody know exactly how to render images in worker thread? > > Thanks in advance. > > -- > Best regards, > Hugh Lo > > > -- Best regards, Hugh Lo -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Mon Apr 9 03:02:09 2018 From: nztoddler at yahoo.com (Todd Martin) Date: Mon, 9 Apr 2018 07:02:09 +0000 (UTC) Subject: [vtkusers] Render images in threads other than main thread In-Reply-To: References: Message-ID: <1678304062.400213.1523257330002@mail.yahoo.com> How often your worker thread calls back to the main thread is entirely dependent on what your thread is doing. I assume that would be each time it finishes another block of geometry for rendering. Anyway the key point is that the method to update the GUI must be synchronised with the main thread. Without some example code of what you're trying to do, it is impossible to make any further recommendations. Todd Martin, Ph.D. Freelance Engineer/Software Architect. On Monday, April 9, 2018, 6:29:44 PM GMT+12, lor fal wrote: Hi Todd,Thanks for your advice. The problem is that I want to render the image in real-time. The solution suggested in the link you posted is no other than a repeating timer. Is there some way in Vtk to control the update rate? On Mon, Apr 2, 2018 at 6:31 PM, Todd wrote: Hi Hugh GUI elements are normally only updated on the main thread, so I suspect you need to synchronize your callback from the worker thread. I'm not familiar with Qt, but it seems to be documented.?http://www.informit.com/ articles/article.aspx?p= 1405551&seqNum=3 Todd On 2 Apr 2018 10:00 p.m., lor fal wrote: Hi all: I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I trying to call vtkRenderWindowInteractor:: Render in worker thread, it always report error like "makeCurrent() error", which seems something wrong while changing OpenGL context. I have googled my questions and found some suggestions but none of them could work. Does anybody know exactly how to render images in worker thread? Thanks in advance. -- Best regards, Hugh Lo -- Best regards, Hugh Lo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Zoltan.Kovacs at esi-group.com Mon Apr 9 06:22:31 2018 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 9 Apr 2018 10:22:31 +0000 Subject: [vtkusers] Animation with VTU files. In-Reply-To: References: Message-ID: Hi Kenichiro, Thank you very much for your help! It seems to be what I need. Just one question: when I run your code I see the particles in the same position with increasing radii. Does it mean the radii are different in each VTU file whereas the particle positions are the same. Just to be sure that the particle coordinates were read in the file series correctly. Thanks, Zoltan -----Original Message----- From: kenichiro yoshimi Sent: Sonntag, 8. April 2018 06:56 To: Zoltan Kovacs Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Animation with VTU files. Hello Zoltan, Probably it is possible to retrieve the vtkXMLUnstructuredGridReader object from the object that sets the reader as input connection like something below: sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); sphereGlyph->SetInputConnection(reader->GetOutputPort()); // reversely access auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( sphereGlyph->GetInputConnection(0, 0)->GetProducer()); Here is ReverseAccess example from VTK examples https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ReverseAccess/ And I attach a simple code without programmable filter though I'm not sure if this is a correct usage.. Thanks 2018-04-07 0:50 GMT+09:00 Zoltan Kovacs : > Dear VTK Users, > > > > I have a question on animation with VTU file series. I wrote a code > which displays particels modeled with sphere > > glyphs, where the particle positions and radii are read from VTU files: > > > > VTK_CREATE(vtkXMLUnstructuredGridReader, particleReader); > > VTK_CREATE(vtkSphereSource, sphere); > > VTK_CREATE(vtkGlyph3D, sphereGlyph); > > VTK_CREATE(vtkVertexGlyphFilter, glyphFilter); > > VTK_CREATE(vtkPolyDataMapper, particleMapper); > > VTK_CREATE(vtkActor, particleActor); > > > > particleReader->SetFileName( particleName.c_str() ); > > particleReader->Update(); > > > > vtkUnstructuredGrid *grid = particleReader->GetOutput(); > > vtkPointData *pointData = grid->GetPointData(); > > pointData->SetActiveScalars("Radii"); > > > > glyphFilter->SetInputData(grid); > > glyphFilter->Update(); > > > > sphere->SetRadius(1); > > sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); > > sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); > > > > particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); > > particleMapper->SetScalarModeToUsePointFieldData(); > > particleMapper->Update(); > > particleActor->SetMapper(particleMapper); > > > > VTK_CREATE(vtkRenderer, renderer); > > VTK_CREATE(vtkRenderWindow, renderWindow); > > VTK_CREATE(vtkRenderWindowInteractor, renderWindowInteractor); > > > > renderWindow->AddRenderer(renderer); > > renderWindowInteractor->SetRenderWindow(renderWindow); > > > > renderer->AddActor(particleActor); > > renderer->SetBackground(.3, .6, .3); > > > > renderWindow->Render(); > > renderWindowInteractor->Start(); > > > > I would like to make an animation where the particle postions are updated. > Thus I would change the string particleName in the argument of the > function > particleReader->SetFileName() reading a new VTU file and update the > particleReader->whole > procedure with the unstructured grid / 3D glyph / glyp filter obejcts. > I try to use vktProgrammableFilter and vtkCallbackCommand to impelment > the animation process as I found in the example > > https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/DataAnimatio > n/ > > > > The example uses an vtkSphereSource as an input for the programmable > filter, so the example has essentially the code > > > > VTK_CREATE(vtkSphereSource, sphere); > > VTK_CREATE(vtkProgrammableFilter, filter); > > filter->SetInputConnection(sphere->GetOutputPort()); > > filter->SetExecuteMethod(AdjustPoints2, filter); > > where the function "AdjustPoints2" updates some point position for the > sphere source. > > > > I try to figure out what kind of input can be given to the > programmable filter in the case of the VTU files. > > If would like to pass the reader itself to the programmable filer, so > that it could be updated for each file > > and I could make the proper update for the grid and the glyphs too. > Then the updating function for the > > programmable filter execution method looked like: > > > > void Update(void *filterPointer) > > { > > vtkSmartPointer filter = > static_cast(filterPointer); > > > > ... > > > > GetNewVTUFileName(particeName); > > particleReader->SetFileName( particleName.c_str() ); > > particleReader->Update(); > > > > vtkUnstructuredGrid *grid = particleReader->GetOutput(); > > vtkPointData *pointData = grid->GetPointData(); > > pointData->SetActiveScalars("Radii"); > > > > glyphFilter->SetInputData(grid); > > glyphFilter->Update(); > > > > sphere->SetRadius(1); > > sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); > > sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); > > > > particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); > > particleMapper->SetScalarModeToUsePointFieldData(); > > particleMapper->Update(); > > > > } > > > > I am not sure if this is feasible since I do not see how to pass the > reader itself to the programmable filter. > > Could anyone help me with this problem? > > > > Thank you, > > Zoltan > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > From rccm.kyoshimi at gmail.com Mon Apr 9 07:38:02 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Mon, 9 Apr 2018 20:38:02 +0900 Subject: [vtkusers] Animation with VTU files. In-Reply-To: References: Message-ID: Hi Zoltan, I'm sorry my data is not special meaning. It was just used to confirm whether the data were read correctly. New attachment contains the particles which positions move a little at every time steps. Thanks, 2018-04-09 19:22 GMT+09:00 Zoltan Kovacs : > Hi Kenichiro, > > Thank you very much for your help! It seems to be what I need. Just one question: when I run your code I see the particles in the same position with increasing radii. Does it mean the radii are different in each VTU file whereas the particle positions are the same. Just to be sure that the particle coordinates were read in the file series correctly. > > Thanks, > Zoltan > > -----Original Message----- > From: kenichiro yoshimi > Sent: Sonntag, 8. April 2018 06:56 > To: Zoltan Kovacs > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Animation with VTU files. > > Hello Zoltan, > > Probably it is possible to retrieve the vtkXMLUnstructuredGridReader object from the object that sets the reader as input connection like something below: > > sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); > sphereGlyph->SetInputConnection(reader->GetOutputPort()); > > // reversely access > auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( > sphereGlyph->GetInputConnection(0, 0)->GetProducer()); > > Here is ReverseAccess example from VTK examples https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ReverseAccess/ > > And I attach a simple code without programmable filter though I'm not sure if this is a correct usage.. > > Thanks > > 2018-04-07 0:50 GMT+09:00 Zoltan Kovacs : >> Dear VTK Users, >> >> >> >> I have a question on animation with VTU file series. I wrote a code >> which displays particels modeled with sphere >> >> glyphs, where the particle positions and radii are read from VTU files: >> >> >> >> VTK_CREATE(vtkXMLUnstructuredGridReader, particleReader); >> >> VTK_CREATE(vtkSphereSource, sphere); >> >> VTK_CREATE(vtkGlyph3D, sphereGlyph); >> >> VTK_CREATE(vtkVertexGlyphFilter, glyphFilter); >> >> VTK_CREATE(vtkPolyDataMapper, particleMapper); >> >> VTK_CREATE(vtkActor, particleActor); >> >> >> >> particleReader->SetFileName( particleName.c_str() ); >> >> particleReader->Update(); >> >> >> >> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >> >> vtkPointData *pointData = grid->GetPointData(); >> >> pointData->SetActiveScalars("Radii"); >> >> >> >> glyphFilter->SetInputData(grid); >> >> glyphFilter->Update(); >> >> >> >> sphere->SetRadius(1); >> >> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >> >> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >> >> >> >> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >> >> particleMapper->SetScalarModeToUsePointFieldData(); >> >> particleMapper->Update(); >> >> particleActor->SetMapper(particleMapper); >> >> >> >> VTK_CREATE(vtkRenderer, renderer); >> >> VTK_CREATE(vtkRenderWindow, renderWindow); >> >> VTK_CREATE(vtkRenderWindowInteractor, renderWindowInteractor); >> >> >> >> renderWindow->AddRenderer(renderer); >> >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> >> >> renderer->AddActor(particleActor); >> >> renderer->SetBackground(.3, .6, .3); >> >> >> >> renderWindow->Render(); >> >> renderWindowInteractor->Start(); >> >> >> >> I would like to make an animation where the particle postions are updated. >> Thus I would change the string particleName in the argument of the >> function >> particleReader->SetFileName() reading a new VTU file and update the >> particleReader->whole >> procedure with the unstructured grid / 3D glyph / glyp filter obejcts. >> I try to use vktProgrammableFilter and vtkCallbackCommand to impelment >> the animation process as I found in the example >> >> https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/DataAnimatio >> n/ >> >> >> >> The example uses an vtkSphereSource as an input for the programmable >> filter, so the example has essentially the code >> >> >> >> VTK_CREATE(vtkSphereSource, sphere); >> >> VTK_CREATE(vtkProgrammableFilter, filter); >> >> filter->SetInputConnection(sphere->GetOutputPort()); >> >> filter->SetExecuteMethod(AdjustPoints2, filter); >> >> where the function "AdjustPoints2" updates some point position for the >> sphere source. >> >> >> >> I try to figure out what kind of input can be given to the >> programmable filter in the case of the VTU files. >> >> If would like to pass the reader itself to the programmable filer, so >> that it could be updated for each file >> >> and I could make the proper update for the grid and the glyphs too. >> Then the updating function for the >> >> programmable filter execution method looked like: >> >> >> >> void Update(void *filterPointer) >> >> { >> >> vtkSmartPointer filter = >> static_cast(filterPointer); >> >> >> >> ... >> >> >> >> GetNewVTUFileName(particeName); >> >> particleReader->SetFileName( particleName.c_str() ); >> >> particleReader->Update(); >> >> >> >> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >> >> vtkPointData *pointData = grid->GetPointData(); >> >> pointData->SetActiveScalars("Radii"); >> >> >> >> glyphFilter->SetInputData(grid); >> >> glyphFilter->Update(); >> >> >> >> sphere->SetRadius(1); >> >> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >> >> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >> >> >> >> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >> >> particleMapper->SetScalarModeToUsePointFieldData(); >> >> particleMapper->Update(); >> >> >> >> } >> >> >> >> I am not sure if this is feasible since I do not see how to pass the >> reader itself to the programmable filter. >> >> Could anyone help me with this problem? >> >> >> >> Thank you, >> >> Zoltan >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> -------------- next part -------------- A non-text attachment was scrubbed... Name: particles.tar.gz Type: application/x-gzip Size: 1674 bytes Desc: not available URL: From Zoltan.Kovacs at esi-group.com Mon Apr 9 10:33:52 2018 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 9 Apr 2018 14:33:52 +0000 Subject: [vtkusers] Animation with VTU files. In-Reply-To: References: Message-ID: Hi Kenichiro, Yes , it works indeed. Thank you very much. However, when I use your code with my data series I can see only the content of the first file. After the first update the screen remains empty till the end of the series. I tried to figure out why I get this behavior but the only difference in our VTU files are the number and position of the particles and the presence of more point data fields besides the radii data. If you do not mind I attached my files since I am curious how it works with your executable Thanks a lot, Zoltan -----Original Message----- From: kenichiro yoshimi Sent: Montag, 9. April 2018 13:38 To: Zoltan Kovacs Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Animation with VTU files. Hi Zoltan, I'm sorry my data is not special meaning. It was just used to confirm whether the data were read correctly. New attachment contains the particles which positions move a little at every time steps. Thanks, 2018-04-09 19:22 GMT+09:00 Zoltan Kovacs : > Hi Kenichiro, > > Thank you very much for your help! It seems to be what I need. Just one question: when I run your code I see the particles in the same position with increasing radii. Does it mean the radii are different in each VTU file whereas the particle positions are the same. Just to be sure that the particle coordinates were read in the file series correctly. > > Thanks, > Zoltan > > -----Original Message----- > From: kenichiro yoshimi > Sent: Sonntag, 8. April 2018 06:56 > To: Zoltan Kovacs > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Animation with VTU files. > > Hello Zoltan, > > Probably it is possible to retrieve the vtkXMLUnstructuredGridReader object from the object that sets the reader as input connection like something below: > > sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); > sphereGlyph->SetInputConnection(reader->GetOutputPort()); > > // reversely access > auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( > sphereGlyph->GetInputConnection(0, 0)->GetProducer()); > > Here is ReverseAccess example from VTK examples > https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ReverseA > ccess/ > > And I attach a simple code without programmable filter though I'm not sure if this is a correct usage.. > > Thanks > > 2018-04-07 0:50 GMT+09:00 Zoltan Kovacs : >> Dear VTK Users, >> >> >> >> I have a question on animation with VTU file series. I wrote a code >> which displays particels modeled with sphere >> >> glyphs, where the particle positions and radii are read from VTU files: >> >> >> >> VTK_CREATE(vtkXMLUnstructuredGridReader, particleReader); >> >> VTK_CREATE(vtkSphereSource, sphere); >> >> VTK_CREATE(vtkGlyph3D, sphereGlyph); >> >> VTK_CREATE(vtkVertexGlyphFilter, glyphFilter); >> >> VTK_CREATE(vtkPolyDataMapper, particleMapper); >> >> VTK_CREATE(vtkActor, particleActor); >> >> >> >> particleReader->SetFileName( particleName.c_str() ); >> >> particleReader->Update(); >> >> >> >> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >> >> vtkPointData *pointData = grid->GetPointData(); >> >> pointData->SetActiveScalars("Radii"); >> >> >> >> glyphFilter->SetInputData(grid); >> >> glyphFilter->Update(); >> >> >> >> sphere->SetRadius(1); >> >> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >> >> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >> >> >> >> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >> >> particleMapper->SetScalarModeToUsePointFieldData(); >> >> particleMapper->Update(); >> >> particleActor->SetMapper(particleMapper); >> >> >> >> VTK_CREATE(vtkRenderer, renderer); >> >> VTK_CREATE(vtkRenderWindow, renderWindow); >> >> VTK_CREATE(vtkRenderWindowInteractor, renderWindowInteractor); >> >> >> >> renderWindow->AddRenderer(renderer); >> >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> >> >> renderer->AddActor(particleActor); >> >> renderer->SetBackground(.3, .6, .3); >> >> >> >> renderWindow->Render(); >> >> renderWindowInteractor->Start(); >> >> >> >> I would like to make an animation where the particle postions are updated. >> Thus I would change the string particleName in the argument of the >> function >> particleReader->SetFileName() reading a new VTU file and update the >> particleReader->whole >> procedure with the unstructured grid / 3D glyph / glyp filter obejcts. >> I try to use vktProgrammableFilter and vtkCallbackCommand to >> impelment the animation process as I found in the example >> >> https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/DataAnimati >> o >> n/ >> >> >> >> The example uses an vtkSphereSource as an input for the programmable >> filter, so the example has essentially the code >> >> >> >> VTK_CREATE(vtkSphereSource, sphere); >> >> VTK_CREATE(vtkProgrammableFilter, filter); >> >> filter->SetInputConnection(sphere->GetOutputPort()); >> >> filter->SetExecuteMethod(AdjustPoints2, filter); >> >> where the function "AdjustPoints2" updates some point position for >> the sphere source. >> >> >> >> I try to figure out what kind of input can be given to the >> programmable filter in the case of the VTU files. >> >> If would like to pass the reader itself to the programmable filer, so >> that it could be updated for each file >> >> and I could make the proper update for the grid and the glyphs too. >> Then the updating function for the >> >> programmable filter execution method looked like: >> >> >> >> void Update(void *filterPointer) >> >> { >> >> vtkSmartPointer filter = >> static_cast(filterPointer); >> >> >> >> ... >> >> >> >> GetNewVTUFileName(particeName); >> >> particleReader->SetFileName( particleName.c_str() ); >> >> particleReader->Update(); >> >> >> >> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >> >> vtkPointData *pointData = grid->GetPointData(); >> >> pointData->SetActiveScalars("Radii"); >> >> >> >> glyphFilter->SetInputData(grid); >> >> glyphFilter->Update(); >> >> >> >> sphere->SetRadius(1); >> >> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >> >> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >> >> >> >> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >> >> particleMapper->SetScalarModeToUsePointFieldData(); >> >> particleMapper->Update(); >> >> >> >> } >> >> >> >> I am not sure if this is feasible since I do not see how to pass the >> reader itself to the programmable filter. >> >> Could anyone help me with this problem? >> >> >> >> Thank you, >> >> Zoltan >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> -------------- next part -------------- A non-text attachment was scrubbed... Name: particles.tar.gz Type: application/x-gzip Size: 638878 bytes Desc: particles.tar.gz URL: From bill.lorensen at gmail.com Mon Apr 9 13:05:16 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 9 Apr 2018 10:05:16 -0700 Subject: [vtkusers] VTKBook Strawman - Chapter 6 Message-ID: Folks, Chapter 6 is progressing well. I'm refining the conversion workflow. All equations have been latex'ed using the online editor: http://www.hostmath.com/ Equations in figures are converted to png using the online tool: http://latex2png.com/ I compose the hand-drawn figures using OpenOffice Impress. It has a Math editor when I need to insert some math symbols in a figure. I'm starting to populate the hand-drawn figures. Take a look here: https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter6/ Feedback always welcome. Bill BTW: Until this effort, I had never written one-line of Latex. The online editor did all of the work for me. From lasso at queensu.ca Mon Apr 9 18:29:16 2018 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 9 Apr 2018 22:29:16 +0000 Subject: [vtkusers] Render images in threads other than main thread In-Reply-To: References: Message-ID: You can perform all processing in worker threads in the background. Only rendering must happen in the main thread. Rendering of images is usually quite fast - well below 10ms on an average desktop computer, so it should not be the bottleneck. Also note that for real-time 2D image processing pipelines, enabling multithreading may make update rate much slower, especially when it interferes with the graphics driver?s threaded optimization. Potential solutions: force single-threading by setting global maximum number of threads to 1, use TBB as SMP backend, or fix the recently found bug in multithreader (https://gitlab.kitware.com/vtk/vtk/issues/17279). Andras From: vtkusers On Behalf Of lor fal Sent: Monday, April 9, 2018 2:30 AM To: Todd Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Render images in threads other than main thread Hi Todd, Thanks for your advice. The problem is that I want to render the image in real-time. The solution suggested in the link you posted is no other than a repeating timer. Is there some way in Vtk to control the update rate? On Mon, Apr 2, 2018 at 6:31 PM, Todd > wrote: Hi Hugh GUI elements are normally only updated on the main thread, so I suspect you need to synchronize your callback from the worker thread. I'm not familiar with Qt, but it seems to be documented. http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3 Todd On 2 Apr 2018 10:00 p.m., lor fal > wrote: Hi all: I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I trying to call vtkRenderWindowInteractor::Render in worker thread, it always report error like "makeCurrent() error", which seems something wrong while changing OpenGL context. I have googled my questions and found some suggestions but none of them could work. Does anybody know exactly how to render images in worker thread? Thanks in advance. -- Best regards, Hugh Lo -- Best regards, Hugh Lo -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Mon Apr 9 20:12:39 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 10 Apr 2018 09:12:39 +0900 Subject: [vtkusers] Animation with VTU files. In-Reply-To: References: Message-ID: Hi Zoltan, I carelessly forgot to call SetActiveScalars() in TimerCallbackFunction of my code. --- // re-read all the data from the file auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( glyph3D->GetInputConnection(0, 0)->GetProducer()); reader->SetFileName(filename.c_str()); reader->Update(); reader->GetOutput()->GetPointData()->SetActiveScalars("Radii"); --- When I am doing it this way, my executable works with your data series. Regards, 2018-04-09 23:33 GMT+09:00 Zoltan Kovacs : > Hi Kenichiro, > > Yes , it works indeed. Thank you very much. However, when I use your code with my data series I can see only the content of the first file. After the first update the screen remains empty till the end of the series. I tried to figure out why I get this behavior but the only difference in our VTU files are the number and position of the particles and the presence of more point data fields besides the radii data. If you do not mind I attached my files since I am curious how it works with your executable > > > Thanks a lot, > Zoltan > > > -----Original Message----- > From: kenichiro yoshimi > Sent: Montag, 9. April 2018 13:38 > To: Zoltan Kovacs > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Animation with VTU files. > > Hi Zoltan, > > I'm sorry my data is not special meaning. It was just used to confirm whether the data were read correctly. > New attachment contains the particles which positions move a little at every time steps. > > Thanks, > > 2018-04-09 19:22 GMT+09:00 Zoltan Kovacs : >> Hi Kenichiro, >> >> Thank you very much for your help! It seems to be what I need. Just one question: when I run your code I see the particles in the same position with increasing radii. Does it mean the radii are different in each VTU file whereas the particle positions are the same. Just to be sure that the particle coordinates were read in the file series correctly. >> >> Thanks, >> Zoltan >> >> -----Original Message----- >> From: kenichiro yoshimi >> Sent: Sonntag, 8. April 2018 06:56 >> To: Zoltan Kovacs >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] Animation with VTU files. >> >> Hello Zoltan, >> >> Probably it is possible to retrieve the vtkXMLUnstructuredGridReader object from the object that sets the reader as input connection like something below: >> >> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >> sphereGlyph->SetInputConnection(reader->GetOutputPort()); >> >> // reversely access >> auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( >> sphereGlyph->GetInputConnection(0, 0)->GetProducer()); >> >> Here is ReverseAccess example from VTK examples >> https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ReverseA >> ccess/ >> >> And I attach a simple code without programmable filter though I'm not sure if this is a correct usage.. >> >> Thanks >> >> 2018-04-07 0:50 GMT+09:00 Zoltan Kovacs : >>> Dear VTK Users, >>> >>> >>> >>> I have a question on animation with VTU file series. I wrote a code >>> which displays particels modeled with sphere >>> >>> glyphs, where the particle positions and radii are read from VTU files: >>> >>> >>> >>> VTK_CREATE(vtkXMLUnstructuredGridReader, particleReader); >>> >>> VTK_CREATE(vtkSphereSource, sphere); >>> >>> VTK_CREATE(vtkGlyph3D, sphereGlyph); >>> >>> VTK_CREATE(vtkVertexGlyphFilter, glyphFilter); >>> >>> VTK_CREATE(vtkPolyDataMapper, particleMapper); >>> >>> VTK_CREATE(vtkActor, particleActor); >>> >>> >>> >>> particleReader->SetFileName( particleName.c_str() ); >>> >>> particleReader->Update(); >>> >>> >>> >>> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >>> >>> vtkPointData *pointData = grid->GetPointData(); >>> >>> pointData->SetActiveScalars("Radii"); >>> >>> >>> >>> glyphFilter->SetInputData(grid); >>> >>> glyphFilter->Update(); >>> >>> >>> >>> sphere->SetRadius(1); >>> >>> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >>> >>> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >>> >>> >>> >>> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >>> >>> particleMapper->SetScalarModeToUsePointFieldData(); >>> >>> particleMapper->Update(); >>> >>> particleActor->SetMapper(particleMapper); >>> >>> >>> >>> VTK_CREATE(vtkRenderer, renderer); >>> >>> VTK_CREATE(vtkRenderWindow, renderWindow); >>> >>> VTK_CREATE(vtkRenderWindowInteractor, renderWindowInteractor); >>> >>> >>> >>> renderWindow->AddRenderer(renderer); >>> >>> renderWindowInteractor->SetRenderWindow(renderWindow); >>> >>> >>> >>> renderer->AddActor(particleActor); >>> >>> renderer->SetBackground(.3, .6, .3); >>> >>> >>> >>> renderWindow->Render(); >>> >>> renderWindowInteractor->Start(); >>> >>> >>> >>> I would like to make an animation where the particle postions are updated. >>> Thus I would change the string particleName in the argument of the >>> function >>> particleReader->SetFileName() reading a new VTU file and update the >>> particleReader->whole >>> procedure with the unstructured grid / 3D glyph / glyp filter obejcts. >>> I try to use vktProgrammableFilter and vtkCallbackCommand to >>> impelment the animation process as I found in the example >>> >>> https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/DataAnimati >>> o >>> n/ >>> >>> >>> >>> The example uses an vtkSphereSource as an input for the programmable >>> filter, so the example has essentially the code >>> >>> >>> >>> VTK_CREATE(vtkSphereSource, sphere); >>> >>> VTK_CREATE(vtkProgrammableFilter, filter); >>> >>> filter->SetInputConnection(sphere->GetOutputPort()); >>> >>> filter->SetExecuteMethod(AdjustPoints2, filter); >>> >>> where the function "AdjustPoints2" updates some point position for >>> the sphere source. >>> >>> >>> >>> I try to figure out what kind of input can be given to the >>> programmable filter in the case of the VTU files. >>> >>> If would like to pass the reader itself to the programmable filer, so >>> that it could be updated for each file >>> >>> and I could make the proper update for the grid and the glyphs too. >>> Then the updating function for the >>> >>> programmable filter execution method looked like: >>> >>> >>> >>> void Update(void *filterPointer) >>> >>> { >>> >>> vtkSmartPointer filter = >>> static_cast(filterPointer); >>> >>> >>> >>> ... >>> >>> >>> >>> GetNewVTUFileName(particeName); >>> >>> particleReader->SetFileName( particleName.c_str() ); >>> >>> particleReader->Update(); >>> >>> >>> >>> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >>> >>> vtkPointData *pointData = grid->GetPointData(); >>> >>> pointData->SetActiveScalars("Radii"); >>> >>> >>> >>> glyphFilter->SetInputData(grid); >>> >>> glyphFilter->Update(); >>> >>> >>> >>> sphere->SetRadius(1); >>> >>> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >>> >>> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >>> >>> >>> >>> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >>> >>> particleMapper->SetScalarModeToUsePointFieldData(); >>> >>> particleMapper->Update(); >>> >>> >>> >>> } >>> >>> >>> >>> I am not sure if this is feasible since I do not see how to pass the >>> reader itself to the programmable filter. >>> >>> Could anyone help me with this problem? >>> >>> >>> >>> Thank you, >>> >>> Zoltan >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> From Jesse.Kinross-Smith at bentley.com Mon Apr 9 22:05:02 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Tue, 10 Apr 2018 02:05:02 +0000 Subject: [vtkusers] Infinite sea plane - what's the best way? Message-ID: So I need to create an infinite textured plane to represent the sea. vtkPlaneSource seems like the right object, but I can't seem to get any of the examples to display anything. A colleague tried a while back also but said he could only get it to work with OpenGL not OpenGL2. Anyone able to offer any ideas? I've got a rectilinear grid working, but it's not ideal, really need an infinite textured plane. Using VTK 8.1.0, C++ void CModelView::vtkRenderImageToPlane(const CString& inputFilename, float x, float y, float z) { USES_CONVERSION; std::string filename = W2A(inputFilename); // Read the image which will be the texture, Image_Type imageType = GetImageType(inputFilename); vtkAlgorithmOutput* ImageOutput = NULL; vtkSmartPointer pNGReader = NULL; vtkSmartPointer jPEGReader = NULL; vtkSmartPointer bMPReader = NULL; switch (imageType) { case Image_Type::PNG: { pNGReader = vtkSmartPointer::New(); pNGReader->SetFileName(filename.c_str()); pNGReader->Update(); ImageOutput = pNGReader->GetOutputPort(); } break; case Image_Type::JPG: { jPEGReader = vtkSmartPointer::New(); jPEGReader->SetFileName(filename.c_str()); jPEGReader->Update(); ImageOutput = jPEGReader->GetOutputPort(); } break; case Image_Type::BMP: { bMPReader = vtkSmartPointer::New(); bMPReader->SetFileName(filename.c_str()); bMPReader->Update(); ImageOutput = bMPReader->GetOutputPort(); } break; } if (ImageOutput == NULL || (pNGReader == NULL && jPEGReader == NULL && bMPReader == NULL)) return; // Create a plane vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetNormal(0.0, 0.0, 1.0); plane->SetCenter(0, 0, 0); //plane->SetResolution(100, 100); //plane->SetPoint1(100000, -100000, 0); //plane->SetPoint2(-100000, 100000, 0); // Apply the texture vtkSmartPointer texture = vtkSmartPointer::New(); texture->SetInputConnection(ImageOutput); texture->InterpolateOn(); texture->RepeatOn(); vtkSmartPointer texturePlane = vtkSmartPointer::New(); texturePlane->SetInputConnection(plane->GetOutputPort()); vtkSmartPointer planeMapper = vtkSmartPointer::New(); planeMapper->SetInputConnection(texturePlane->GetOutputPort()); vtkSmartPointer texturedPlane = vtkSmartPointer::New(); texturedPlane->SetMapper(planeMapper); texturedPlane->SetTexture(texture); texturedPlane->GetProperty()->SetOpacity(0.7); texturedPlane->SetPickable(FALSE); // Visualize the textured plane m_vtkRenderer->AddActor(texturedPlane); } -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Mon Apr 9 23:31:10 2018 From: nztoddler at yahoo.com (Todd Martin) Date: Tue, 10 Apr 2018 03:31:10 +0000 (UTC) Subject: [vtkusers] Infinite sea plane - what's the best way? In-Reply-To: References: Message-ID: <1620146120.713302.1523331070432@mail.yahoo.com> Did you get the plan rendering without a texture first? Todd Martin, Ph.D. Freelance Engineer/Software Architect. On Tuesday, April 10, 2018, 2:05:15 PM GMT+12, Jesse Kinross-Smith wrote: So I need to create an infinite textured plane to represent the sea. vtkPlaneSource seems like the right object, but I can?t seem to get any of the examples to display anything. A colleague tried a while back also but said he could only get it to work with OpenGL not OpenGL2. Anyone able to offer any ideas? I?ve got a rectilinear grid working, but it?s not ideal, really need an infinite textured plane. ? Using VTK 8.1.0, C++ ? voidCModelView::vtkRenderImageToPlane(constCString&inputFilename,floatx,floaty,floatz) { ??????USES_CONVERSION; ?????? std::string filename = W2A(inputFilename); ? ??????// Read the image which will be the texture, ??????Image_Type imageType = GetImageType(inputFilename); ??????vtkAlgorithmOutput* ImageOutput =NULL; ??????vtkSmartPointer pNGReader = NULL; ??????vtkSmartPointer jPEGReader = NULL; ??????vtkSmartPointer bMPReader = NULL; ??????switch (imageType) ?????? { ?????????????caseImage_Type::PNG: ????????????? { ????????????????????? pNGReader=vtkSmartPointer::New(); ????????????????????? pNGReader->SetFileName(filename.c_str()); ????????????????????? pNGReader->Update(); ????????????????????? ImageOutput = pNGReader->GetOutputPort(); ????????????? } ?????????????break; ?????????????caseImage_Type::JPG: ????????????? { ????????????????????? jPEGReader=vtkSmartPointer::New(); ????????????????????? jPEGReader->SetFileName(filename.c_str()); ????????????????????? jPEGReader->Update(); ????????????????????? ImageOutput = jPEGReader->GetOutputPort(); ????????????? } ?????????????break; ?????????????caseImage_Type::BMP: ????????????? { ????????????????????? bMPReader=vtkSmartPointer::New(); ????????????????????? bMPReader->SetFileName(filename.c_str()); ????????????????????? bMPReader->Update(); ????????????????????? ImageOutput = bMPReader->GetOutputPort(); ????????????? } ?????????????break; ?????? } ??????if (ImageOutput ==NULL || (pNGReader==NULL && jPEGReader==NULL && bMPReader==NULL)) ?????????????return; ? ??????// Create a plane ??????vtkSmartPointer plane = vtkSmartPointer::New(); ?????? plane->SetNormal(0.0, 0.0, 1.0); ?????? plane->SetCenter(0, 0, 0); ??????//plane->SetResolution(100, 100); ??????//plane->SetPoint1(100000, -100000, 0); ??????//plane->SetPoint2(-100000, 100000, 0); ?????? ??????// Apply the texture ??????vtkSmartPointer texture = vtkSmartPointer::New(); ?????? texture->SetInputConnection(ImageOutput); ?????? texture->InterpolateOn(); ?????? texture->RepeatOn(); ? ??????vtkSmartPointer texturePlane = vtkSmartPointer::New(); ?????? texturePlane->SetInputConnection(plane->GetOutputPort()); ? ??????vtkSmartPointer planeMapper = vtkSmartPointer::New(); ?????? planeMapper->SetInputConnection(texturePlane->GetOutputPort()); ? ??????vtkSmartPointer texturedPlane = vtkSmartPointer::New(); ?????? texturedPlane->SetMapper(planeMapper); ?????? texturedPlane->SetTexture(texture); ?????? texturedPlane->GetProperty()->SetOpacity(0.7); ?????? texturedPlane->SetPickable(FALSE); ? ??????// Visualize the textured plane ?????? m_vtkRenderer->AddActor(texturedPlane); ? } ? -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle ? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From gohlinchia at gmail.com Tue Apr 10 02:01:50 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Mon, 9 Apr 2018 23:01:50 -0700 (MST) Subject: [vtkusers] Stereo problem for ray cast volumes In-Reply-To: References: <1519115410418-0.post@n5.nabble.com> <1519141266885-0.post@n5.nabble.com> Message-ID: <1523340110114-0.post@n5.nabble.com> Hi Aashish, I was wondering what is the status of this issue? So far, we have verified that the GPU ray cast volume rendering in 8.1.0 (and 7.1.1) is wrongly rendered in stereo. The two viewpoints generated are the same except that they are slightly offset to give the illusion of stereoscopic rendering. This same problem also appears in ParaView 5.4.1. Thanks. ----- Chris -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Zoltan.Kovacs at esi-group.com Tue Apr 10 04:17:42 2018 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Tue, 10 Apr 2018 08:17:42 +0000 Subject: [vtkusers] Animation with VTU files. In-Reply-To: References: Message-ID: Hi Kenichiro, Yes, you are right. It worked with your data since its point data has only one field and the active scalar could be set for it as a default value. My data series has more fields in point data and it was ambiguous which field is to set to the active scalar by default. Now it works with both the series. Thank you very much again! Regards, Zoltan -----Original Message----- From: kenichiro yoshimi Sent: Dienstag, 10. April 2018 02:13 To: Zoltan Kovacs Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Animation with VTU files. Hi Zoltan, I carelessly forgot to call SetActiveScalars() in TimerCallbackFunction of my code. --- // re-read all the data from the file auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( glyph3D->GetInputConnection(0, 0)->GetProducer()); reader->SetFileName(filename.c_str()); reader->Update(); reader->GetOutput()->GetPointData()->SetActiveScalars("Radii"); --- When I am doing it this way, my executable works with your data series. Regards, 2018-04-09 23:33 GMT+09:00 Zoltan Kovacs : > Hi Kenichiro, > > Yes , it works indeed. Thank you very much. However, when I use your > code with my data series I can see only the content of the first file. > After the first update the screen remains empty till the end of the > series. I tried to figure out why I get this behavior but the only > difference in our VTU files are the number and position of the > particles and the presence of more point data fields besides the radii > data. If you do not mind I attached my files since I am curious how it > works with your executable > > > Thanks a lot, > Zoltan > > > -----Original Message----- > From: kenichiro yoshimi > Sent: Montag, 9. April 2018 13:38 > To: Zoltan Kovacs > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Animation with VTU files. > > Hi Zoltan, > > I'm sorry my data is not special meaning. It was just used to confirm whether the data were read correctly. > New attachment contains the particles which positions move a little at every time steps. > > Thanks, > > 2018-04-09 19:22 GMT+09:00 Zoltan Kovacs : >> Hi Kenichiro, >> >> Thank you very much for your help! It seems to be what I need. Just one question: when I run your code I see the particles in the same position with increasing radii. Does it mean the radii are different in each VTU file whereas the particle positions are the same. Just to be sure that the particle coordinates were read in the file series correctly. >> >> Thanks, >> Zoltan >> >> -----Original Message----- >> From: kenichiro yoshimi >> Sent: Sonntag, 8. April 2018 06:56 >> To: Zoltan Kovacs >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] Animation with VTU files. >> >> Hello Zoltan, >> >> Probably it is possible to retrieve the vtkXMLUnstructuredGridReader object from the object that sets the reader as input connection like something below: >> >> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >> sphereGlyph->SetInputConnection(reader->GetOutputPort()); >> >> // reversely access >> auto reader = vtkXMLUnstructuredGridReader::SafeDownCast( >> sphereGlyph->GetInputConnection(0, 0)->GetProducer()); >> >> Here is ReverseAccess example from VTK examples >> https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Reverse >> A >> ccess/ >> >> And I attach a simple code without programmable filter though I'm not sure if this is a correct usage.. >> >> Thanks >> >> 2018-04-07 0:50 GMT+09:00 Zoltan Kovacs : >>> Dear VTK Users, >>> >>> >>> >>> I have a question on animation with VTU file series. I wrote a code >>> which displays particels modeled with sphere >>> >>> glyphs, where the particle positions and radii are read from VTU files: >>> >>> >>> >>> VTK_CREATE(vtkXMLUnstructuredGridReader, particleReader); >>> >>> VTK_CREATE(vtkSphereSource, sphere); >>> >>> VTK_CREATE(vtkGlyph3D, sphereGlyph); >>> >>> VTK_CREATE(vtkVertexGlyphFilter, glyphFilter); >>> >>> VTK_CREATE(vtkPolyDataMapper, particleMapper); >>> >>> VTK_CREATE(vtkActor, particleActor); >>> >>> >>> >>> particleReader->SetFileName( particleName.c_str() ); >>> >>> particleReader->Update(); >>> >>> >>> >>> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >>> >>> vtkPointData *pointData = grid->GetPointData(); >>> >>> pointData->SetActiveScalars("Radii"); >>> >>> >>> >>> glyphFilter->SetInputData(grid); >>> >>> glyphFilter->Update(); >>> >>> >>> >>> sphere->SetRadius(1); >>> >>> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >>> >>> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >>> >>> >>> >>> >>> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >>> >>> particleMapper->SetScalarModeToUsePointFieldData(); >>> >>> particleMapper->Update(); >>> >>> particleActor->SetMapper(particleMapper); >>> >>> >>> >>> VTK_CREATE(vtkRenderer, renderer); >>> >>> VTK_CREATE(vtkRenderWindow, renderWindow); >>> >>> VTK_CREATE(vtkRenderWindowInteractor, renderWindowInteractor); >>> >>> >>> >>> renderWindow->AddRenderer(renderer); >>> >>> renderWindowInteractor->SetRenderWindow(renderWindow); >>> >>> >>> >>> renderer->AddActor(particleActor); >>> >>> renderer->SetBackground(.3, .6, .3); >>> >>> >>> >>> renderWindow->Render(); >>> >>> renderWindowInteractor->Start(); >>> >>> >>> >>> I would like to make an animation where the particle postions are updated. >>> Thus I would change the string particleName in the argument of the >>> function >>> particleReader->SetFileName() reading a new VTU file and update the >>> particleReader->whole >>> procedure with the unstructured grid / 3D glyph / glyp filter obejcts. >>> I try to use vktProgrammableFilter and vtkCallbackCommand to >>> impelment the animation process as I found in the example >>> >>> https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/DataAnimat >>> i >>> o >>> n/ >>> >>> >>> >>> The example uses an vtkSphereSource as an input for the programmable >>> filter, so the example has essentially the code >>> >>> >>> >>> VTK_CREATE(vtkSphereSource, sphere); >>> >>> VTK_CREATE(vtkProgrammableFilter, filter); >>> >>> filter->SetInputConnection(sphere->GetOutputPort()); >>> >>> filter->SetExecuteMethod(AdjustPoints2, filter); >>> >>> where the function "AdjustPoints2" updates some point position for >>> the sphere source. >>> >>> >>> >>> I try to figure out what kind of input can be given to the >>> programmable filter in the case of the VTU files. >>> >>> If would like to pass the reader itself to the programmable filer, >>> so that it could be updated for each file >>> >>> and I could make the proper update for the grid and the glyphs too. >>> Then the updating function for the >>> >>> programmable filter execution method looked like: >>> >>> >>> >>> void Update(void *filterPointer) >>> >>> { >>> >>> vtkSmartPointer filter = >>> static_cast(filterPointer); >>> >>> >>> >>> ... >>> >>> >>> >>> GetNewVTUFileName(particeName); >>> >>> particleReader->SetFileName( particleName.c_str() ); >>> >>> particleReader->Update(); >>> >>> >>> >>> vtkUnstructuredGrid *grid = particleReader->GetOutput(); >>> >>> vtkPointData *pointData = grid->GetPointData(); >>> >>> pointData->SetActiveScalars("Radii"); >>> >>> >>> >>> glyphFilter->SetInputData(grid); >>> >>> glyphFilter->Update(); >>> >>> >>> >>> sphere->SetRadius(1); >>> >>> sphereGlyph->SetSourceConnection(sphere->GetOutputPort()); >>> >>> sphereGlyph->SetInputConnection(glyphFilter->GetOutputPort()); >>> >>> >>> >>> >>> particleMapper->SetInputConnection(sphereGlyph->GetOutputPort()); >>> >>> particleMapper->SetScalarModeToUsePointFieldData(); >>> >>> particleMapper->Update(); >>> >>> >>> >>> } >>> >>> >>> >>> I am not sure if this is feasible since I do not see how to pass the >>> reader itself to the programmable filter. >>> >>> Could anyone help me with this problem? >>> >>> >>> >>> Thank you, >>> >>> Zoltan >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> From ken.martin at kitware.com Tue Apr 10 11:41:31 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 10 Apr 2018 11:41:31 -0400 Subject: [vtkusers] Rendering a Window on Screen with vtkOpenVRRenderWindow In-Reply-To: <11f5849d.33af.161df6b03ef.Coremail.lmkkpvtk@163.com> References: <11f5849d.33af.161df6b03ef.Coremail.lmkkpvtk@163.com> Message-ID: If you need it embedded into a Qt app you can do it the same basic way the OpenVR plugin in paraview does it. I think it relies on you having a vtk/qt window in your app (already up and displayed) and then using that as the HelperWindow. SOme snippets of code (and a lot you don;t need) can be found here https://gitlab.kitware.com/paraview/paraview/blob/master/Plugins/OpenVR/vtkPVOpenVRHelper.cxx#L591 On Wed, Feb 28, 2018 at 9:36 PM, lmkkp wrote: > How can I render a window on screen with vtkOpenVRRenderWindow? > The relevant code in VTK8.1 is following: > this->HelperWindow->SetDisplayId(this->GetGenericDisplayId()); > this->HelperWindow->SetOffScreenRendering(1);//I tried to comment > out this line, > //then a > black window appeared on the screen. > //This > window did not do any rendering. > this->HelperWindow->Initialize(); > The relevant code using sdl in VTK8.0 is following: > this->WindowId = SDL_CreateWindow( this->WindowName, > this->Position[0], this->Position[1], > this->Size[0] / 2, this->Size[1] / 2, > unWindowFlags ); > I want the 8.1 version to be the same as the 8.0 version on the desktop to > display the rendering window and embedded into the qt main window. > Ps: I can not embed the 8.0 version's sdl window into qt window because > some strange errors. > Thanks very much. > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 ken.martin at kitware.com Tue Apr 10 11:45:48 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 10 Apr 2018 11:45:48 -0400 Subject: [vtkusers] vtkOpenGLPolyDataMapper, custom shaders and line width property In-Reply-To: <1519229334258.90782@Dkfz-Heidelberg.de> References: <1519229334258.90782@Dkfz-Heidelberg.de> Message-ID: Wide lines on some systems require a geometry shader. Maybe that is causing the issue. VTK uses some shader name replacements to handle that there may, or may not be a geometry shader in the mix which is how it handles wide lines. Maybe take a look at the default shaders (vert,frag,geom) for both the normal and wide line case in a running VTK and work from there. On Wed, Feb 21, 2018 at 11:08 AM, Neher, Peter wrote: > Hi everyone, > > > I am trying to render a polydata in a QVTKOpenGLWidget with thick lines > (actor property line width) in conjunction with my own shader code. Since > we switched from QVTKWidget to QVTKOpenGLWidget this results in black lines > (no color and/or lighting). Everything works fine if the line with is 1.0. > For line width > 1.0, the shader seems to do nothing. > > > Shader code is attached, as well as two images of depicting the issue. > > > Any help is much appreciated! > > > Peter > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 Apr 10 14:19:33 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 10 Apr 2018 14:19:33 -0400 Subject: [vtkusers] Infinite sea plane - what's the best way? In-Reply-To: <1620146120.713302.1523331070432@mail.yahoo.com> References: <1620146120.713302.1523331070432@mail.yahoo.com> Message-ID: > > On Tuesday, April 10, 2018, 2:05:15 PM GMT+12, Jesse Kinross-Smith < > Jesse.Kinross-Smith at bentley.com> wrote: > > So I need to create an infinite textured plane to represent the sea. > > vtkPlaneSource seems like the right object, but I can?t seem to get any of > the examples to display anything. > > A colleague tried a while back also but said he could only get it to work > with OpenGL not OpenGL2. > > That is odd. OpenGL2 has been the default for a while now and it is tested nightly on many platforms. Need more information about what is specifically going wrong to diagnose what is wrong in your setup. > Anyone able to offer any ideas? > > I?ve got a rectilinear grid working, but it?s not ideal, really need an > infinite textured plane. > > > VTK doesn't really have the concept of boundless shapes to my knowledge. It is very likely you could do this with OpenGL2 and programmable shaders. The shader(s) would evaluate the plane equation, determine a depth and u/v coordinate for each fragment and then reject or pass and color the fragment based on the depth test. vtkOSPRay would have a different implementation. Using VTK 8.1.0, C++ > > > > void CModelView::vtkRenderImageToPlane(const CString& inputFilename, float > x, float y, float z) > > { > > USES_CONVERSION; > > std::string filename = W2A(inputFilename); > > > > // Read the image which will be the texture, > > Image_Type imageType = GetImageType(inputFilename); > > vtkAlgorithmOutput* ImageOutput = NULL; > > vtkSmartPointer pNGReader = NULL; > > vtkSmartPointer jPEGReader = NULL; > > vtkSmartPointer bMPReader = NULL; > > switch (imageType) > > { > > case Image_Type::PNG: > > { > > pNGReader = vtkSmartPointer::New(); > > pNGReader->SetFileName(filename.c_str()); > > pNGReader->Update(); > > ImageOutput = pNGReader->GetOutputPort(); > > } > > break; > > case Image_Type::JPG: > > { > > jPEGReader = vtkSmartPointer::New(); > > jPEGReader->SetFileName(filename.c_str()); > > jPEGReader->Update(); > > ImageOutput = jPEGReader->GetOutputPort(); > > } > > break; > > case Image_Type::BMP: > > { > > bMPReader = vtkSmartPointer::New(); > > bMPReader->SetFileName(filename.c_str()); > > bMPReader->Update(); > > ImageOutput = bMPReader->GetOutputPort(); > > } > > break; > > } > > if (ImageOutput == NULL || (pNGReader == NULL && jPEGReader == NULL > && bMPReader == NULL)) > > return; > > > > // Create a plane > > vtkSmartPointer plane = vtkSmartPointer< > vtkPlaneSource>::New(); > > plane->SetNormal(0.0, 0.0, 1.0); > > plane->SetCenter(0, 0, 0); > > //plane->SetResolution(100, 100); > > //plane->SetPoint1(100000, -100000, 0); > > //plane->SetPoint2(-100000, 100000, 0); > > > > // Apply the texture > > vtkSmartPointer texture = vtkSmartPointer:: > New(); > > texture->SetInputConnection(ImageOutput); > > texture->InterpolateOn(); > > texture->RepeatOn(); > > > > vtkSmartPointer texturePlane = > vtkSmartPointer::New(); > > texturePlane->SetInputConnection(plane->GetOutputPort()); > > > > vtkSmartPointer planeMapper = vtkSmartPointer< > vtkPolyDataMapper>::New(); > > planeMapper->SetInputConnection(texturePlane->GetOutputPort()); > > > > vtkSmartPointer texturedPlane = vtkSmartPointer >::New(); > > texturedPlane->SetMapper(planeMapper); > > texturedPlane->SetTexture(texture); > > texturedPlane->GetProperty()->SetOpacity(0.7); > > texturedPlane->SetPickable(FALSE); > > > > // Visualize the textured plane > > m_vtkRenderer->AddActor(texturedPlane); > > > > } > > > > -- > > Jesse Kinross-Smith > > Senior Software Engineer - BSW > > Bentley Systems, Fremantle > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Apr 10 15:15:45 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 10 Apr 2018 15:15:45 -0400 Subject: [vtkusers] Infinite sea plane - what's the best way? In-Reply-To: References: <1620146120.713302.1523331070432@mail.yahoo.com> Message-ID: Probably add it as a mode in the vtkSkybox class. Implementation in vtkOpenGLSkybox just have to change a small bit of shader logic there to compute a texture coordinate for a floor as opposed to a skybox or a photosphere. On Tue, Apr 10, 2018 at 2:19 PM, David E DeMarle wrote: > On Tuesday, April 10, 2018, 2:05:15 PM GMT+12, Jesse Kinross-Smith < >> Jesse.Kinross-Smith at bentley.com> wrote: >> >> So I need to create an infinite textured plane to represent the sea. >> >> vtkPlaneSource seems like the right object, but I can?t seem to get any >> of the examples to display anything. >> >> A colleague tried a while back also but said he could only get it to work >> with OpenGL not OpenGL2. >> >> > That is odd. OpenGL2 has been the default for a while now and it is tested > nightly on many platforms. Need more information about what is specifically > going wrong to diagnose what is wrong in your setup. > > >> Anyone able to offer any ideas? >> >> I?ve got a rectilinear grid working, but it?s not ideal, really need an >> infinite textured plane. >> >> >> > VTK doesn't really have the concept of boundless shapes to my knowledge. > > It is very likely you could do this with OpenGL2 and programmable shaders. > The shader(s) would evaluate the plane equation, determine a depth and u/v > coordinate for each fragment and then reject or pass and color the fragment > based on the depth test. vtkOSPRay would have a different implementation. > > Using VTK 8.1.0, C++ >> >> >> >> void CModelView::vtkRenderImageToPlane(const CString& inputFilename, >> float x, float y, float z) >> >> { >> >> USES_CONVERSION; >> >> std::string filename = W2A(inputFilename); >> >> >> >> // Read the image which will be the texture, >> >> Image_Type imageType = GetImageType(inputFilename); >> >> vtkAlgorithmOutput* ImageOutput = NULL; >> >> vtkSmartPointer pNGReader = NULL; >> >> vtkSmartPointer jPEGReader = NULL; >> >> vtkSmartPointer bMPReader = NULL; >> >> switch (imageType) >> >> { >> >> case Image_Type::PNG: >> >> { >> >> pNGReader = vtkSmartPointer::New(); >> >> pNGReader->SetFileName(filename.c_str()); >> >> pNGReader->Update(); >> >> ImageOutput = pNGReader->GetOutputPort(); >> >> } >> >> break; >> >> case Image_Type::JPG: >> >> { >> >> jPEGReader = vtkSmartPointer::New(); >> >> jPEGReader->SetFileName(filename.c_str()); >> >> jPEGReader->Update(); >> >> ImageOutput = jPEGReader->GetOutputPort(); >> >> } >> >> break; >> >> case Image_Type::BMP: >> >> { >> >> bMPReader = vtkSmartPointer::New(); >> >> bMPReader->SetFileName(filename.c_str()); >> >> bMPReader->Update(); >> >> ImageOutput = bMPReader->GetOutputPort(); >> >> } >> >> break; >> >> } >> >> if (ImageOutput == NULL || (pNGReader == NULL && jPEGReader == >> NULL && bMPReader == NULL)) >> >> return; >> >> >> >> // Create a plane >> >> vtkSmartPointer plane = vtkSmartPointer< >> vtkPlaneSource>::New(); >> >> plane->SetNormal(0.0, 0.0, 1.0); >> >> plane->SetCenter(0, 0, 0); >> >> //plane->SetResolution(100, 100); >> >> //plane->SetPoint1(100000, -100000, 0); >> >> //plane->SetPoint2(-100000, 100000, 0); >> >> >> >> // Apply the texture >> >> vtkSmartPointer texture = vtkSmartPointer> >::New(); >> >> texture->SetInputConnection(ImageOutput); >> >> texture->InterpolateOn(); >> >> texture->RepeatOn(); >> >> >> >> vtkSmartPointer texturePlane = >> vtkSmartPointer::New(); >> >> texturePlane->SetInputConnection(plane->GetOutputPort()); >> >> >> >> vtkSmartPointer planeMapper = vtkSmartPointer< >> vtkPolyDataMapper>::New(); >> >> planeMapper->SetInputConnection(texturePlane->GetOutputPort()); >> >> >> >> vtkSmartPointer texturedPlane = vtkSmartPointer> >::New(); >> >> texturedPlane->SetMapper(planeMapper); >> >> texturedPlane->SetTexture(texture); >> >> texturedPlane->GetProperty()->SetOpacity(0.7); >> >> texturedPlane->SetPickable(FALSE); >> >> >> >> // Visualize the textured plane >> >> m_vtkRenderer->AddActor(texturedPlane); >> >> >> >> } >> >> >> >> -- >> >> Jesse Kinross-Smith >> >> Senior Software Engineer - BSW >> >> Bentley Systems, Fremantle >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 robert.aungst at gmail.com Tue Apr 10 16:36:45 2018 From: robert.aungst at gmail.com (Robby Aungst) Date: Tue, 10 Apr 2018 15:36:45 -0500 Subject: [vtkusers] Missing method for vtkInteractorStyleDrawPolygon? Message-ID: I'm trying to implement vtkInteractorStyleDrawPolygon in Python and I'm following the test: https://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Rendering/Core/Testing/Cxx/TestPolygonSelection.cxx But, vtkInteractorStyleDrawPolygon doesn't have a method for 'GetPolygonPoints' in Python. It's in the header, source and documentation, but python doesn't know about it. Is it because it returns a vtkVector2i? I'm using VTK 8.1. Any ideas? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Tue Apr 10 22:13:25 2018 From: nztoddler at yahoo.com (Todd Martin) Date: Wed, 11 Apr 2018 02:13:25 +0000 (UTC) Subject: [vtkusers] Missing method for vtkInteractorStyleDrawPolygon? In-Reply-To: References: Message-ID: <1897727504.63091.1523412805223@mail.yahoo.com> Hi Robby Yes. vtkVector2i is a template based (generic) class, so it isn't wrapped. You could add a couple of helper methods to VTKint GetPolygonPointCount(); void GetPolygonPoint(int index, int &x, int &y); Todd Martin, Ph.D. Freelance Engineer/Software Architect. On Wednesday, April 11, 2018, 8:37:04 AM GMT+12, Robby Aungst wrote: I'm trying to implement vtkInteractorStyleDrawPolygon in Python and I'm following the test: https://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Rendering/Core/Testing/Cxx/TestPolygonSelection.cxx But, vtkInteractorStyleDrawPolygon doesn't have a method for 'GetPolygonPoints' in Python. It's in the header, source and documentation, but python doesn't know about it. Is it because it returns a vtkVector2i? I'm using VTK 8.1. Any ideas? Thanks! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From pdhahn at compintensehpc.com Tue Apr 10 23:51:05 2018 From: pdhahn at compintensehpc.com (Paul Douglas Hahn) Date: Tue, 10 Apr 2018 22:51:05 -0500 Subject: [vtkusers] multiple charts/plots in one window In-Reply-To: References: Message-ID: For most of my multiple chart needs, I find vtkChartMatrix to be the best option (see Charts/Core/Testing/Cxx/TestChartMatrix.cxx). On 04/07/2018 04:52 PM, Zoltan Takacs wrote: > Hi, > > I am trying to get 4 charts (vtkChartXY) into a window (multiple > contextviews in a window I guess). I have looked at the examples for > lineplot and scatterplot however if I add a chart2 to view they are > displayed on the top each other. What is the best way to achieve this? > > Thanks! > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Paul D. Hahn CompIntense HPC, LLC From tamim.boubou at gmail.com Wed Apr 11 02:16:02 2018 From: tamim.boubou at gmail.com (Tamim) Date: Tue, 10 Apr 2018 23:16:02 -0700 (MST) Subject: [vtkusers] BoxWidget Bounds Message-ID: <1523427362130-0.post@n5.nabble.com> Hello, I have a vtkBoxWidget2 and I need to know its dimensions (length, width, height ) I tried using getBounds()....the results are correct if the box is in its default orientation Once the box is rotated the results are incorrect It turns out that getBounds returns the X, Y, Z coordinates of 2 points.... the lower right corner and the upper left corner of a box that bounds the object Once the object is rotated the points don't represent the actual object anymore...like in the picture My question is how can I get the real dimensions of the box ?? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mark.ostroot at lickenbrocktech.com Wed Apr 11 14:30:56 2018 From: mark.ostroot at lickenbrocktech.com (mark.ostroot at lickenbrocktech.com) Date: Wed, 11 Apr 2018 11:30:56 -0700 Subject: [vtkusers] Combination Volume plot Message-ID: <20180411113056.c7db654a879d86b78cfcacc46040d57b.712d9cc5ea.mailapi@email09.godaddy.com> Hello, I am currently working on an application to take 1 Volume and apply different color maps to different opacity functions in a combined view. Essentially I am taking my data and applying different opacity functions to it in order to bring our different materials within the volume. Ideally I want to create a combination volume with each of these other volumes with different color maps applied to each sub volume in the combination volume. I'm uncertain of how to create a combination volume with a bunch of different color maps inside of it, though I have the different opacity functions and individual color maps working. I'm using VTK 8.0 and QT 5.10. I appreciate any Ideas or guidance anyone has. Thank you for your time, -Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Wed Apr 11 14:55:49 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 11 Apr 2018 18:55:49 +0000 Subject: [vtkusers] Combination Volume plot In-Reply-To: <20180411113056.c7db654a879d86b78cfcacc46040d57b.712d9cc5ea.mailapi@email09.godaddy.com> References: <20180411113056.c7db654a879d86b78cfcacc46040d57b.712d9cc5ea.mailapi@email09.godaddy.com> Message-ID: Hi Mark, A couple of ways come to mind - 1. You could create a single vtkImageData with multiple scalar components in the array and set vtkVolumeProperty::SetIndependentComponents(true). When passing the color and opacity functions, you?d have to specify the component the respective function belongs to. I am not positive, but I believe some areas of the code might be restricting this 4 components. Note that this method would work as long as the volumes are not overlapping in physical space. 2. We recently added support for a multiple overlapping volumes in the GPU volume mapper via vtkMultiVolume. See TestGPURayCastMultiVolumeOverlapping for an example. Hope this helps. Thanks, Sankhesh ? On Wed, Apr 11, 2018 at 2:38 PM wrote: > Hello, > > I am currently working on an application to take 1 Volume and apply > different color maps to different opacity functions in a combined view. > Essentially I am taking my data and applying different opacity functions to > it in order to bring our different materials within the volume. Ideally I > want to create a combination volume with each of these other volumes with > different color maps applied to each sub volume in the combination volume. > I'm uncertain of how to create a combination volume with a bunch of > different color maps inside of it, though I have the different opacity > functions and individual color maps working. I'm using VTK 8.0 and QT 5.10. > > I appreciate any Ideas or guidance anyone has. > > Thank you for your time, > -Mark > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From yii.guxing at gmail.com Wed Apr 11 21:30:58 2018 From: yii.guxing at gmail.com (Yii.Guxing) Date: Wed, 11 Apr 2018 18:30:58 -0700 (MST) Subject: [vtkusers] Image is not updated when I call vtkImageViewer2.SetSlice() Message-ID: <1523496658758-0.post@n5.nabble.com> Hello!! I'm using the JAVA API to display DICOM images, but image is not updated when I call vtkImageViewer2.SetSlice(): fun main(args: Array) { loadAllNativeLibraries() val reader = vtkDICOMImageReader().apply { SetDirectoryName("D:\\Home\\Data\\dcm\\ct0") Update() } val p = VtkImageViewer(reader.GetOutput()) JFrame("DICOM").apply { defaultCloseOperation = JFrame.EXIT_ON_CLOSE contentPane.layout = BorderLayout() contentPane.add(p.component, BorderLayout.CENTER) setSize(600, 600) setLocationRelativeTo(null) isVisible = true } p.resetCamera() } internal class VtkImageViewer(imageData: vtkImageData) : vtkJoglPanelComponent() { val imageViewer: vtkImageViewer2 = vtkImageViewer2().apply { this at VtkImageViewer.windowInteractor.SetInteractorStyle(vtkInteractorStyleImage()) SetRenderWindow(renderWindow) SetRenderer(renderer) SetupInteractor(this at VtkImageViewer.windowInteractor) SetInputData(imageData) camera.ParallelProjectionOn() } init { val min = imageViewer.GetSliceMin() val max = imageViewer.GetSliceMax() setInteractorStyle(vtkInteractorStyleImage()) interactorForwarder.eventInterceptor = object : vtkAbstractEventInterceptor() { override fun mouseWheelMoved(e: MouseWheelEvent): Boolean { val curSlice = imageViewer.GetSlice() val slice = when { e.wheelRotation > 0 -> maxOf(curSlice - 1, min) e.wheelRotation < 0 -> minOf(curSlice + 1, max) else -> curSlice } if (curSlice != slice) { imageViewer.SetSlice(slice) } return true } } } } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Thu Apr 12 00:50:29 2018 From: minpu.code at gmail.com (pnt1614) Date: Wed, 11 Apr 2018 21:50:29 -0700 (MST) Subject: [vtkusers] How to fill holes after clipping with vtkClipPolyData? Message-ID: <1523508629784-0.post@n5.nabble.com> I want to fill holes after clipping with vtkClipPolyData but i do not know how to do it with VTK?. I have also tried to use vtkClipClosedSurface but it did not work. Is there anyone experienced this problem? Please, help me. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Thu Apr 12 01:35:48 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 11 Apr 2018 22:35:48 -0700 Subject: [vtkusers] How to fill holes after clipping with vtkClipPolyData? In-Reply-To: <1523508629784-0.post@n5.nabble.com> References: <1523508629784-0.post@n5.nabble.com> Message-ID: Look at this example: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/FillHoles/ On Wed, Apr 11, 2018 at 9:50 PM, pnt1614 wrote: > I want to fill holes after clipping with vtkClipPolyData but i do not know > how to do it with VTK?. I have also tried to use vtkClipClosedSurface but it > did not work. Is there anyone experienced this problem? Please, help me. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From minpu.code at gmail.com Thu Apr 12 02:37:25 2018 From: minpu.code at gmail.com (pnt1614) Date: Wed, 11 Apr 2018 23:37:25 -0700 (MST) Subject: [vtkusers] How to fill holes after clipping with vtkClipPolyData? In-Reply-To: References: <1523508629784-0.post@n5.nabble.com> Message-ID: <1523515045972-0.post@n5.nabble.com> Thank for the reply, but I only want to fill holes generated by the clipping plane. I also tried with the vtkCutter to get intersection contours and then triangulate those contours, but it did not work. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Thu Apr 12 02:41:15 2018 From: minpu.code at gmail.com (pnt1614) Date: Wed, 11 Apr 2018 23:41:15 -0700 (MST) Subject: [vtkusers] How to render a 2D actor at a window position? Message-ID: <1523515275688-0.post@n5.nabble.com> I want to render a 2D actor at a window position. It means that rotating camera does not affect the 2D actor. Due to lack of VTK documentation, I cannot find any source to implement this idea. Is there anyone knowing how to implement this idea? Please, help me. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mark.ostroot at lickenbrocktech.com Thu Apr 12 10:05:57 2018 From: mark.ostroot at lickenbrocktech.com (mark.ostroot at lickenbrocktech.com) Date: Thu, 12 Apr 2018 07:05:57 -0700 Subject: [vtkusers] Combination Volume plot In-Reply-To: Message-ID: <20180412070557.c7db654a879d86b78cfcacc46040d57b.9b5efcee49.mailapi@email09.godaddy.com> Hi Sankhesh, Thanks for your help, I think the vtkMultiVolume is exactly what I need. I'm trying to overlay my volumes on top of each other so I think that first option will not work. Thanks, -Mark --------- Original Message --------- Subject: Re: [vtkusers] Combination Volume plot From: "Sankhesh Jhaveri" Date: 4/11/18 11:55 am To: mark.ostroot at lickenbrocktech.com Cc: vtkusers at vtk.org Hi Mark, A couple of ways come to mind - You could create a single vtkImageData with multiple scalar components in the array and set vtkVolumeProperty::SetIndependentComponents(true). When passing the color and opacity functions, you'd have to specify the component the respective function belongs to. I am not positive, but I believe some areas of the code might be restricting this 4 components. Note that this method would work as long as the volumes are not overlapping in physical space. We recently added support for a multiple overlapping volumes in the GPU volume mapper via vtkMultiVolume. See TestGPURayCastMultiVolumeOverlapping for an example. Hope this helps. Thanks, Sankhesh ? On Wed, Apr 11, 2018 at 2:38 PM wrote: Hello, I am currently working on an application to take 1 Volume and apply different color maps to different opacity functions in a combined view. Essentially I am taking my data and applying different opacity functions to it in order to bring our different materials within the volume. Ideally I want to create a combination volume with each of these other volumes with different color maps applied to each sub volume in the combination volume. I'm uncertain of how to create a combination volume with a bunch of different color maps inside of it, though I have the different opacity functions and individual color maps working. I'm using VTK 8.0 and QT 5.10. I appreciate any Ideas or guidance anyone has. Thank you for your time, -Mark _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Thu Apr 12 18:47:53 2018 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Thu, 12 Apr 2018 18:47:53 -0400 Subject: [vtkusers] multiple charts/plots in one window In-Reply-To: References: Message-ID: On Sat, Apr 7, 2018 at 5:52 PM, Zoltan Takacs wrote: > > I am trying to get 4 charts (vtkChartXY) into a window (multiple contextviews in a window I guess). I have looked at the examples for lineplot and scatterplot however if I add a chart2 to view they are displayed on the top each other. What is the best way to achieve this? > By default charts fill a full view, as pointed out you can try vtkChartMatrix, or you can borrow some of that code to make the charts a fixed size. You would then need to manage where they are placed, and how big they are when the widget they are in resizes. You can have as many charts as you wish in one widget/context view. The bulk of vtkChartMatrix just manages resizing when the window size is changed. From minpu.code at gmail.com Thu Apr 12 19:36:11 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 12 Apr 2018 16:36:11 -0700 (MST) Subject: [vtkusers] Error in the vtkSelectionNode.h Message-ID: <1523576171456-0.post@n5.nabble.com> I try to run the "FillHoles" example in the VTK wiki (https://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/FillHoles) but I cannot build and run this example due to errors in the vtkSelectionNode.h. The error messages at line 199 (static vtkInformationDoubleKey* EPSILON();) are "expected an identifier" "syntax error: 'constant'" "unexpected token(s) preceding ';'" Is there anyone having the same problem? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Thu Apr 12 19:46:27 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 13 Apr 2018 08:46:27 +0900 Subject: [vtkusers] How to fill holes after clipping with vtkClipPolyData? In-Reply-To: <1523515045972-0.post@n5.nabble.com> References: <1523508629784-0.post@n5.nabble.com> <1523515045972-0.post@n5.nabble.com> Message-ID: Hi, Here is an example of clipping and capping on polydata. https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/CapClip/ Thanks 2018-04-12 15:37 GMT+09:00 pnt1614 : > Thank for the reply, but I only want to fill holes generated by the clipping > plane. I also tried with the vtkCutter to get intersection contours and then > triangulate those contours, but it did not work. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From lihouxing0710 at gmail.com Thu Apr 12 23:23:28 2018 From: lihouxing0710 at gmail.com (Jounly) Date: Thu, 12 Apr 2018 20:23:28 -0700 (MST) Subject: [vtkusers] How to set default scalar value when using vtkImageReslice Message-ID: <1523589808529-0.post@n5.nabble.com> Dear all, I am trying to use vtkImageReslice to generate an oblique slice from the image volume. However, when some part of the output image is outside the volume, the scalar value of the region is very large, which I want it to be small as it is the background. I am wondering that is there any function which I can call to set the default scalar value generated by vtkImageReslice when it is outside the image volume? Any help would be appreciated, thanks in advance. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Fri Apr 13 00:35:26 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 13 Apr 2018 00:35:26 -0400 Subject: [vtkusers] How to set default scalar value when using vtkImageReslice In-Reply-To: <1523589808529-0.post@n5.nabble.com> References: <1523589808529-0.post@n5.nabble.com> Message-ID: I would guess SetBackgroundColor (double , double , double , double ) or SetBackgroundLevel (double v) might be what you are looking for, though I'm not sure because their default values are (0, 0, 0, 0) and 0, respectively. - Cory On Thu, Apr 12, 2018 at 11:23 PM, Jounly wrote: > Dear all, > I am trying to use vtkImageReslice to generate an oblique slice from the > image volume. However, when some part of the output image is outside the > volume, the scalar value of the region is very large, which I want it to be > small as it is the background. I am wondering that is there any function > which I can call to set the default scalar value generated by > vtkImageReslice when it is outside the image volume? > Any help would be appreciated, thanks in advance. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Fri Apr 13 01:08:46 2018 From: nztoddler at yahoo.com (Todd Martin) Date: Fri, 13 Apr 2018 05:08:46 +0000 (UTC) Subject: [vtkusers] multiple charts/plots in one window In-Reply-To: References: Message-ID: <1042245899.1694314.1523596126040@mail.yahoo.com> The simplest solution might be just to add multiple viewports to the render window and render a different chart in each. Todd Martin, Ph.D. Freelance Engineer/Software Architect. On Friday, April 13, 2018, 10:48:11 AM GMT+12, Marcus D. Hanwell wrote: On Sat, Apr 7, 2018 at 5:52 PM, Zoltan Takacs wrote: > > I am trying to get 4 charts (vtkChartXY) into a window (multiple contextviews in a window I guess). I have looked at the examples for lineplot and scatterplot however if I add a chart2 to view they are displayed on the top each other. What is the best way to achieve this? > By default charts fill a full view, as pointed out you can try vtkChartMatrix, or you can borrow some of that code to make the charts a fixed size. You would then need to manage where they are placed, and how big they are when the widget they are in resizes. You can have as many charts as you wish in one widget/context view. The bulk of vtkChartMatrix just manages resizing when the window size is changed. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihouxing0710 at gmail.com Fri Apr 13 04:45:33 2018 From: lihouxing0710 at gmail.com (Jounly) Date: Fri, 13 Apr 2018 01:45:33 -0700 (MST) Subject: [vtkusers] How to set default scalar value when using vtkImageReslice In-Reply-To: References: <1523589808529-0.post@n5.nabble.com> Message-ID: <1523609133893-0.post@n5.nabble.com> Hi, thanks for your reply! I figured out that the default scalar value is 0. The reason that I thought the value was large is that it appeared to be much brighter than other pixels inside the volume. and it turned out to be the problem of indirectly set window/ level because most of the scalar value of the pixels inside the volume is much smaller than 0. Again, thanks for your reply~ -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From alican1812 at hotmail.com Fri Apr 13 06:13:39 2018 From: alican1812 at hotmail.com (alican) Date: Fri, 13 Apr 2018 03:13:39 -0700 (MST) Subject: [vtkusers] How to fill holes after clipping with vtkClipPolyData? In-Reply-To: References: <1523508629784-0.post@n5.nabble.com> <1523515045972-0.post@n5.nabble.com> Message-ID: <1523614419481-0.post@n5.nabble.com> I have exactly the same problem as pnt1614. All these examples work only for meshes with one hole, created by cutting. What if my polydata already has holes, that I want to keep, but *I want to close one specific hole only , the one, created by cutting?* I am wrapping my head about this problem for month, still don't have a good answer. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Fri Apr 13 08:59:03 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 13 Apr 2018 08:59:03 -0400 Subject: [vtkusers] How to set default scalar value when using vtkImageReslice In-Reply-To: <1523609133893-0.post@n5.nabble.com> References: <1523589808529-0.post@n5.nabble.com> <1523609133893-0.post@n5.nabble.com> Message-ID: Ah, good point - there are a good many values for which 0 is a large number! I'm glad it was an easy fix. On Fri, Apr 13, 2018 at 4:45 AM, Jounly wrote: > Hi, thanks for your reply! I figured out that the default scalar value is > 0. > The reason that I thought the value was large is that it appeared to be > much > brighter than other pixels inside the volume. and it turned out to be the > problem of indirectly set window/ level because most of the scalar value of > the pixels inside the volume is much smaller than 0. Again, thanks for your > reply~ > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Apr 13 10:34:46 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 13 Apr 2018 10:34:46 -0400 Subject: [vtkusers] [ANNOUNCE] A free biomedical image analysis and visualization 2-day course Message-ID: *Kitware has organized a free 2-day biomedical image visualization and analysis training course next month (May 30-31) at our Carrboro, NC branch office. The course is designed for clinical researchers, computer scientists and engineers with biomedical imaging background who are interested in learning and developing ITK, VTK and 3D Slicer.https://blog.kitware.com/events/free-biomedical-image-analysis-and-visualization-2-day-course/ The course outline isMay 30: ?VTK and ITK for medical image analysis and visualization?Morning: ?A hands-on introduction to VTK for medical image visualization?Afternoon: ?A hands-on introduction to ITK for medical image analysis?May 31 : ?3D Slicer for medical computing application development?Morning: ?A hands-on introduction to Slicer?Afternoon: ?Customizing 3D Slicer?To reserve a seat for the course, please fill out this google form and we'll get back to you to confirm your reservation.https://docs.google.com/forms/d/e/1FAIpQLSfj-NElDTlEbLx2THAB7XNs3xwIDWEU25JmTFS1MEf4Olv9Ow/viewform * -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Apr 13 12:08:44 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 13 Apr 2018 10:08:44 -0600 Subject: [vtkusers] How to set default scalar value when using vtkImageReslice In-Reply-To: References: <1523589808529-0.post@n5.nabble.com> <1523609133893-0.post@n5.nabble.com> Message-ID: The CT number for air is -1000, so for CT with real-world (i.e. Hounsfield) data values, it's best to set the background to <= -1000. On Fri, Apr 13, 2018 at 6:59 AM, Cory Quammen wrote: > Ah, good point - there are a good many values for which 0 is a large > number! I'm glad it was an easy fix. > > On Fri, Apr 13, 2018 at 4:45 AM, Jounly wrote: > >> Hi, thanks for your reply! I figured out that the default scalar value is >> 0. >> The reason that I thought the value was large is that it appeared to be >> much >> brighter than other pixels inside the volume. and it turned out to be the >> problem of indirectly set window/ level because most of the scalar value >> of >> the pixels inside the volume is much smaller than 0. Again, thanks for >> your >> reply~ >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From polly_sukting at hotmail.com Fri Apr 13 13:55:30 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Fri, 13 Apr 2018 17:55:30 +0000 Subject: [vtkusers] Polydata Get max values Message-ID: Hi, Is there anyone can give me a hint on how to find the highest point (max value of z coordinate) or lowest point (min value of z coordinate) in a polydata? I want to mark it with a colour circle to visualize as a keypoint. Thank you so much. Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Apr 13 14:38:38 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 13 Apr 2018 14:38:38 -0400 Subject: [vtkusers] Polydata Get max values In-Reply-To: References: Message-ID: One way is to apply the elevation filter and then threshold/contour and what not on that. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Apr 13, 2018 at 1:55 PM, Polly Pui wrote: > Hi, > > Is there anyone can give me a hint on how to find the highest point (max > value of z coordinate) or lowest point (min value of z coordinate) in a > polydata? > > I want to mark it with a colour circle to visualize as a keypoint. > > > Thank you so much. > > > Polly > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Fri Apr 13 14:52:22 2018 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 13 Apr 2018 18:52:22 +0000 Subject: [vtkusers] Polydata Get max values In-Reply-To: References: Message-ID: You can use GetBounds method - https://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a6a25018c1af03c2fc1068ea4a0221281 Andras From: vtkusers On Behalf Of Polly Pui Sent: Friday, April 13, 2018 1:56 PM To: vtkusers at vtk.org Subject: [vtkusers] Polydata Get max values Hi, Is there anyone can give me a hint on how to find the highest point (max value of z coordinate) or lowest point (min value of z coordinate) in a polydata? I want to mark it with a colour circle to visualize as a keypoint. Thank you so much. Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.borduas at caboma.com Fri Apr 13 17:41:06 2018 From: jonathan.borduas at caboma.com (Jonathan Borduas) Date: Fri, 13 Apr 2018 21:41:06 +0000 Subject: [vtkusers] Zebra shader to visualise continuity of surfaces Message-ID: Hello, Is there a zebra shader in VTK ? Many surfacing software such as Rhino, Alias and Fusion360 incorporate this Zebra shader to show the continuity (G0,G1,G2..) of the surface between different patchs: http://www.bluesmith.co.uk/LW/theoryBuilders/evaluateZebra.htm https://www.youtube.com/watch?v=NtMybG8Nsfg This allows a designer to verify that the aesthetics of the blend between two surfaces. See attached pictures zebra.png. Best regards, Jonathan Borduas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zebra.png Type: image/png Size: 298219 bytes Desc: zebra.png URL: From karanovicm at gmail.com Fri Apr 13 22:10:36 2018 From: karanovicm at gmail.com (KM) Date: Fri, 13 Apr 2018 19:10:36 -0700 (MST) Subject: [vtkusers] Activiz 7.1.1 In-Reply-To: <798bd98642b747d0a61073f719afddb5@cascadeacoustic.com> References: <798bd98642b747d0a61073f719afddb5@cascadeacoustic.com> Message-ID: <1523671836797-0.post@n5.nabble.com> Hi Mark, I tried unsuccessfully to compile ActiViz 7.1 and found your post, is there any chance you have 64bit version compiled and willing to share ? I'm loading large files and need 64bit. Thanks MK -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From pdhahn at compintensehpc.com Sat Apr 14 01:49:46 2018 From: pdhahn at compintensehpc.com (Paul Douglas Hahn) Date: Sat, 14 Apr 2018 00:49:46 -0500 Subject: [vtkusers] VTK with imgui Message-ID: I am thinking about trying to use imgui with VTK. Does anyone already have experience trying this? Thanks for any input! -- Paul D. Hahn CompIntense HPC, LLC From f_u_7 at yahoo.com Sat Apr 14 13:41:59 2018 From: f_u_7 at yahoo.com (lucky) Date: Sat, 14 Apr 2018 10:41:59 -0700 (MST) Subject: [vtkusers] Add seeds in vtkResliceImageViewer using vtkSeedWidget but why seeds are always visible? Message-ID: <1523727719870-0.post@n5.nabble.com> Hi, I am adding seeds in vtkResliceImageViewer using vtkSeedWidget. But seeds are always visible even when I change the slice. I want to add seeds to specific slice number and each slice should have seeds points that should be visible only on that specific slice. I have done adding and interaction etc but I am just stuck here. I want to create something like 3D Slicer's Fiducial module. Thank you, -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From f_u_7 at yahoo.com Sat Apr 14 13:46:03 2018 From: f_u_7 at yahoo.com (lucky) Date: Sat, 14 Apr 2018 10:46:03 -0700 (MST) Subject: [vtkusers] vtkSeedWidget for vtkResliceImageViewer In-Reply-To: <1456185016932-5736731.post@n5.nabble.com> References: <1456185016932-5736731.post@n5.nabble.com> Message-ID: <1523727963457-0.post@n5.nabble.com> Hi, did you find a solution to this problem? I am also stuck in this part. Please let me know if you have found a way to add seeds to a specific slice. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Sat Apr 14 14:23:07 2018 From: lasso at queensu.ca (Andras Lasso) Date: Sat, 14 Apr 2018 18:23:07 +0000 Subject: [vtkusers] Add seeds in vtkResliceImageViewer using vtkSeedWidget but why seeds are always visible? In-Reply-To: <1523727719870-0.post@n5.nabble.com> References: <1523727719870-0.post@n5.nabble.com> Message-ID: 3D Slicer is open-source and you are allowed to copy and use any of its source code in your own software without restrictions. So, if you need this feature, then one option is to just copy-paste code. You can save a lot of software development and maintenance time if you don't redevelop this and similar basic features from scratch. Instead, you can use 3D Slicer as a platform and get all essential data import/export, visualization, analysis features for free and spend your time with working on your own ideas, new algorithms, application-specific user interface and workflow. Andras ________________________________ From: lucky via vtkusers Sent: Saturday, April 14, 2018 1:42 PM To: vtkusers at vtk.org Subject: [vtkusers] Add seeds in vtkResliceImageViewer using vtkSeedWidget but why seeds are always visible? Hi, I am adding seeds in vtkResliceImageViewer using vtkSeedWidget. But seeds are always visible even when I change the slice. I want to add seeds to specific slice number and each slice should have seeds points that should be visible only on that specific slice. I have done adding and interaction etc but I am just stuck here. I want to create something like 3D Slicer's Fiducial module. Thank you, -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7C38259cc78c4d4efc961008d5a22f097a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636593245288252012&sdata=0GP2vkphWMMM7Y89CEpxfrJwkhk7jmoKTff2wXu%2Bs2g%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C38259cc78c4d4efc961008d5a22f097a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636593245288252012&sdata=sMY3gJ4krrQxs%2BiBNpCEEVJXwcsr6RpKXo3Myk%2FJsxk%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C38259cc78c4d4efc961008d5a22f097a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636593245288252012&sdata=%2BYwOkpxiVt2SskaG%2FGVLLLwrBMZ6vpY7gSJvbPnx5mY%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C38259cc78c4d4efc961008d5a22f097a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636593245288252012&sdata=JZeW70wShN2%2BJg0fa%2F4A%2FUy8CVLc6vZ44Hnd69kjbSQ%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C38259cc78c4d4efc961008d5a22f097a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636593245288252012&sdata=EEKhfZ7hwtW7tGXZOotUZdvL%2BMfHLr5%2B%2BZppXXQ5ECQ%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C38259cc78c4d4efc961008d5a22f097a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636593245288252012&sdata=k0jPb%2BCjQ6n7XFYWYPwIHqm%2BAGI%2FWkt8UX%2B3oU1cKag%3D&reserved=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zozonmr at gmail.com Sat Apr 14 14:28:50 2018 From: zozonmr at gmail.com (Zoltan Takacs) Date: Sat, 14 Apr 2018 19:28:50 +0100 Subject: [vtkusers] multiple charts/plots in one window In-Reply-To: <1042245899.1694314.1523596126040@mail.yahoo.com> References: <1042245899.1694314.1523596126040@mail.yahoo.com> Message-ID: <9ab9fd06-d3f2-f06d-4644-dbada6a1551b@gmail.com> Hi, I am trying to do what you suggested and started combining the the examples of scatterplot.cxx and mutipleviewports.cxx -> see the attached Scatterplot2.cxx file for the result. the code does compile and run and the window is split into 2 however the charts are missing. I am missing the mapper and the actor and I am not sure which one to use for 2D scene (with vtkChartXY). Is it necessary to have a mapper and an actor for a 2D scene? Thanks On 13/04/18 06:08, Todd Martin wrote: > The simplest solution might be just to add multiple viewports to the > render window and render a different chart in each. > > Todd Martin, Ph.D. > Freelance Engineer/Software Architect. > > > > On Friday, April 13, 2018, 10:48:11 AM GMT+12, Marcus D. Hanwell > wrote: > > > On Sat, Apr 7, 2018 at 5:52 PM, Zoltan Takacs > wrote: > > > > I am trying to get 4 charts (vtkChartXY) into a window (multiple > contextviews in a window I guess). I have looked at the examples for > lineplot and scatterplot however if I add a chart2 to view they are > displayed on the top each other. What is the best way to achieve this? > > > By default charts fill a full view, as pointed out you can try > vtkChartMatrix, or you can borrow some of that code to make the charts > a fixed size. You would then need to manage where they are placed, and > how big they are when the widget they are in resizes. You can have as > many charts as you wish in one widget/context view. The bulk of > vtkChartMatrix just manages resizing when the window size is changed. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterPlot2.cxx Type: text/x-c++src Size: 4716 bytes Desc: not available URL: From zozonmr at gmail.com Sat Apr 14 14:55:41 2018 From: zozonmr at gmail.com (Zoltan Takacs) Date: Sat, 14 Apr 2018 19:55:41 +0100 Subject: [vtkusers] multiple charts/plots in one window In-Reply-To: <1042245899.1694314.1523596126040@mail.yahoo.com> References: <1042245899.1694314.1523596126040@mail.yahoo.com> Message-ID: <4d0e02a2-4dc4-7689-7d1d-56d29f6f3169@gmail.com> Hi, I manged to display the plots by using using the renderer of the view rather the setting the renderer of the view: //view2->SetRenderer(leftRenderer); ?? leftRenderer = view2->GetRenderer(); The plots are now displayed nex to each other! Thansk On 13/04/18 06:08, Todd Martin wrote: > The simplest solution might be just to add multiple viewports to the > render window and render a different chart in each. > > Todd Martin, Ph.D. > Freelance Engineer/Software Architect. > > > > On Friday, April 13, 2018, 10:48:11 AM GMT+12, Marcus D. Hanwell > wrote: > > > On Sat, Apr 7, 2018 at 5:52 PM, Zoltan Takacs > wrote: > > > > I am trying to get 4 charts (vtkChartXY) into a window (multiple > contextviews in a window I guess). I have looked at the examples for > lineplot and scatterplot however if I add a chart2 to view they are > displayed on the top each other. What is the best way to achieve this? > > > By default charts fill a full view, as pointed out you can try > vtkChartMatrix, or you can borrow some of that code to make the charts > a fixed size. You would then need to manage where they are placed, and > how big they are when the widget they are in resizes. You can have as > many charts as you wish in one widget/context view. The bulk of > vtkChartMatrix just manages resizing when the window size is changed. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From zozonmr at gmail.com Sat Apr 14 17:59:21 2018 From: zozonmr at gmail.com (Zoltan Takacs) Date: Sat, 14 Apr 2018 22:59:21 +0100 Subject: [vtkusers] multiple charts/plots in one window In-Reply-To: References: Message-ID: <44539e5f-3a18-9cce-1a70-b12a3a8e38c7@gmail.com> Works great thanks! On 12/04/18 23:47, Marcus D. Hanwell wrote: > On Sat, Apr 7, 2018 at 5:52 PM, Zoltan Takacs wrote: >> I am trying to get 4 charts (vtkChartXY) into a window (multiple contextviews in a window I guess). I have looked at the examples for lineplot and scatterplot however if I add a chart2 to view they are displayed on the top each other. What is the best way to achieve this? >> > By default charts fill a full view, as pointed out you can try > vtkChartMatrix, or you can borrow some of that code to make the charts > a fixed size. You would then need to manage where they are placed, and > how big they are when the widget they are in resizes. You can have as > many charts as you wish in one widget/context view. The bulk of > vtkChartMatrix just manages resizing when the window size is changed. From polly_sukting at hotmail.com Mon Apr 16 00:52:54 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Mon, 16 Apr 2018 04:52:54 +0000 Subject: [vtkusers] Polydata Get max values In-Reply-To: References: , Message-ID: Hi Andras, Thank you for your reply. I could get the highest and lowest coordinates from what you have suggested. I have another question here. How can I locate the coordinates by giving a coloured point and visualize them? ... vtkSmartPointer point = vtkSmartPointer::New(); vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(argv[1]); reader->Update(); point = reader->GetOutput(); double bounds[6]; point->GetBounds(bounds); std::cout << "xmin: " << bounds[0] << " " << "xmax: " << bounds[1] << std::endl << "ymin: " << bounds[2] << " " << "ymax: " << bounds[3] << std::endl << "zmin: " << bounds[4] << " " << "zmax: " << bounds[5] << std::endl; vtkSmartPointer Mapper = vtkSmartPointer::New(); Mapper->SetInputConnection(reader->GetOutputPort()); Mapper->ScalarVisibilityOff(); Mapper->Update(); vtkSmartPointer Actor = vtkSmartPointer::New(); Actor->SetMapper(Mapper); Actor->GetProperty()->SetPointSize(10); Actor->GetProperty()->SetColor(1, 0, 1); Thank you. Regards, Polly ________________________________ From: Andras Lasso Sent: Saturday, April 14, 2018 2:52 AM To: Polly Pui; vtkusers at vtk.org Subject: RE: Polydata Get max values You can use GetBounds method - https://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a6a25018c1af03c2fc1068ea4a0221281 VTK: vtkDataSet Class Reference www.vtk.org abstract class to specify dataset behavior . vtkDataSet is an abstract class that specifies an interface for dataset objects. vtkDataSet also provides methods to provide information about the data, such as center, bounding box, and representative length. Andras From: vtkusers On Behalf Of Polly Pui Sent: Friday, April 13, 2018 1:56 PM To: vtkusers at vtk.org Subject: [vtkusers] Polydata Get max values Hi, Is there anyone can give me a hint on how to find the highest point (max value of z coordinate) or lowest point (min value of z coordinate) in a polydata? I want to mark it with a colour circle to visualize as a keypoint. Thank you so much. Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Apr 16 11:00:48 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 16 Apr 2018 11:00:48 -0400 Subject: [vtkusers] Zebra shader to visualise continuity of surfaces In-Reply-To: References: Message-ID: There is not currently. In principle we could do that with a glsl fragment shader applied to the polydatamapper. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Apr 13, 2018 at 5:41 PM, Jonathan Borduas < jonathan.borduas at caboma.com> wrote: > Hello, > > Is there a zebra shader in VTK ? Many surfacing software such as Rhino, > Alias and Fusion360 incorporate this Zebra shader to show the continuity > (G0,G1,G2..) of the surface between different patchs: > http://www.bluesmith.co.uk/LW/theoryBuilders/evaluateZebra.htm > https://www.youtube.com/watch?v=NtMybG8Nsfg > > > This allows a designer to verify that the aesthetics of the blend between > two surfaces. See attached pictures zebra.png. > > > > Best regards, > > > > Jonathan Borduas > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Apr 16 13:00:06 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 16 Apr 2018 13:00:06 -0400 Subject: [vtkusers] Zebra shader to visualise continuity of surfaces In-Reply-To: References: Message-ID: You could also approximate with vtkFunctionParser (paraview's Calculator filter) and an indexed colormap. Expression of 5+floor(Normals_Y*5) gives you 10 stripes for the Y component of the normal. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Apr 16, 2018 at 11:00 AM, David E DeMarle wrote: > There is not currently. > > In principle we could do that with a glsl fragment shader applied to the > polydatamapper. > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Fri, Apr 13, 2018 at 5:41 PM, Jonathan Borduas < > jonathan.borduas at caboma.com> wrote: > >> Hello, >> >> Is there a zebra shader in VTK ? Many surfacing software such as Rhino, >> Alias and Fusion360 incorporate this Zebra shader to show the continuity >> (G0,G1,G2..) of the surface between different patchs: >> http://www.bluesmith.co.uk/LW/theoryBuilders/evaluateZebra.htm >> https://www.youtube.com/watch?v=NtMybG8Nsfg >> >> >> This allows a designer to verify that the aesthetics of the blend between >> two surfaces. See attached pictures zebra.png. >> >> >> >> Best regards, >> >> >> >> Jonathan Borduas >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Mon Apr 16 15:14:31 2018 From: seun at rogue-research.com (Seun Odutola) Date: Mon, 16 Apr 2018 15:14:31 -0400 Subject: [vtkusers] vtkChartXY Zoom Message-ID: Hi everyone, I was wondering if someone could help me out on this one. I would like to display a large set of points on a vtkChartXY without any of the points off screen (that is I?ll like to be able to see all points as though the scene was zoomed out). How do I go about achieving this effect. From wizardanim2000 at gmail.com Mon Apr 16 17:19:03 2018 From: wizardanim2000 at gmail.com (Kyle Nethery-Pavelchak) Date: Mon, 16 Apr 2018 14:19:03 -0700 Subject: [vtkusers] Background pixel blending in VTK (2D) Message-ID: Hi all - My company is using VTK to render overlaid DICOM images to a screen. All of the images in question are single channel intensity mapped images encoded in a ushort buffer. Quick overview of how data is built: - vtkImageReslice is hooked into vtkImageMapToWindowLevelColors object. - We add a custom lookup table to the window/level colors object. - We connect the w/l colors object to a vtkImageMapper. - We connect the image mapper to a Actor2D. - We then use a vtkImageBlend class and set input connections to two channels from the Actor2D generated in the above steps. For each Actor2D object rendered to the screen, we can control default values of pixels on the screen by accessing values within the lookup table. However, for pixels outside the extent of the data being drawn, the value appears to always be (0,0,0,1). We run into issues when considering blending of two images. We need the background image (if larger than the overlay image) to be present outside the extents of the overlay image. I see / have tried various API which seem like they should work - ie: vtkImageReslice::SetBackgroundColor, setting default value in lookup table, reimplementing the vtkImageBlend class to attempt to access these background pixels. One strange behavior I've noticed, is in the 'SetBackgroundColor(...)' function on the reslicer, a value of (x, 0, 0, 0) sets the intensity value of the background pixels - i can achieve a white background if i set 'x' to be the highest value in our lookup table. However, the BG channels remain 0 and A remains 1 even if i specify 0 in the function. I would assume this is because the DICOM image is a single channel image, and VTK is generating the background with the same format ..? I am wondering if anyone has seen/experienced this before, or, knows how to work around this kind of issue. thanks From david.gobbi at gmail.com Mon Apr 16 17:42:54 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 16 Apr 2018 15:42:54 -0600 Subject: [vtkusers] Background pixel blending in VTK (2D) In-Reply-To: References: Message-ID: Hi Kyle, The vtkImageBlend class requires the images to have identical sampling. It's possible to get it to overlay an image that is smaller than the base image, but to do so you need the overlay image to have an "Extent" that starts at a value greater than zero. The Extent of an image can be shifted around with the vtkImageChangeInformation filter. All in all, it is a huge hassle, and sometimes it's easier to use vtkImageReslice to resample the overlay to match the base image. For all DICOM-viewer apps that I've written recently, I've taken a totally different approach, and used the VTK image rendering classes that I contributed a few years ago: https://www.vtk.org/Wiki/VTK/Image_Rendering_Classes Some examples are here (they're not great examples, but they exist): https://gitlab.kitware.com/vtk/vtk/tree/master/Rendering/Image/Testing/Cxx https://github.com/dgobbi/vtk-dicom/blob/master/Examples/TestDICOMDisplay.cxx If you don't want to go that far, you might consider using the vtkImageResliceToColors class to resolve the background issue. This is a subclass of vtkImageReslice that has a SetLookupTable() method. It combines reslicing and color mapping into a single operation, so that when you call SetBackgroundColor() you set the actual RGBA color directly. - David On Mon, Apr 16, 2018 at 3:19 PM, Kyle Nethery-Pavelchak < wizardanim2000 at gmail.com> wrote: > Hi all - > > My company is using VTK to render overlaid DICOM images to a screen. > All of the images in question are single channel intensity mapped > images encoded in a ushort buffer. > > Quick overview of how data is built: > - vtkImageReslice is hooked into vtkImageMapToWindowLevelColors object. > - We add a custom lookup table to the window/level colors object. > - We connect the w/l colors object to a vtkImageMapper. > - We connect the image mapper to a Actor2D. > - We then use a vtkImageBlend class and set input connections to two > channels from the Actor2D generated in the above steps. > > For each Actor2D object rendered to the screen, we can control default > values of pixels on the screen by accessing values within the lookup > table. However, for pixels outside the extent of the data being > drawn, the value appears to always be (0,0,0,1). > > We run into issues when considering blending of two images. We need > the background image (if larger than the overlay image) to be present > outside the extents of the overlay image. > > I see / have tried various API which seem like they should work - ie: > vtkImageReslice::SetBackgroundColor, setting default value in lookup > table, reimplementing the vtkImageBlend class to attempt to access > these background pixels. > > One strange behavior I've noticed, is in the 'SetBackgroundColor(...)' > function on the reslicer, a value of (x, 0, 0, 0) sets the intensity > value of the background pixels - i can achieve a white background if i > set 'x' to be the highest value in our lookup table. However, the BG > channels remain 0 and A remains 1 even if i specify 0 in the function. > I would assume this is because the DICOM image is a single channel > image, and VTK is generating the background with the same format ..? > > I am wondering if anyone has seen/experienced this before, or, knows > how to work around this kind of issue. > > thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Tue Apr 17 00:35:08 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 17 Apr 2018 04:35:08 +0000 Subject: [vtkusers] vtkChartXY Zoom In-Reply-To: References: Message-ID: If all your axes are set to vtkAxis::AUTO, then you can simply call vtkChartXY::RecalculatePlotBounds(). If you have manually set axes then you can take this method in 3D Slicer's plot view class: https://github.com/Slicer/Slicer/blob/66b152bc35e1f84eafcacd8050300687fa377229/Libs/MRML/Widgets/qMRMLPlotView.cxx#L458-L600 It would probably make sense to integrate this auto-fit feature into VTK. Andras -----Original Message----- From: vtkusers On Behalf Of Seun Odutola Sent: Monday, April 16, 2018 3:15 PM To: VTK Users Subject: [vtkusers] vtkChartXY Zoom Hi everyone, I was wondering if someone could help me out on this one. I would like to display a large set of points on a vtkChartXY without any of the points off screen (that is I?ll like to be able to see all points as though the scene was zoomed out). How do I go about achieving this effect. _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=7Pnt8cyYoPZjJUP%2FurvvL448Jv50iOg%2BjviMRfdPqpc%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=a%2FPUNsH8KzYi94RZYZO6kvj0ztr1FCWvegsxMGceEZM%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=fKfkQ2%2FT%2FlNWQgS%2FLlm71EduUHHorHUeeW5ibq%2F03Bo%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=SNaH5Y%2BQ3SVUl1k0quFZ0oG7jj1yTFPVMcc5h3st%2Flk%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=tziqrFbdLz01nWy23JU3Yd79rZLto1kXHro0fGz2WN4%3D&reserved=0 From ochampao at hotmail.com Tue Apr 17 07:07:16 2018 From: ochampao at hotmail.com (ochampao) Date: Tue, 17 Apr 2018 04:07:16 -0700 (MST) Subject: [vtkusers] Storing pointers to pipeline objects. Message-ID: <1523963236330-0.post@n5.nabble.com> Hi vtkUsers, After constructing the VTK pipeline and loading some vtkImageData to be displayed, due to some user request, we may need to access parts of the pipeline in order to change some properties in an object. For example, lets say that the user changes the colours of the lookup table used to display the dataset. This means that the class handling the pipeline needs to store pointers or references to at least some objects of the pipeline. My question is: Is there some best practice or standard way in VTK for accessing the objects of the pipeline, or do we simply need to store them in a standard C++ container? At the moment, I am simply collecting the objects in a struct and storing them in a C++ container which is member of the class handling the pipeline. I have included below a sample of what I am doing at the moment. Is there a better way of doing this? Thanks, Panos =============================================== class QuadView { private: struct PipelineObjects2D { vtkSmartPointer imageStack; vtkSmartPointer renderer; vtkSmartPointer renderWindow; }; struct ImageDataStruct { vtkSmartPointer imageData; vtkSmartPointer lookupTable; std::unordered_map> resliceMapperContainer; std::unordered_map> imageSliceContainer; }; std::map m_ImageDataContainer; std::unordered_map m_PipelineObject2DContainer; public: // more code }; =============================================== -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Tue Apr 17 08:54:06 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 17 Apr 2018 08:54:06 -0400 Subject: [vtkusers] Storing pointers to pipeline objects. In-Reply-To: <1523963236330-0.post@n5.nabble.com> References: <1523963236330-0.post@n5.nabble.com> Message-ID: > At the moment, I am simply collecting the objects in a struct and storing > them in a C++ container which is member of the class handling the pipeline. > I have included below a sample of what I am doing at the moment. Is there a > better way of doing this? > > Thanks, > Panos > That is a perfectly acceptable and typical way to access objects in the pipeline. Cory > > =============================================== > class QuadView > { > private: > struct PipelineObjects2D > { > vtkSmartPointer imageStack; > vtkSmartPointer renderer; > vtkSmartPointer > renderWindow; > }; > > struct ImageDataStruct > { > vtkSmartPointer imageData; > vtkSmartPointer lookupTable; > std::unordered_map vtkSmartPointer> > resliceMapperContainer; > std::unordered_map vtkSmartPointer> > imageSliceContainer; > }; > > std::map > m_ImageDataContainer; > std::unordered_map > m_PipelineObject2DContainer; > > public: > > // more code > }; > > =============================================== > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Tue Apr 17 11:20:27 2018 From: seun at rogue-research.com (Seun Odutola) Date: Tue, 17 Apr 2018 11:20:27 -0400 Subject: [vtkusers] vtkChartXY Zoom In-Reply-To: References: Message-ID: <59417A6E-58CE-4C16-B4CB-EBFA3F008300@rogue-research.com> Hi Andras, Thanks for the tip, by default I have the axes set to AUTO and calling recalculate on the chart does the trick. Note: RecalculatePlotBounds is protected so the function I?m running with is RecalculateBounds. > On Apr 17, 2018, at 12:35 AM, Andras Lasso wrote: > > If all your axes are set to vtkAxis::AUTO, then you can simply call vtkChartXY::RecalculatePlotBounds(). > > If you have manually set axes then you can take this method in 3D Slicer's plot view class: https://github.com/Slicer/Slicer/blob/66b152bc35e1f84eafcacd8050300687fa377229/Libs/MRML/Widgets/qMRMLPlotView.cxx#L458-L600 > > It would probably make sense to integrate this auto-fit feature into VTK. > > Andras > > -----Original Message----- > From: vtkusers On Behalf Of Seun Odutola > Sent: Monday, April 16, 2018 3:15 PM > To: VTK Users > Subject: [vtkusers] vtkChartXY Zoom > > Hi everyone, > > I was wondering if someone could help me out on this one. I would like to display a large set of points on a vtkChartXY without any of the points off screen (that is I?ll like to be able to see all points as though the scene was zoomed out). How do I go about achieving this effect. > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=7Pnt8cyYoPZjJUP%2FurvvL448Jv50iOg%2BjviMRfdPqpc%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=a%2FPUNsH8KzYi94RZYZO6kvj0ztr1FCWvegsxMGceEZM%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=fKfkQ2%2FT%2FlNWQgS%2FLlm71EduUHHorHUeeW5ibq%2F03Bo%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=SNaH5Y%2BQ3SVUl1k0quFZ0oG7jj1yTFPVMcc5h3st%2Flk%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C6e3b895d746f4629fb9308d5a3ce4b6d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636595028811616806&sdata=tziqrFbdLz01nWy23JU3Yd79rZLto1kXHro0fGz2WN4%3D&reserved=0 From vacingforo at gmail.com Tue Apr 17 19:33:35 2018 From: vacingforo at gmail.com (vacingforo) Date: Tue, 17 Apr 2018 16:33:35 -0700 (MST) Subject: [vtkusers] Interactor mouse events without disable rotation vtkActors Message-ID: <1524008015351-0.post@n5.nabble.com> This code is a selector actor. Once one actor is selected it prints the high of the respective selected actor. the problem is that the rotation and dragging is disable in the interactor and I want to include it. *// Handle mouse events class MouseInteractorStyle5 : public vtkInteractorStyleTrackballActor { public: static MouseInteractorStyle5* New(); vtkTypeMacro(MouseInteractorStyle5, vtkInteractorStyleTrackballActor); virtual void OnLeftButtonDown() { // Forward events vtkInteractorStyleTrackballActor::OnLeftButtonDown(); for (auto it = actors.begin(); it != actors.end(); ++it) { if(this->InteractionProp == (*it)) { std::cout << "Actor high: " << (*it)->GetMapper()->GetInput()->GetPoint(0)[2] << std::endl; } } } std::vector> actors; }; vtkStandardNewMacro(MouseInteractorStyle5); void actorsMouseInteractor(const std::vector> & actors) { // A renderer and render window vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); // An interactor vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); // Set the custom stype to use for interaction. vtkSmartPointer style = vtkSmartPointer::New(); style->SetDefaultRenderer(renderer); style->actors = actors; renderWindowInteractor->SetInteractorStyle(style); renderer->AddActor(getPlatformActor()); for (auto it = actors.begin(); it != actors.end(); ++it) { renderer->AddActor(*it); } renderer->SetBackground(.1, .2, .4); renderWindow->Render(); renderWindow->SetSize(renderWindow->GetScreenSize()); renderWindowInteractor->Start(); }* the output is for example the position in Z: Actor high: 1.800 -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Tue Apr 17 21:29:39 2018 From: minpu.code at gmail.com (pnt1614) Date: Tue, 17 Apr 2018 18:29:39 -0700 (MST) Subject: [vtkusers] How to combine two polys and do a clipping on the merged poly? Message-ID: <1524014979026-0.post@n5.nabble.com> I want to append 2 polys (A and B) and then use a contour to perform a clipping on the merged poly. To do that, I generate a quad connecting A with B and use vtkAppendPolyData to make a merged poly. After that, I use a contour to do a clipping on the merged poly using vtkClipPolyData but there is something wrong. Instead of the merged poly with hole, the result is one of two original polys (A or B) with a hole. Is there any document explaining how vtkAppendPolyData and vtkClipPolyData work?. I also tried to check the connectivity of the merged poly using vtkConnectivityFilter but it seems that A and B are still separated. Is there anyone experienced this problem? Please, help me. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From gohlinchia at gmail.com Wed Apr 18 02:00:52 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Tue, 17 Apr 2018 23:00:52 -0700 (MST) Subject: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go In-Reply-To: References: Message-ID: <1524031252087-0.post@n5.nabble.com> Hi Aashish, I'm not sure what specific reason(s) that Brian Davis would want the vtkVolumeTextureMapper3D back; we want it back too. For our case, it is because the new CPU/GPU ray cast volume mapper is not working correctly when depth peeling is enabled (for multiple volumes) and also when rendering the scene in stereo (left and right images are the same). I think it is good to have a backup when the only volume mapper doesn't work. http://vtk.1045678.n5.nabble.com/Stereo-problem-for-ray-cast-volumes-td5746483.html Thanks. ----- Chris -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From weiherer.maximilian at gmx.de Wed Apr 18 04:03:06 2018 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Wed, 18 Apr 2018 10:03:06 +0200 Subject: [vtkusers] Lattice structures with VTK Message-ID: <000601d3d6eb$af17d670$0d478350$@gmx.de> Hi all, I am currently trying to fill a surface mesh with some volume. Therefore, the volume should consist of kind of a lattice structure (for example, the lattice structure could be made of cubes, hexahedra or dodecahedrons.). Is it possible to generate lattice structures with VTK? Any help would be appreciated! Best regards Maximilian -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Apr 18 09:28:57 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 18 Apr 2018 09:28:57 -0400 Subject: [vtkusers] Lattice structures with VTK In-Reply-To: <000601d3d6eb$af17d670$0d478350$@gmx.de> References: <000601d3d6eb$af17d670$0d478350$@gmx.de> Message-ID: Maximillian, You could create a cubic lattice structure without too much work. See this example: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ You can add a vtkThreshold to extract just the portions of the image data falling inside your original surface. HTH, Cory On Wed, Apr 18, 2018 at 4:03 AM, Maximilian Weiherer < weiherer.maximilian at gmx.de> wrote: > Hi all, > > > > I am currently trying to fill a surface mesh with some volume. Therefore, > the volume should consist of kind of a lattice structure (for example, the > lattice structure could be made of cubes, hexahedra or dodecahedrons?). Is > it possible to generate lattice structures with VTK? > > > > Any help would be appreciated! > > > > Best regards > > Maximilian > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Wed Apr 18 10:06:37 2018 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 18 Apr 2018 14:06:37 +0000 Subject: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go In-Reply-To: <1524031252087-0.post@n5.nabble.com> References: <1524031252087-0.post@n5.nabble.com> Message-ID: If there are errors in the current GPU volume mapper then they certainly have to be fixed, but I would rather have only one GPU volume mapper in VTK, which works well. If there were different variants then developers attention might be divided between them and developers may be distracted by users asking help for unsupported classes. Until error in the current GPU volume mapper is fixed, you can build the old mapper as part of your application or keep using an earlier VTK version. Andras -----Original Message----- From: vtkusers On Behalf Of gohlinchia Sent: Wednesday, April 18, 2018 2:01 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go Hi Aashish, I'm not sure what specific reason(s) that Brian Davis would want the vtkVolumeTextureMapper3D back; we want it back too. For our case, it is because the new CPU/GPU ray cast volume mapper is not working correctly when depth peeling is enabled (for multiple volumes) and also when rendering the scene in stereo (left and right images are the same). I think it is good to have a backup when the only volume mapper doesn't work. https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FStereo-problem-for-ray-cast-volumes-td5746483.html&data=02%7C01%7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata=VL9VNwj%2F%2FkJf1QGh6N719ADFFce3vuT1oYfyicRUltU%3D&reserved=0 Thanks. ----- Chris -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata=mT2Mda%2BJ81vR5tQVykWI94ZZVaTp9V5sMdVZur8bhX0%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata=jc06Ns3NypmJNdAxx2cYlc7Su%2FwLjOBpDRim6o9pO%2B0%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata=K6rCaXoPbeD1OsPAByfcOxY0Y42ZUdgHi32mEjfyh2Q%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata=PWgbdBAAXwC%2BxXSEjX2a7KwuMfJUgCUmYI%2FRmC52g6U%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata=ziLxJzClC8oszuwHNmdmXb4BPaRSYHyrKh65oEys6BY%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata=2VjsrQPJEPdb16otIs5Tih9rZw4NsHxSQUVHLZ1zpJg%3D&reserved=0 From aashish.chaudhary at kitware.com Wed Apr 18 10:36:50 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 18 Apr 2018 10:36:50 -0400 Subject: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go In-Reply-To: <1524031252087-0.post@n5.nabble.com> References: <1524031252087-0.post@n5.nabble.com> Message-ID: Chris, The issue with depth peeling should have been fixed now (try the latest master). As far as the stereo is concerned. that is puzzling. Can you tell us more about the stereo problem (apologies if you have sent it already). In the past we used volume rendering in CAVE and in HMD using OpenVR and they both seems to be working fine. thanks, On Wed, Apr 18, 2018 at 2:00 AM, gohlinchia wrote: > Hi Aashish, > > I'm not sure what specific reason(s) that Brian Davis would want the > vtkVolumeTextureMapper3D back; we want it back too. > > For our case, it is because the new CPU/GPU ray cast volume mapper is not > working correctly when depth peeling is enabled (for multiple volumes) and > also when rendering the scene in stereo (left and right images are the > same). I think it is good to have a backup when the only volume mapper > doesn't work. > > http://vtk.1045678.n5.nabble.com/Stereo-problem-for-ray- > cast-volumes-td5746483.html > > Thanks. > > > > ----- > Chris > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Apr 18 10:37:58 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 18 Apr 2018 10:37:58 -0400 Subject: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go In-Reply-To: References: <1524031252087-0.post@n5.nabble.com> Message-ID: On Wed, Apr 18, 2018 at 10:06 AM, Andras Lasso wrote: > If there are errors in the current GPU volume mapper then they certainly > have to be fixed, but I would rather have only one GPU volume mapper in > VTK, which works well. that was the core idea.. we had too many mappers and it was hard to maintain / update and there was lot of overlap in features. we should fix the issues instead. - aashish > If there were different variants then developers attention might be > divided between them and developers may be distracted by users asking help > for unsupported classes. > > Until error in the current GPU volume mapper is fixed, you can build the > old mapper as part of your application or keep using an earlier VTK version. > > Andras > > -----Original Message----- > From: vtkusers On Behalf Of gohlinchia > Sent: Wednesday, April 18, 2018 2:01 AM > To: vtkusers at vtk.org > Subject: Re: [vtkusers] nightly build (8.1.0?) where did > vtkVolumeTextureMapper3D go > > Hi Aashish, > > I'm not sure what specific reason(s) that Brian Davis would want the > vtkVolumeTextureMapper3D back; we want it back too. > > For our case, it is because the new CPU/GPU ray cast volume mapper is not > working correctly when depth peeling is enabled (for multiple volumes) and > also when rendering the scene in stereo (left and right images are the > same). I think it is good to have a backup when the only volume mapper > doesn't work. > > https://na01.safelinks.protection.outlook.com/?url= > http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FStereo-problem- > for-ray-cast-volumes-td5746483.html&data=02%7C01%7Classo%40queensu.ca% > 7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636596280575717138&sdata=VL9VNwj%2F% > 2FkJf1QGh6N719ADFFce3vuT1oYfyicRUltU%3D&reserved=0 > > Thanks. > > > > ----- > Chris > -- > Sent from: https://na01.safelinks.protection.outlook.com/?url= > http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users- > f1224199.html&data=02%7C01%7Classo%40queensu.ca% > 7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636596280575717138&sdata=mT2Mda% > 2BJ81vR5tQVykWI94ZZVaTp9V5sMdVZur8bhX0%3D&reserved=0 > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url= > www.kitware.com&data=02%7C01%7Classo%40queensu.ca% > 7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636596280575717138&sdata=jc06Ns3NypmJNdAxx2cYlc7Su% > 2FwLjOBpDRim6o9pO%2B0%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks. > protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com% > 2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca% > 7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636596280575717138&sdata=K6rCaXoPbeD1OsPAByfcOxY0Y42ZUd > gHi32mEjfyh2Q%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url= > http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01% > 7Classo%40queensu.ca%7C48731a4ab5f7413b596f08d5a4f1c011% > 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636596280575717138&sdata= > PWgbdBAAXwC%2BxXSEjX2a7KwuMfJUgCUmYI%2FRmC52g6U%3D&reserved=0 > > Search the list archives at: https://na01.safelinks. > protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org% > 2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca% > 7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636596280575717138&sdata=ziLxJzClC8oszuwHNmdmXb4BPaRSYH > yrKh65oEys6BY%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org% > 2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca% > 7C48731a4ab5f7413b596f08d5a4f1c011%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636596280575717138&sdata=2VjsrQPJEPdb16otIs5Tih9rZw4NsH > xSQUVHLZ1zpJg%3D&reserved=0 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at cascadeacoustic.com Wed Apr 18 20:56:12 2018 From: mark at cascadeacoustic.com (Mark DeArman) Date: Wed, 18 Apr 2018 19:56:12 -0500 Subject: [vtkusers] Activiz 7.1.1 In-Reply-To: <1523671836797-0.post@n5.nabble.com> References: <798bd98642b747d0a61073f719afddb5@cascadeacoustic.com> <1523671836797-0.post@n5.nabble.com> Message-ID: <4e7150c139ba40b7bc4e7671b6093c3f@cascadeacoustic.com> Unfortunately, I have not produced a 64-bit build this time, and most likely will not get to it in a reasonable amount of time. Perhaps contact one of the github members from the issue list, as I know a few of them successfully built it. I did produce a 64-bit build of v6.2 before, and had no issues doing so, except for the step where Activiz packages the runtime redist dependencies. You'll have to fix the CMakeLists.txt file. And also inspect your system CMake modules if using CMake v3.8 or newer. I finished a new build of 32bit VTK-7.1.1 with the latest version of HDF5 in the past couple days. And also rebuilt Activiz against the new VTK. In doing I updated CMake to the v3.10 and there are now a number of errors in the CMake Modules for Intel C++ x86 vs x64. So I would keep an eye on those areas. There maybe other issues lurking about with Release vs Debug and x86 vs x64. And for other users, who had wondered about building the Documentation. I tested the doxygen generation all the way through to Activiz, and it appears to work fine. Requires Perl, graphviz dot, MiTex and HTML Help Workshop. There's an issue with the latest MiTex ghost script, where you'll need to link mgs.exe to gswin32c.exe since Doxygen does not appear to have a variable to control the Ghostscript binary. Live and learn, that cost we a lot of wasted time to figure out. Mark DeArman Cascade Acoustic Research http://www.cascadeacoustic.com (253) 200-5353 ---------------------------------------- From: "KM" Sent: Friday, April 13, 2018 7:11 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Activiz 7.1.1 Hi Mark, I tried unsuccessfully to compile ActiViz 7.1 and found your post, is there any chance you have 64bit version compiled and willing to share ? I'm loading large files and need 64bit. Thanks MK -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From gohlinchia at gmail.com Thu Apr 19 04:33:11 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Thu, 19 Apr 2018 01:33:11 -0700 (MST) Subject: [vtkusers] nightly build (8.1.0?) where did vtkVolumeTextureMapper3D go In-Reply-To: References: <1524031252087-0.post@n5.nabble.com> Message-ID: <1524126791490-0.post@n5.nabble.com> Hi Andras & Aashish, Thanks for explaining the issue. I have a better understanding of the problems you guys are facing now. Thanks also for fixing the two previous issues I mentioned. I downloaded the latest master from GitHub and verified that the bugs are fixed. Speaking of problems, I hope I can tag on to this thread to sound out two of the problems we are facing now with the GPU ray cast volume renderer: 1. The first is the incorrect stereo rendering as mentioned before. The two viewpoints generated are the same except that they are slightly offset to give the illusion of stereoscopic rendering. This same problem also appears in ParaView 5.4.1. This problem only seem to affect ray cast volume rendering and not the polygonal meshes. The horizontal left-right split viewports shows this very clearly: We suspect that while rendering the ray cast volumes, the same viewpoint/perspective matrix was used in both the left and right views. 2. The second problem we encounter is that ray cast volume renderer doesn't seem to work well when volume depth peeling is activated. I can't explain it very well, but it seems to us that the depth peeling of ray cast volumes doesn't seem to be depth correct. The rendering looks better than it is without depth peeling but at certain angles, it feels as if the depth peeling has no effect at all. I have attached the following images to help explain what we are seeing: This image shows two volumes (MRI is grey and CT is yellowish) rendered without depth peeling. The CT is almost fully occluded. The next image shows the same two volumes rendered with depth peeling activated. As you can see, the CT (yellowish) is smaller than the MRI (grey) and the CT is almost fully enclosed within the MRI. The following series of images shows the rendering effect with depth peeling activated, as viewed from different angles. The CT should be partially/mostly occluded by the MRI because it is a physically smaller volume that is located/enclosed within the MRI itself. But as the series of images shows, it looks as if the CT is floating outside of the MRI or that the depth peeling is deactivated (it is activated, we checked). We wonder what could be the problem. Thank you so much! ----- Chris -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From karanovicm at gmail.com Thu Apr 19 12:24:31 2018 From: karanovicm at gmail.com (KM) Date: Thu, 19 Apr 2018 09:24:31 -0700 (MST) Subject: [vtkusers] Activiz 7.1.1 In-Reply-To: <4e7150c139ba40b7bc4e7671b6093c3f@cascadeacoustic.com> References: <798bd98642b747d0a61073f719afddb5@cascadeacoustic.com> <1523671836797-0.post@n5.nabble.com> <4e7150c139ba40b7bc4e7671b6093c3f@cascadeacoustic.com> Message-ID: <1524155071300-0.post@n5.nabble.com> Not a problem Mark, just wondering, I'm using VTK 6.3 and having some issues with slicing through polyhedron cells, and wondered if that is fixed in some later versions. Thanks for you response. MK -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Thu Apr 19 19:40:40 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 19 Apr 2018 16:40:40 -0700 (MST) Subject: [vtkusers] How to reset a contour widget manually? Message-ID: <1524181240326-0.post@n5.nabble.com> I can reset a contour widget by pressing Shift + Delete key but I do not know how to reset a contour widget manually. I have tried to invoke the Initialize(nullptr) function but it did not work. Is there anyone experienced this problem? Please, help me. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bebe0705 at colorado.edu Thu Apr 19 20:10:11 2018 From: bebe0705 at colorado.edu (BBerco) Date: Thu, 19 Apr 2018 17:10:11 -0700 (MST) Subject: [vtkusers] Homebrew and VTK: missing cmake options for QVTKWidget Message-ID: <1524183011715-0.post@n5.nabble.com> I am working on a piece of software I want to distribute using Homebrew. My program features a GUI built around a QVTKWidget. After a lot of trial and error, I think that the cmake flags I need to set up the VTK install to work with the QVTK Widgtet are * -G "Unix Makefiles" -DVTK_USE_QVTK:BOOL=ON -DVTK_USE_GUISUPPORT:BOOL=ON -DVTK_Group_Qt:BOOL=ON -DModule_vtkIOExportOpenGL2:BOOL=ON -DVTK_USE_CXX11_FEATURES:BOOL=ON -DVTK_RENDERING_BACKEND:STRING=OpenGL2 * However, the VTK formula currently on tap does not allow these options to be set. Editing the formula with brew edit is not really an option since each end user would have to fix it too. Is there another way to tell VTK to be built with these flags? If not, is is possible to add a -with-qvtk option to the formula? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Thu Apr 19 22:22:28 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 19 Apr 2018 19:22:28 -0700 (MST) Subject: [vtkusers] Get actual position of actor from an assembly after applying transforms In-Reply-To: <1522342484646-0.post@n5.nabble.com> References: <1522342484646-0.post@n5.nabble.com> Message-ID: <1524190948186-0.post@n5.nabble.com> You can use a smart pointer referring to the assembly's matrix. In that way, you can access to the assembly's matrix after transformation. vtkSmartPointer m = vtkSmartPointer::New(); m = your_assembly->GetMatrix(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Fri Apr 20 09:18:18 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 20 Apr 2018 13:18:18 +0000 Subject: [vtkusers] Homebrew and VTK: missing cmake options for QVTKWidget In-Reply-To: <1524183011715-0.post@n5.nabble.com> References: <1524183011715-0.post@n5.nabble.com> Message-ID: Hi, Which tap/bottle do you use? The tap - robotlocomotion/director has those configurable options. Hope that helps! Sankhesh ? On Thu, Apr 19, 2018 at 8:10 PM BBerco wrote: > I am working on a piece of software I want to distribute using Homebrew. My > program features a GUI built around a QVTKWidget. > > After a lot of trial and error, I think that the cmake flags I need to set > up the VTK install to work with the QVTK Widgtet are > * > -G "Unix Makefiles" -DVTK_USE_QVTK:BOOL=ON -DVTK_USE_GUISUPPORT:BOOL=ON > -DVTK_Group_Qt:BOOL=ON -DModule_vtkIOExportOpenGL2:BOOL=ON > -DVTK_USE_CXX11_FEATURES:BOOL=ON -DVTK_RENDERING_BACKEND:STRING=OpenGL2 > * > However, the VTK formula currently on tap does not allow these options to > be > set. Editing the formula with brew edit is not really an option since each > end user would have to fix it too. > > Is there another way to tell VTK to be built with these flags? If not, is > is > possible to add a -with-qvtk option to the formula? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Fri Apr 20 10:53:24 2018 From: juch at zhaw.ch (normanius) Date: Fri, 20 Apr 2018 07:53:24 -0700 (MST) Subject: [vtkusers] How to use vtkDebugMacro In-Reply-To: <21A12AE0-1D2B-496F-86A1-BF3D0497DB10@bluequartz.net> References: <32B94E87-0E45-4ECE-8537-1931CF82CE90@mac.com> <21A12AE0-1D2B-496F-86A1-BF3D0497DB10@bluequartz.net> Message-ID: <1524236004839-0.post@n5.nabble.com> Hi, Although this is a pretty old thread, I have a followup question on this one.The debug messages are disabled by default. I thought that I can enable output using the DebugOn() option. However, the following does not work for me:I would expect to see a message "SphereSource Executing piece index xx of yy pieces". (See here .)So how to enable the output on console? I am working in Python.Thanks for any hints.Norman -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Sat Apr 21 12:21:55 2018 From: rabysam28 at gmail.com (Sam Raby) Date: Sat, 21 Apr 2018 09:21:55 -0700 Subject: [vtkusers] vtkGlyph3D Message-ID: Hello, I have an easy question, I think. I have hundreds of points in the 3D space. I need to visualize each of these points by a small 2D square, which I implemented. Therefore I have now hundreds of these small squares in the 3D space. However the issue is as follows: When I rotate the scene, while all the squares are naturally moving in respect to the camera, I want all of the squares keep their orientation towards the camera and still be constantly facing the camera. I know if I use vtkFollower I could do this, but not sure how to do it for these MANY squares in the scene. My pipeline is as follows => All my points are stored in one single vtkPolydata and I have assigned a vtkSourcePlane to each of these points using vtkGlyph3D. Thanks for any feedback. -Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Sun Apr 22 15:01:47 2018 From: rabysam28 at gmail.com (Sam Raby) Date: Sun, 22 Apr 2018 12:01:47 -0700 Subject: [vtkusers] vtkPoint Message-ID: Hi When we use vtkPoint or vtkPointSource, as we zoom in and out, the size of points does not change. Is there a way to enable this so that zoom in and out can change the size of point? Thanks S -------------- next part -------------- An HTML attachment was scrubbed... URL: From noeckera at gmail.com Sun Apr 22 18:34:46 2018 From: noeckera at gmail.com (Angela Noecker) Date: Sun, 22 Apr 2018 18:34:46 -0400 Subject: [vtkusers] vtkPoint In-Reply-To: References: Message-ID: <22F26B9D-D860-4FAE-8C40-59E57D2EDE1D@gmail.com> I add a glyph. > On Apr 22, 2018, at 3:01 PM, Sam Raby wrote: > > Hi > When we use vtkPoint or vtkPointSource, as we zoom in and out, the size of points does not change. Is there a way to enable this so that zoom in and out can change the size of point? > Thanks > S > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From castellanoslizan at gmail.com Sun Apr 22 19:20:36 2018 From: castellanoslizan at gmail.com (Lizeth Castellanos) Date: Sun, 22 Apr 2018 20:20:36 -0300 Subject: [vtkusers] Visualizing HSV color information from a 3D medical dataset Message-ID: Hello vtk-users, I want to visualize a medical dataset using the HSV model color. I found this great VTK example that works very well https://lorensen.github.io/VTKExamples/site/Python/VisualizationAlgorithms/ImageGradient/ However, this example use the vtkImageViewer class and the output is only one slice of the dataset. Anyone knows what mapper could be used to visualize the same output but in a 3D way? Any help provided for this would be greatly appreciated! Here the code of the example: import vtk def main(): fileName = get_program_parameters() colors = vtk.vtkNamedColors() # Read the CT data of the human head. reader = vtk.vtkMetaImageReader() reader.SetFileName(fileName) reader.Update() cast = vtk.vtkImageCast() cast.SetInputConnection(reader.GetOutputPort()) cast.SetOutputScalarTypeToFloat() # Magnify the image. magnify = vtk.vtkImageMagnify() magnify.SetInputConnection(cast.GetOutputPort()) magnify.SetMagnificationFactors(2, 2, 1) magnify.InterpolateOn() # Smooth the data. # Remove high frequency artifacts due to linear interpolation. smooth = vtk.vtkImageGaussianSmooth() smooth.SetInputConnection(magnify.GetOutputPort()) smooth.SetDimensionality(2) smooth.SetStandardDeviations(1.5, 1.5, 0.0) smooth.SetRadiusFactors(2.01, 2.01, 0.0) # Compute the 2D gradient. gradient = vtk.vtkImageGradient() gradient.SetInputConnection(smooth.GetOutputPort()) gradient.SetDimensionality(2) # Convert the data to polar coordinates. # The image magnitude is mapped into saturation value, # whilst the gradient direction is mapped into hue value. polar = vtk.vtkImageEuclideanToPolar() polar.SetInputConnection(gradient.GetOutputPort()) polar.SetThetaMaximum(255.0) # Add a third component to the data. # This is needed since the gradient filter only generates two components, # and we need three components to represent color. pad = vtk.vtkImageConstantPad() pad.SetInputConnection(polar.GetOutputPort()) pad.SetOutputNumberOfScalarComponents(3) pad.SetConstant(200.0) # At this point we have Hue, Value, Saturation. # Permute components so saturation will be constant. # Re-arrange components into HSV order. permute = vtk.vtkImageExtractComponents() permute.SetInputConnection(pad.GetOutputPort()) permute.SetComponents(0, 2, 1) # Convert back into RGB values. rgb = vtk.vtkImageHSVToRGB() rgb.SetInputConnection(permute.GetOutputPort()) rgb.SetMaximum(255.0) # Set up a viewer for the image. # Note that vtkImageViewer and vtkImageViewer2 are convenience wrappers around # vtkActor2D, vtkImageMapper, vtkRenderer, and vtkRenderWindow. # So all that needs to be supplied is the interactor. viewer = vtk.vtkImageViewer() viewer.SetInputConnection(rgb.GetOutputPort()) viewer.SetZSlice(22) viewer.SetColorWindow(255.0) viewer.SetColorLevel(127.0) viewer.GetRenderWindow().SetSize(512, 512) viewer.GetRenderer().SetBackground(colors.GetColor3d("Silver")) # Create the RenderWindowInteractor. iren = vtk.vtkRenderWindowInteractor() viewer.SetupInteractor(iren) viewer.Render() iren.Initialize() iren.Start() def get_program_parameters(): import argparse description = 'ImageGradient.' epilogue = ''' Visualization of gradient information. ''' parser = argparse.ArgumentParser(description=description, epilog=epilogue, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('fileName', help='The file FullHead.mhd. Note: file FullHead.raw.gz must also be present in the same folder.') args = parser.parse_args() return args.fileName if __name__ == '__main__': main() -- Lizeth Castellanos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From minpu.code at gmail.com Sun Apr 22 22:35:32 2018 From: minpu.code at gmail.com (pnt1614) Date: Sun, 22 Apr 2018 19:35:32 -0700 (MST) Subject: [vtkusers] vtkSelectPolyData:Can't follow edge In-Reply-To: <1387091858150-5725029.post@n5.nabble.com> References: <1387091858150-5725029.post@n5.nabble.com> Message-ID: <1524450932037-0.post@n5.nabble.com> I have the same problem even though my inputs (points) are correct. Is this a VTK bug? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From simon.woelfer at tuhh.de Mon Apr 23 07:08:47 2018 From: simon.woelfer at tuhh.de (jonas1993) Date: Mon, 23 Apr 2018 04:08:47 -0700 (MST) Subject: [vtkusers] vtkOBBTree - Some OBBs contain too much cells Message-ID: <1524481727486-0.post@n5.nabble.com> Hello, I want to test 2 OBB-trees for collisions, generated from STL-files. When running "IntersectWithOBBTree", most of the leaf node OBBs contain 2 Cells. ("SetNumberOfCellsPerNode(2)") But for some reason many OBBs contain far more than 100 and some even more than 1000 cells.. Any Ideas what could cause this Problem? best regard Jonas -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Robert.Atwood at diamond.ac.uk Mon Apr 23 06:52:08 2018 From: Robert.Atwood at diamond.ac.uk (Robert.Atwood at diamond.ac.uk) Date: Mon, 23 Apr 2018 10:52:08 +0000 Subject: [vtkusers] Python/VTK offscreen / headless rendering Message-ID: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> Hi, I would like to have a Python script to render several volume images (tomography data) on a headless machine. I could not find any advice more recent than 2011 , is this something that just isn't configured in the Python as installed from existing packages? How do I tell? If it's not in the python , what needs to be done, at the time of prior questions it seemed to be a compile-time option of the VTK library, is that still the case, Any exaples on line that are for the current release ? Thanks Robert -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom From shawn.waldon at kitware.com Mon Apr 23 09:05:22 2018 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Mon, 23 Apr 2018 09:05:22 -0400 Subject: [vtkusers] vtkSelectPolyData:Can't follow edge In-Reply-To: <1524450932037-0.post@n5.nabble.com> References: <1387091858150-5725029.post@n5.nabble.com> <1524450932037-0.post@n5.nabble.com> Message-ID: Hi, You seem to be replying to an old thread, but I don't see the rest of the conversation. Since others are probably in the same position, can you give more details about the problem you are seeing? We won't be able to help you unless we know what the problem is. Thank you, Shawn On Sun, Apr 22, 2018 at 10:35 PM, pnt1614 wrote: > I have the same problem even though my inputs (points) are correct. Is > this a > VTK bug? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayavardhanravi at outlook.com Mon Apr 23 09:56:02 2018 From: jayavardhanravi at outlook.com (Jay) Date: Mon, 23 Apr 2018 06:56:02 -0700 (MST) Subject: [vtkusers] Get actual position of actor from an assembly after applying transforms In-Reply-To: <1524190948186-0.post@n5.nabble.com> References: <1522342484646-0.post@n5.nabble.com> <1524190948186-0.post@n5.nabble.com> Message-ID: <1524491762706-0.post@n5.nabble.com> I tried to get the data from the actors using the vtkMatrix4x4 after the transform but the matrix doesn't change after the transformation. I am not sure if i am accessing the matrix in the incorrect way or incorrect location. I had attached sample working code with which I had tested. Sample.txt -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Mon Apr 23 11:28:53 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 23 Apr 2018 15:28:53 +0000 Subject: [vtkusers] vtkGlyph3D In-Reply-To: References: Message-ID: Hi Sam, While you could use the vtkFollower approach, a better performing approach would be using the vtkPointGaussianMapper . See the ParaView blog post for examples. *Note:* You would have to write your own shader preset to render 2D squares. Hope that helps, Sankhesh ? On Sat, Apr 21, 2018 at 12:22 PM Sam Raby wrote: > Hello, > > > I have an easy question, I think. > > > I have hundreds of points in the 3D space. I need to visualize each of > these points by a small 2D square, which I implemented. Therefore I have > now hundreds of these small squares in the 3D space. However the issue is > as follows: > > When I rotate the scene, while all the squares are naturally moving in > respect to the camera, I want all of the squares keep their orientation > towards the camera and still be constantly facing the camera. I know if I > use vtkFollower I could do this, but not sure how to do it for these MANY > squares in the scene. My pipeline is as follows => All my points are stored > in one single vtkPolydata and I have assigned a vtkSourcePlane to each of > these points using vtkGlyph3D. > > > Thanks for any feedback. > > > -Sam > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Mon Apr 23 15:44:54 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Mon, 23 Apr 2018 19:44:54 +0000 Subject: [vtkusers] vtkMultiVolume and shading Message-ID: Hello, I'm experimenting with using vtkMultiVolume to add proper multi-volume rendering support into 3D Slicer. My main question is the reason behind this actor not supporting shading, as apparent when used, but also mentioned in the corresponding test: https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastMultiVolumeOverlapping.cxx#L229 Is this a technical limitation that would be very hard to overcome, or is it something simpler? I'm asking this because for this actor to be really used for volume rendering, shading would be necessary. Thank you, Csaba -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Apr 23 16:02:10 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 23 Apr 2018 13:02:10 -0700 Subject: [vtkusers] VTK Textbook Efforts Update Message-ID: Folks, We are pleased to provide an update on efforts to update the online resources for the fourth edition of the VTK textbook There are 3 coordinated efforts ongoing each with a different goal. Currently, none of the efforts will rewrite sections of the fourth edition. These are the first steps to a possible fifth edition, but that effort will require significant resources. 1) The printed and free online PDF of the VTK textbook is the gold standard for this edition. The online PDF is a low-resolution version that exhibits some difficulty converting equations. It is available as one, downloadable PDF with no active links. FrameMaker produces the PDF from FrameMaker files capable of producing different PDF resolutions. Editing the FrameMaker files requires a license from Adobe. It is unlikely the VTK community will have access to these proprietary files. Major contributors include Will Schroeder and other Kitware employees. See: https://www.vtk.org/vtk-textbook/ 2) A VTK latex version of the VTK textbook is a work-in-progress effort. The goal is to produce a Latex version populated with links to figures, references, equations, examples, etc. The PDF version is downloadable as a single file. The figures that exist as VTK Examples are linked to the nightly output of the regression testing. Once this work is stable, the user community will be able to push merge requests to fix problems with the Latex. The major contributor is Andrew Maclean. You can follow the progress here: https://lorensen.github.io/VTKExamples/site/VTKBookLaTex/VTKTextBook/ 3) A markdown version of the VTK textbook is also a work-in-progress. The goal is to produce an interactive, platform friendly version of the book. The entire text is available on as a Chapter by Chapter website. The figures that exist as VTK Examples are linked to the nightly output of the regression testing. Once this work is stable, the user community will be able to push merge requests to fix problems with the markdown. The major contributors are Bill Lorensen and Bernhard Meehan. Bernhard has produced Latex for all 100 equations in the text. You can follow the progress here: https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter1/ and other chapters. When the Latex and Markdown versions are more complete, we will ask the user community to help proofread the new versions. Bill -- Unpaid intern in BillsParadise at noware dot com From sankhesh.jhaveri at kitware.com Mon Apr 23 21:15:17 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 24 Apr 2018 01:15:17 +0000 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: Hi Csaba, I don?t believe there is a technical limitation. It was merely that the original effort for adding multiple overlapping volumes support was focused on selected features. I am not aware of current efforts/funding to add support for additional features like shading, different blend modes, etc. Thanks, Sankhesh ? On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter wrote: > Hello, > > > > I?m experimenting with using vtkMultiVolume to add proper multi-volume > rendering support into 3D Slicer. My main question is the reason behind > this actor not supporting shading, as apparent when used, but also > mentioned in the corresponding test: > > > https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastMultiVolumeOverlapping.cxx#L229 > > Is this a technical limitation that would be very hard to overcome, or is > it something simpler? I?m asking this because for this actor to be really > used for volume rendering, shading would be necessary. > > > > Thank you, > > Csaba > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_geus at hotmail.com Tue Apr 24 07:48:33 2018 From: paul_geus at hotmail.com (pauldoesntlikesurfaceextractio) Date: Tue, 24 Apr 2018 04:48:33 -0700 (MST) Subject: [vtkusers] Visualizing a surface Message-ID: <1524570513469-0.post@n5.nabble.com> Dear all, I have a set of points (around 0.5 million) and I want to visualize these as a surface/volume. I am programming in c++ and using vtk 8.0 I have extracted the surface points of the dataset to reduce the size. The points show an arbitrary timestep of a dambreak. I have tried the following approaches: VTKExtractSurface; Problem: The wave is not shown accurately. I have tried increasing the samplesize for the normals, Decreasing the radius for the calculation of the distances and smoothing the surface. The Result was not satisfactory (https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurface/) Delaunay3D; Problem: Mainly useable for convex shapes and the triangle visualization is not nice for a fluid, further problem: Alpha value needs to be adjusted for each simulation Marching Cubes; Problem: I can't get it to work, I have basically copied every step from the tutorial: https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/MarchingCubes/ I can't understand where i went wrong there GaussianSplatter; Problem: The Points(spheres) are visible, this means it is not a surface, but spheres test2.xyz which overlap. What other approach is there? Am I maybe using the one of the features wrong? I have attached my points below. Kind regards and hopefully someone can help me :) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From csaba.pinter at queensu.ca Tue Apr 24 09:15:44 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Tue, 24 Apr 2018 13:15:44 +0000 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: Hi Sankhesh, Thanks for the quick answer! Just in a nutshell, what would be needed to do programming-wise to add shading in the code? Also I?m wondering if the situation about funding applies to bugfixes as well? I am struggling with issues related to per-volume visibility and user transforms, and I think I?ll get back to you soon with self-contained test cases once I was able to figure out which of these are on the VTK side and how to reproduce them easily. Thanks, csaba From: Sankhesh Jhaveri Sent: Monday, April 23, 2018 21:15 To: Csaba Pinter Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkMultiVolume and shading Hi Csaba, I don?t believe there is a technical limitation. It was merely that the original effort for adding multiple overlapping volumes support was focused on selected features. I am not aware of current efforts/funding to add support for additional features like shading, different blend modes, etc. Thanks, Sankhesh ? On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter > wrote: Hello, I?m experimenting with using vtkMultiVolume to add proper multi-volume rendering support into 3D Slicer. My main question is the reason behind this actor not supporting shading, as apparent when used, but also mentioned in the corresponding test: https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastMultiVolumeOverlapping.cxx#L229 Is this a technical limitation that would be very hard to overcome, or is it something simpler? I?m asking this because for this actor to be really used for volume rendering, shading would be necessary. Thank you, Csaba _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Apr 24 10:16:53 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 24 Apr 2018 14:16:53 +0000 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: Hi Csaba, Programming wise, the missing component is support for calculating gradients across different volumes in the shader composer. Please feel free to report bugs on VTK?s issue tracker. If it is a relatively simple thing, we can fix it quickly. Thanks, Sankhesh ? On Tue, Apr 24, 2018 at 9:15 AM Csaba Pinter wrote: > Hi Sankhesh, > > > > Thanks for the quick answer! Just in a nutshell, what would be needed to > do programming-wise to add shading in the code? > > > > Also I?m wondering if the situation about funding applies to bugfixes as > well? I am struggling with issues related to per-volume visibility and user > transforms, and I think I?ll get back to you soon with self-contained test > cases once I was able to figure out which of these are on the VTK side and > how to reproduce them easily. > > > > Thanks, > > csaba > > > > *From:* Sankhesh Jhaveri > *Sent:* Monday, April 23, 2018 21:15 > *To:* Csaba Pinter > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkMultiVolume and shading > > > > Hi Csaba, > > I don?t believe there is a technical limitation. It was merely that the > original effort for adding multiple overlapping volumes support was focused > on selected features. I am not aware of current efforts/funding to add > support for additional features like shading, different blend modes, etc. > > Thanks, > Sankhesh > > ? > > > > On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter > wrote: > > Hello, > > > > I?m experimenting with using vtkMultiVolume to add proper multi-volume > rendering support into 3D Slicer. My main question is the reason behind > this actor not supporting shading, as apparent when used, but also > mentioned in the corresponding test: > > > https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastMultiVolumeOverlapping.cxx#L229 > > > Is this a technical limitation that would be very hard to overcome, or is > it something simpler? I?m asking this because for this actor to be really > used for volume rendering, shading would be necessary. > > > > Thank you, > > Csaba > > _______________________________________________ > Powered by www.kitware.com > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > > -- > Sankhesh Jhaveri > *Sr. Research & Development Engineer* | Kitware > > | (518) 881-4417 > > ? > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Apr 24 10:50:55 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 24 Apr 2018 16:50:55 +0200 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: 2018-04-24 15:15 GMT+02:00 Csaba Pinter : > Hi Sankhesh, > > > > Thanks for the quick answer! Just in a nutshell, what would be needed to do > programming-wise to add shading in the code? > > > > Also I?m wondering if the situation about funding applies to bugfixes as > well? I am struggling with issues related to per-volume visibility and user > transforms, and I think I?ll get back to you soon with self-contained test > cases once I was able to figure out which of these are on the VTK side and > how to reproduce them easily. I'm also about to experiment with the multi-volume support. Would be interesting to hear from you what problems you ran into wrt to per-volume visibility / user transforms, so I know what to look out for :) So if you file issues for those it would be great if you could link to them here. Cheers, Elvis > > > > Thanks, > > csaba > > > > From: Sankhesh Jhaveri > Sent: Monday, April 23, 2018 21:15 > To: Csaba Pinter > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkMultiVolume and shading > > > > Hi Csaba, > > I don?t believe there is a technical limitation. It was merely that the > original effort for adding multiple overlapping volumes support was focused > on selected features. I am not aware of current efforts/funding to add > support for additional features like shading, different blend modes, etc. > > Thanks, > Sankhesh > > > > On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter > wrote: > > Hello, > > > > I?m experimenting with using vtkMultiVolume to add proper multi-volume > rendering support into 3D Slicer. My main question is the reason behind this > actor not supporting shading, as apparent when used, but also mentioned in > the corresponding test: > > https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastMultiVolumeOverlapping.cxx#L229 > > Is this a technical limitation that would be very hard to overcome, or is it > something simpler? I?m asking this because for this actor to be really used > for volume rendering, shading would be necessary. > > > > Thank you, > > Csaba > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- > > Sankhesh Jhaveri > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > From csaba.pinter at queensu.ca Tue Apr 24 16:14:30 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Tue, 24 Apr 2018 20:14:30 +0000 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: Hi Sankhesh and Elvis, The first issue that I was now able to confirm is that SetVisibility called on the individual vtkVolume objects within vtkMultiVolume has no effect. Not sure if this is intentional or not, but naively I'd think this is the way to show/hide a volume. I'm not fond of the idea to clear the connection in the mapper and set volume to null every time I want to hide one. The way to reproduce this is for example adding these lines to line 118 in Rendering\Volume\Testing\Cxx\TestGPURayCastMultiVolumeOverlapping.cxx else if (key == "w") { this->Volume->SetVisibility(!this->Volume->GetVisibility()); } If you start the test interactively (-I), then nothing happens if you press w. The other issue is that the user transform I set to the first volume seems to be ignored, while the second volume's transform is used properly. I haven't been able to reproduce it with this test yet, so I'll keep working on it until I find out what is the exact issue. Cheers, csaba -----Original Message----- From: Elvis Stansvik Sent: Tuesday, April 24, 2018 10:51 To: Csaba Pinter Cc: Sankhesh Jhaveri ; vtkusers at vtk.org Subject: Re: [vtkusers] vtkMultiVolume and shading 2018-04-24 15:15 GMT+02:00 Csaba Pinter : > Hi Sankhesh, > > > > Thanks for the quick answer! Just in a nutshell, what would be needed > to do programming-wise to add shading in the code? > > > > Also I?m wondering if the situation about funding applies to bugfixes > as well? I am struggling with issues related to per-volume visibility > and user transforms, and I think I?ll get back to you soon with > self-contained test cases once I was able to figure out which of these > are on the VTK side and how to reproduce them easily. I'm also about to experiment with the multi-volume support. Would be interesting to hear from you what problems you ran into wrt to per-volume visibility / user transforms, so I know what to look out for :) So if you file issues for those it would be great if you could link to them here. Cheers, Elvis > > > > Thanks, > > csaba > > > > From: Sankhesh Jhaveri > Sent: Monday, April 23, 2018 21:15 > To: Csaba Pinter > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkMultiVolume and shading > > > > Hi Csaba, > > I don?t believe there is a technical limitation. It was merely that > the original effort for adding multiple overlapping volumes support > was focused on selected features. I am not aware of current > efforts/funding to add support for additional features like shading, different blend modes, etc. > > Thanks, > Sankhesh > > > > On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter > wrote: > > Hello, > > > > I?m experimenting with using vtkMultiVolume to add proper multi-volume > rendering support into 3D Slicer. My main question is the reason > behind this actor not supporting shading, as apparent when used, but > also mentioned in the corresponding test: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu > b.com%2FKitware%2FVTK%2Fblob%2Fmaster%2FRendering%2FVolume%2FTesting%2 > FCxx%2FTestGPURayCastMultiVolumeOverlapping.cxx%23L229&data=02%7C01%7C > csaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3 > b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sdata=Ylx6UE%2B > 0l7IeQEWU5OEkSYHXSAuBYLT8DzB1RobJY34%3D&reserved=0 > > Is this a technical limitation that would be very hard to overcome, or > is it something simpler? I?m asking this because for this actor to be > really used for volume rendering, shading would be necessary. > > > > Thank you, > > Csaba > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > Fbd%2Bmo%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > fefTvNJWtuJta0b1o%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queen > su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838 > b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2 > o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > > -- > > Sankhesh Jhaveri > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > Fbd%2Bmo%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > fefTvNJWtuJta0b1o%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > From polly_sukting at hotmail.com Wed Apr 25 00:57:46 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Wed, 25 Apr 2018 04:57:46 +0000 Subject: [vtkusers] Put a marker on a keypoint Message-ID: Hi, I would like to label the keypoint which is closest to the 0, 0, 0 with a marker or label. How can I SetColor to the extracted point? Below is my code: // Find the k closest points to (0,0,0) unsigned int k = 1; double testPoint[3] = { 0.0, 0.0, 0.0 }; vtkSmartPointer result = vtkSmartPointer::New(); pointTree->FindClosestNPoints(k, testPoint, result); for (vtkIdType i = 0; i < k; i++) { vtkIdType point_ind = result->GetId(i); double p[3]; point->GetPoint(point_ind, p); std::cout << "Closest point " << i << ": Point " << point_ind << ": (" << p[0] << ", " << p[1] << ", " << p[2] << ")" << std::endl; } Thank you so much! Regards, Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Wed Apr 25 05:28:51 2018 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 25 Apr 2018 14:58:51 +0530 Subject: [vtkusers] [vtk-developers] VTK Textbook Efforts Update In-Reply-To: References: Message-ID: Hi, At this point to time how can we help in proof reading and update the observation (any repository to add the feedback?)? For example, I found there is typo in Eq 3.7. The component t_z in the T_T matrix is replaced by ZERO. It should be t_z. (See the screen shot below) Thanks and regards, Chiranjib On Tue, Apr 24, 2018 at 1:32 AM, Bill Lorensen wrote: > Folks, > > We are pleased to provide an update on efforts to update the online > resources for the fourth edition of the VTK textbook > > There are 3 coordinated efforts ongoing each with a different goal. > Currently, none of the efforts will rewrite sections of the fourth > edition. These are the first steps to a possible fifth edition, but > that effort will require significant resources. > > 1) The printed and free online PDF of the VTK textbook is the gold > standard for this edition. The online PDF is a low-resolution version > that exhibits some difficulty converting equations. It is available as > one, downloadable PDF with no active links. FrameMaker produces the > PDF from FrameMaker files capable of producing different PDF > resolutions. Editing the FrameMaker files requires a license from > Adobe. It is unlikely the VTK community will have access to these > proprietary files. Major contributors include Will Schroeder and other > Kitware employees. See: https://www.vtk.org/vtk-textbook/ > > 2) A VTK latex version of the VTK textbook is a work-in-progress > effort. The goal is to produce a Latex version populated with links to > figures, references, equations, examples, etc. The PDF version is > downloadable as a single file. The figures that exist as VTK Examples > are linked to the nightly output of the regression testing. Once this > work is stable, the user community will be able to push merge requests > to fix problems with the Latex. The major contributor is Andrew > Maclean. You can follow the progress here: > https://lorensen.github.io/VTKExamples/site/VTKBookLaTex/VTKTextBook/ > > 3) A markdown version of the VTK textbook is also a work-in-progress. > The goal is to produce an interactive, platform friendly version of > the book. The entire text is available on as a Chapter by Chapter > website. The figures that exist as VTK Examples are linked to the > nightly output of the regression testing. Once this work is stable, > the user community will be able to push merge requests to fix problems > with the markdown. The major contributors are Bill Lorensen and > Bernhard Meehan. Bernhard has produced Latex for all 100 equations in > the text. You can follow the progress here: > https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter1/ and > other chapters. > > When the Latex and Markdown versions are more complete, we will ask > the user community to help proofread the new versions. > > > Bill > -- > Unpaid intern in BillsParadise 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: > https://vtk.org/mailman/listinfo/vtk-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 77702 bytes Desc: not available URL: From sur.chiranjib at gmail.com Wed Apr 25 05:40:55 2018 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 25 Apr 2018 15:10:55 +0530 Subject: [vtkusers] Visualizing a surface In-Reply-To: <1524570513469-0.post@n5.nabble.com> References: <1524570513469-0.post@n5.nabble.com> Message-ID: If the points in the polydata comes with the normals, you can try Poisson Surface Construction. I have make Delaunay3D filter works for creating surfaces for points (e.g. same for your DamBreak problem) followed by the Surface Decimation filter. Hope that helps. Thanks and regards, Chiranjib On Tue, Apr 24, 2018 at 5:18 PM, pauldoesntlikesurfaceextractio < paul_geus at hotmail.com> wrote: > Dear all, > > I have a set of points (around 0.5 million) and I want to visualize these > as > a surface/volume. I am programming in c++ and using vtk 8.0 > I have extracted the surface points of the dataset to reduce the size. > > The points show an arbitrary timestep of a dambreak. > I have tried the following approaches: > > VTKExtractSurface; Problem: The wave is not shown accurately. I have tried > increasing the samplesize for the normals, Decreasing the radius for the > calculation of the distances and smoothing the surface. The Result was not > satisfactory > (https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurface/) > > Delaunay3D; Problem: Mainly useable for convex shapes and the triangle > visualization is not nice for a fluid, further problem: Alpha value needs > to > be adjusted for each simulation > > Marching Cubes; Problem: I can't get it to work, I have basically copied > every step from the tutorial: > https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/MarchingCubes/ > I can't understand where i went wrong there > > GaussianSplatter; Problem: The Points(spheres) are visible, this means it > is > not a surface, but spheres test2.xyz > which overlap. > > What other approach is there? > Am I maybe using the one of the features wrong? > > I have attached my points below. > Kind regards and hopefully someone can help me :) > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From seb.an at icloud.com Wed Apr 25 06:06:43 2018 From: seb.an at icloud.com (sebastian_a) Date: Wed, 25 Apr 2018 03:06:43 -0700 (MST) Subject: [vtkusers] vtkImplicitModeller just in "normals-field" Message-ID: <1524650803034-0.post@n5.nabble.com> Hello, I'm trying to solidify my polydata, but just along the direction of its normals. Is there a way to kind of combine vtkImplicitModeller and vtkNormals, so that the modeller just will create the ImageData within the "normals-field" of the polydata? I created a small drawing to illustrate the issue. Thanks a los! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lotterluke at gmail.com Wed Apr 25 07:35:59 2018 From: lotterluke at gmail.com (lp) Date: Wed, 25 Apr 2018 04:35:59 -0700 (MST) Subject: [vtkusers] vtkExtractSelection does not recognize GlobalIDs from imported vtu file Message-ID: <1524656159204-0.post@n5.nabble.com> I am trying to select cells from an imported vtu file by their GlobalIDs, but vtkExtractSelection returns 0 cells. The issue seems to be that vtkXMLUnstructuredGridReader imports the array containing the GlobalIDs as an array of type long, but vtkExtractSelection expects the GlobalIDs to be of type idtype. Attached you can find a small example with a test vtu-file containing 1 cell with a GlobalID of 333. The vtkExtractSelection does not recognize this cell. Is this the expected behavior for this work flow? Is there an option on the reader or the selection that I have to set to handle the GlobalIDs properly? This was tested with VTK build from git master on 25 Apr 2018. Regards, Lukas CMakeLists.txt ReadUnstructuredGrid.cxx testFile.vtu -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ivankosik91 at gmail.com Wed Apr 25 08:49:26 2018 From: ivankosik91 at gmail.com (Ivan Kosik) Date: Wed, 25 Apr 2018 15:49:26 +0300 Subject: [vtkusers] QVTKOpenGLWidget with vtkBalloonWidget bug? Message-ID: Moving from the old QVTKWidget to the new QVTKOpenGLWidget, I noticed the bug, when a vtkBalloonWidget was added to the QVTKInteractor. When QVTKOpenGLWidget object lose the focus, then it becomes black (when you move mouse over it, then all is OK again). Video is here: https://youtu.be/aRlfiZpFFqE The code to reproduce the bug: #include #include #include #include #include #include #include #include #include VTK_MODULE_INIT(vtkInteractionStyle) VTK_MODULE_INIT(vtkRenderingOpenGL2) int main(int argc, char *argv[]) { QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); QApplication a(argc, argv); vtkNew mRenderer; mRenderer->SetBackground(.3, .6, .3); vtkNew mRenderWindow; mRenderWindow->AddRenderer(mRenderer.Get()); vtkNew mRenderWindowInteractor; mRenderWindowInteractor->SetRenderWindow(mRenderWindow.Get()); vtkNew mBalloonWidget; mBalloonWidget->SetInteractor(mRenderWindowInteractor.Get()); mBalloonWidget->EnabledOn(); // remove this line to fix the bug (but we need it for balloons) // Add a sphere for beauty (but we can get the bug without any actor too) vtkNew sphere; sphere->SetCenter(0.0, 0.0, 0.0); sphere->SetRadius(5.0); vtkNew mapper; mapper->SetInputConnection(sphere->GetOutputPort()); vtkNew actor; actor->SetMapper(mapper); mRenderer->AddActor(actor); QVTKOpenGLWidget vtkOpenGlWidget; vtkOpenGlWidget.SetRenderWindow(mRenderWindow.Get()); vtkOpenGlWidget.show(); mRenderWindow->Render(); return a.exec(); } Without this line: mBalloonWidget->EnabledOn(); all works good. And there are no problems with old QVTKWidget, but there is this bug with new QVTKOpenGLWidget and balloons enabled. Compiler is MSVC 2017 32 bit, VTK 8.1.0, Qt 5.10.1 The question is: Is this a VTK bug or some my mistake? -- Best regards, Ivan Kosik -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Wed Apr 25 11:30:44 2018 From: rabysam28 at gmail.com (Sam Raby) Date: Wed, 25 Apr 2018 08:30:44 -0700 Subject: [vtkusers] vtkGlyph3D In-Reply-To: References: Message-ID: Thanks Sankhesh. What would be an efficient approach to assign HSV color for each of the points, given that 1) there are a lot of points ~50k, and 2) each point has it own specific color. Thanks, On Monday, April 23, 2018, Sankhesh Jhaveri wrote: > Hi Sam, > > While you could use the vtkFollower approach, a better performing approach > would be using the vtkPointGaussianMapper > . > See the ParaView blog post > > for examples. > *Note:* You would have to write your own shader preset to render 2D > squares. > > Hope that helps, > Sankhesh > ? > > On Sat, Apr 21, 2018 at 12:22 PM Sam Raby wrote: > >> Hello, >> >> >> I have an easy question, I think. >> >> >> I have hundreds of points in the 3D space. I need to visualize each of >> these points by a small 2D square, which I implemented. Therefore I have >> now hundreds of these small squares in the 3D space. However the issue is >> as follows: >> >> When I rotate the scene, while all the squares are naturally moving in >> respect to the camera, I want all of the squares keep their orientation >> towards the camera and still be constantly facing the camera. I know if >> I use vtkFollower I could do this, but not sure how to do it for these MANY >> squares in the scene. My pipeline is as follows => All my points are stored >> in one single vtkPolydata and I have assigned a vtkSourcePlane to each of >> these points using vtkGlyph3D. >> >> >> Thanks for any feedback. >> >> >> -Sam >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shrikant at smiledevcorp.com Wed Apr 25 13:51:46 2018 From: shrikant at smiledevcorp.com (Shrikant Shete) Date: Wed, 25 Apr 2018 23:21:46 +0530 (IST) Subject: [vtkusers] VTKStripper in VTK JS Message-ID: <1270675607.80147.1524678706835@webmail.smiledevcorp.com> Dear Team, I am new to VTK.js and working on some examples. I am facing issues to check what not there in VTK.js which is available in VTK library. I was finding description about VTKStripper and after searching VTK where it is available in VTK under 'Filters\Core'. However, when i take same into VTK.js, i found its not available. Could you please let me know if its really not available in current VTK.js or am i missing something here? Regards, Shrikant -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Apr 25 14:34:51 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 25 Apr 2018 14:34:51 -0400 Subject: [vtkusers] VTKStripper in VTK JS In-Reply-To: <1270675607.80147.1524678706835@webmail.smiledevcorp.com> References: <1270675607.80147.1524678706835@webmail.smiledevcorp.com> Message-ID: Shrikant, You are not wrong. Just a handful of VTK filter equivalents are presently available in vtk.js. Cory On Wed, Apr 25, 2018 at 1:51 PM, Shrikant Shete wrote: > Dear Team, > > I am new to VTK.js and working on some examples. I am facing issues to > check what not there in VTK.js which is available in VTK library. I was > finding description about VTKStripper and after searching VTK where it is > available in VTK under 'Filters\Core'. > > However, when i take same into VTK.js, i found its not available. > > Could you please let me know if its really not available in current VTK.js > or am i missing something here? > > Regards, > > Shrikant > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_geus at hotmail.com Thu Apr 26 03:19:21 2018 From: paul_geus at hotmail.com (pauldoesntlikesurfaceextractio) Date: Thu, 26 Apr 2018 00:19:21 -0700 (MST) Subject: [vtkusers] Visualizing a surface In-Reply-To: References: <1524570513469-0.post@n5.nabble.com> Message-ID: <1524727161181-0.post@n5.nabble.com> Thank you very much for your answer. I will try the delaunay, followed by the surface decimation filter. I normally have the problem with the breaking wave at the end of the dambreak. How do you work with those chaotic structures? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From paul_geus at hotmail.com Thu Apr 26 03:51:07 2018 From: paul_geus at hotmail.com (pauldoesntlikesurfaceextractio) Date: Thu, 26 Apr 2018 00:51:07 -0700 (MST) Subject: [vtkusers] Visualizing a surface In-Reply-To: References: <1524570513469-0.post@n5.nabble.com> Message-ID: <1524729067596-0.post@n5.nabble.com> I have a further problem related to surface extraction, when I use the vtkextractsurface algorithm it places large half spheres where a couple of particles are clustered together. See picture. How do I reduce the size of those spheres? ->SetRadius is related to the seen/unseen voxels kind regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From randomvibe at rocketmail.com Thu Apr 26 04:02:46 2018 From: randomvibe at rocketmail.com (A B) Date: Thu, 26 Apr 2018 08:02:46 +0000 (UTC) Subject: [vtkusers] VTK Ready-to-Run Binaries for Windows 10 References: <1818947065.1078548.1524729766205.ref@mail.yahoo.com> Message-ID: <1818947065.1078548.1524729766205@mail.yahoo.com> Hello, Been having a difficult time installing and making VTK on Windows10 with CMake and MinGW64.? Error list pasted below.? I do not have Visual Studio.?? My preference is to simply download and install fully compiled VTK 8.1.0 binaries for Windows10.? Is that available somewhere? @randomvibe ????----------------------------------------------------------------------------------------------------------------------------------?C:\vtk\bin>mingw32-make.exe install[? 0%] Built target VTKData[? 1%] Built target vtksys[? 1%] Building CXX object Common/Core/CMakeFiles/vtkCommonCore.dir/vtkDataArray.cxx.objC:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: too many sections (70017)C:\Users\mc\AppData\Local\Temp\cc3RKGTa.s: Assembler messages:C:\Users\mc\AppData\Local\Temp\cc3RKGTa.s: Fatal error: can't write CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: File too bigC:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: too many sections (70017)C:\Users\mc\AppData\Local\Temp\cc3RKGTa.s: Fatal error: can't close CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: File too bigCommon\Core\CMakeFiles\vtkCommonCore.dir\build.make:431: recipe for target 'Common/Core/CMakeFiles/vtkCommonCore.dir/vtkDataArray.cxx.obj' failedmingw32-make.exe[2]: *** [Common/Core/CMakeFiles/vtkCommonCore.dir/vtkDataArray.cxx.obj] Error 1CMakeFiles\Makefile2:281: recipe for target 'Common/Core/CMakeFiles/vtkCommonCore.dir/all' failedmingw32-make.exe[1]: *** [Common/Core/CMakeFiles/vtkCommonCore.dir/all] Error 2Makefile:128: recipe for target 'all' failedmingw32-make.exe: *** [all] Error 2----------------------------------------------------------------------------------------------------------------------------------? -------------- next part -------------- An HTML attachment was scrubbed... URL: From minpu.code at gmail.com Thu Apr 26 04:26:46 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 26 Apr 2018 01:26:46 -0700 (MST) Subject: [vtkusers] Is there possible to use and manage many vtkLineWidgets in a scene? Message-ID: <1524731206340-0.post@n5.nabble.com> First, I render a 3D model. When an user clicks on the model's surface, I generate and draw a sphere. For the first 2 clicked points, I generate a line. But from the 3rd clicked point, I use a previous point and the current point to make a line. Is there possible to use a vtkLineWidget for each generated line? If it is possible, how to implement it? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aron.helser at kitware.com Thu Apr 26 08:31:39 2018 From: aron.helser at kitware.com (Aron Helser) Date: Thu, 26 Apr 2018 08:31:39 -0400 Subject: [vtkusers] VTK Ready-to-Run Binaries for Windows 10 In-Reply-To: <1818947065.1078548.1524729766205@mail.yahoo.com> References: <1818947065.1078548.1524729766205.ref@mail.yahoo.com> <1818947065.1078548.1524729766205@mail.yahoo.com> Message-ID: Yes, the easiest way is to install it with 'pip', using python: https://pypi.org/project/vtk/ pip install vtk On Thu, Apr 26, 2018 at 4:02 AM, A B via vtkusers wrote: > Hello, > > Been having a difficult time installing and making VTK on Windows10 with > CMake and MinGW64. Error list pasted below. I do not have Visual Studio. > > My preference is to simply download and install fully compiled VTK 8.1.0 > binaries for Windows10. Is that available somewhere? > > @randomvibe > > > ------------------------------------------------------------ > ---------------------------------------------------------------------- > C:\vtk\bin>mingw32-make.exe install > [ 0%] Built target VTKData > [ 1%] Built target vtksys > [ 1%] Building CXX object Common/Core/CMakeFiles/vtkCommonCore.dir/ > vtkDataArray.cxx.obj > C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../ > ../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: > too many sections (70017) > C:\Users\mc\AppData\Local\Temp\cc3RKGTa.s: Assembler messages: > C:\Users\mc\AppData\Local\Temp\cc3RKGTa.s: Fatal error: can't write > CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: File too big > C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../ > ../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: > too many sections (70017) > C:\Users\mc\AppData\Local\Temp\cc3RKGTa.s: Fatal error: can't close > CMakeFiles\vtkCommonCore.dir\vtkDataArray.cxx.obj: File too big > Common\Core\CMakeFiles\vtkCommonCore.dir\build.make:431: recipe for > target 'Common/Core/CMakeFiles/vtkCommonCore.dir/vtkDataArray.cxx.obj' > failed > mingw32-make.exe[2]: *** [Common/Core/CMakeFiles/vtkCommonCore.dir/vtkDataArray.cxx.obj] > Error 1 > CMakeFiles\Makefile2:281: recipe for target 'Common/Core/CMakeFiles/vtkCommonCore.dir/all' > failed > mingw32-make.exe[1]: *** [Common/Core/CMakeFiles/vtkCommonCore.dir/all] > Error 2 > Makefile:128: recipe for target 'all' failed > mingw32-make.exe: *** [all] Error 2 > ------------------------------------------------------------ > ---------------------------------------------------------------------- > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From randomvibe at rocketmail.com Thu Apr 26 14:11:29 2018 From: randomvibe at rocketmail.com (A B) Date: Thu, 26 Apr 2018 18:11:29 +0000 (UTC) Subject: [vtkusers] VTK Ready-to-Run Binaries for Windows 10 In-Reply-To: References: <1818947065.1078548.1524729766205.ref@mail.yahoo.com> <1818947065.1078548.1524729766205@mail.yahoo.com> Message-ID: <1051943662.1290894.1524766289869@mail.yahoo.com> Aron, thanks for that.? Which version of python works here? I'm impressed by the VTK literature.? So I want to test out the VTK 8.1.0 libraries with GNU C++ and Matlab via MEX files.? I have example programs already, but I just cannot get the VTK libraries installed on Windows 10.? I'm surprised the ready-to-run binaries are not on the VTK website.?? If I install with 'pip" using python, will VTK only work with python or will I be able to link it with GNU C++ programs like I want? Thank you. @randomvibe On Thursday, April 26, 2018, 5:31:43 AM PDT, Aron Helser wrote: Yes, the easiest way is to install it with 'pip', using python:https://pypi.org/project/vtk/ pip install vtk On Thu, Apr 26, 2018 at 4:02 AM, A B via vtkusers wrote: Hello, Been having a difficult time installing and making VTK on Windows10 with CMake and MinGW64.? Error list pasted below.? I do not have Visual Studio.?? My preference is to simply download and install fully compiled VTK 8.1.0 binaries for Windows10.? Is that available somewhere? @randomvibe ????------------------------------ ------------------------------ ------------------------------ ------------------------------ ----------?C:\vtk\bin>mingw32-make.exe install[? 0%] Built target VTKData[? 1%] Built target vtksys[? 1%] Building CXX object Common/Core/CMakeFiles/ vtkCommonCore.dir/ vtkDataArray.cxx.objC:/mingw64/bin/../lib/gcc/x86_ 64-w64-mingw32/5.3.0/../../../ ../x86_64-w64-mingw32/bin/as. exe: CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: too many sections (70017)C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Assembler messages:C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Fatal error: can't write CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: File too bigC:/mingw64/bin/../lib/gcc/x86_ 64-w64-mingw32/5.3.0/../../../ ../x86_64-w64-mingw32/bin/as. exe: CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: too many sections (70017)C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Fatal error: can't close CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: File too bigCommon\Core\CMakeFiles\ vtkCommonCore.dir\build.make: 431: recipe for target 'Common/Core/CMakeFiles/ vtkCommonCore.dir/ vtkDataArray.cxx.obj' failedmingw32-make.exe[2]: *** [Common/Core/CMakeFiles/ vtkCommonCore.dir/ vtkDataArray.cxx.obj] Error 1CMakeFiles\Makefile2:281: recipe for target 'Common/Core/CMakeFiles/ vtkCommonCore.dir/all' failedmingw32-make.exe[1]: *** [Common/Core/CMakeFiles/ vtkCommonCore.dir/all] Error 2Makefile:128: recipe for target 'all' failedmingw32-make.exe: *** [all] Error 2------------------------------ ------------------------------ ------------------------------ ------------------------------ ----------? ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/ listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Thu Apr 26 14:20:35 2018 From: aron.helser at kitware.com (Aron Helser) Date: Thu, 26 Apr 2018 14:20:35 -0400 Subject: [vtkusers] VTK Ready-to-Run Binaries for Windows 10 In-Reply-To: <1051943662.1290894.1524766289869@mail.yahoo.com> References: <1818947065.1078548.1524729766205.ref@mail.yahoo.com> <1818947065.1078548.1524729766205@mail.yahoo.com> <1051943662.1290894.1524766289869@mail.yahoo.com> Message-ID: Python 2.7 or 3.5+ should work. I believe the binaries installed by pip are build with Visual Studio, so I doubt you would be able to link to them with GNU C++. But, I don't have experience with what you are trying to do, so I will have to defer to the list... Aron On Thu, Apr 26, 2018 at 2:11 PM, A B wrote: > Aron, thanks for that. Which version of python works here? > > I'm impressed by the VTK literature. So I want to test out the VTK 8.1.0 > libraries with GNU C++ and Matlab via MEX files. I have example programs > already, but I just cannot get the VTK libraries installed on Windows 10. > I'm surprised the ready-to-run binaries are not on the VTK website. > > If I install with 'pip" using python, will VTK only work with python or > will I be able to link it with GNU C++ programs like I want? > > Thank you. > > @randomvibe > On Thursday, April 26, 2018, 5:31:43 AM PDT, Aron Helser < > aron.helser at kitware.com> wrote: > > > Yes, the easiest way is to install it with 'pip', using python: > https://pypi.org/project/vtk/ > pip install vtk > > > On Thu, Apr 26, 2018 at 4:02 AM, A B via vtkusers > wrote: > > Hello, > > Been having a difficult time installing and making VTK on Windows10 with > CMake and MinGW64. Error list pasted below. I do not have Visual Studio. > > My preference is to simply download and install fully compiled VTK 8.1.0 > binaries for Windows10. Is that available somewhere? > > @randomvibe > > > ------------------------------ ------------------------------ > ------------------------------ ------------------------------ ---------- > C:\vtk\bin>mingw32-make.exe install > [ 0%] Built target VTKData > [ 1%] Built target vtksys > [ 1%] Building CXX object Common/Core/CMakeFiles/ vtkCommonCore.dir/ > vtkDataArray.cxx.obj > C:/mingw64/bin/../lib/gcc/x86_ 64-w64-mingw32/5.3.0/../../../ > ../x86_64-w64-mingw32/bin/as. exe: CMakeFiles\vtkCommonCore.dir\ > vtkDataArray.cxx.obj: too many sections (70017) > C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Assembler messages: > C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Fatal error: can't write > CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: File too big > C:/mingw64/bin/../lib/gcc/x86_ 64-w64-mingw32/5.3.0/../../../ > ../x86_64-w64-mingw32/bin/as. exe: CMakeFiles\vtkCommonCore.dir\ > vtkDataArray.cxx.obj: too many sections (70017) > C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Fatal error: can't close > CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: File too big > Common\Core\CMakeFiles\ vtkCommonCore.dir\build.make: 431: recipe for > target 'Common/Core/CMakeFiles/ vtkCommonCore.dir/ vtkDataArray.cxx.obj' > failed > mingw32-make.exe[2]: *** [Common/Core/CMakeFiles/ vtkCommonCore.dir/ > vtkDataArray.cxx.obj] Error 1 > CMakeFiles\Makefile2:281: recipe for target 'Common/Core/CMakeFiles/ > vtkCommonCore.dir/all' failed > mingw32-make.exe[1]: *** [Common/Core/CMakeFiles/ vtkCommonCore.dir/all] > Error 2 > Makefile:128: recipe for target 'all' failed > mingw32-make.exe: *** [all] Error 2 > ------------------------------ ------------------------------ > ------------------------------ ------------------------------ ---------- > > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/ listinfo/vtkusers > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From isaiah.norton at gmail.com Thu Apr 26 14:25:41 2018 From: isaiah.norton at gmail.com (Isaiah Norton) Date: Thu, 26 Apr 2018 14:25:41 -0400 Subject: [vtkusers] VTK Ready-to-Run Binaries for Windows 10 In-Reply-To: References: <1818947065.1078548.1524729766205.ref@mail.yahoo.com> <1818947065.1078548.1524729766205@mail.yahoo.com> <1051943662.1290894.1524766289869@mail.yahoo.com> Message-ID: There are MinGW-W64 packages available from msys2: https://www.msys2.org/ https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-vtk I doubt you would be able to link to them with GNU C++. > That is correct. On Thu, Apr 26, 2018 at 2:20 PM, Aron Helser wrote: > Python 2.7 or 3.5+ should work. > I believe the binaries installed by pip are build with Visual Studio, so I > doubt you would be able to link to them with GNU C++. > But, I don't have experience with what you are trying to do, so I will > have to defer to the list... > > Aron > > On Thu, Apr 26, 2018 at 2:11 PM, A B wrote: > >> Aron, thanks for that. Which version of python works here? >> >> I'm impressed by the VTK literature. So I want to test out the VTK 8.1.0 >> libraries with GNU C++ and Matlab via MEX files. I have example programs >> already, but I just cannot get the VTK libraries installed on Windows 10. >> I'm surprised the ready-to-run binaries are not on the VTK website. >> >> If I install with 'pip" using python, will VTK only work with python or >> will I be able to link it with GNU C++ programs like I want? >> >> Thank you. >> >> @randomvibe >> On Thursday, April 26, 2018, 5:31:43 AM PDT, Aron Helser < >> aron.helser at kitware.com> wrote: >> >> >> Yes, the easiest way is to install it with 'pip', using python: >> https://pypi.org/project/vtk/ >> pip install vtk >> >> >> On Thu, Apr 26, 2018 at 4:02 AM, A B via vtkusers >> wrote: >> >> Hello, >> >> Been having a difficult time installing and making VTK on Windows10 with >> CMake and MinGW64. Error list pasted below. I do not have Visual Studio. >> >> My preference is to simply download and install fully compiled VTK 8.1.0 >> binaries for Windows10. Is that available somewhere? >> >> @randomvibe >> >> >> ------------------------------ ------------------------------ >> ------------------------------ ------------------------------ ---------- >> C:\vtk\bin>mingw32-make.exe install >> [ 0%] Built target VTKData >> [ 1%] Built target vtksys >> [ 1%] Building CXX object Common/Core/CMakeFiles/ vtkCommonCore.dir/ >> vtkDataArray.cxx.obj >> C:/mingw64/bin/../lib/gcc/x86_ 64-w64-mingw32/5.3.0/../../../ >> ../x86_64-w64-mingw32/bin/as. exe: CMakeFiles\vtkCommonCore.dir\ >> vtkDataArray.cxx.obj: too many sections (70017) >> C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Assembler messages: >> C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Fatal error: can't write >> CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: File too big >> C:/mingw64/bin/../lib/gcc/x86_ 64-w64-mingw32/5.3.0/../../../ >> ../x86_64-w64-mingw32/bin/as. exe: CMakeFiles\vtkCommonCore.dir\ >> vtkDataArray.cxx.obj: too many sections (70017) >> C:\Users\mc\AppData\Local\ Temp\cc3RKGTa.s: Fatal error: can't close >> CMakeFiles\vtkCommonCore.dir\ vtkDataArray.cxx.obj: File too big >> Common\Core\CMakeFiles\ vtkCommonCore.dir\build.make: 431: recipe for >> target 'Common/Core/CMakeFiles/ vtkCommonCore.dir/ vtkDataArray.cxx.obj' >> failed >> mingw32-make.exe[2]: *** [Common/Core/CMakeFiles/ vtkCommonCore.dir/ >> vtkDataArray.cxx.obj] Error 1 >> CMakeFiles\Makefile2:281: recipe for target 'Common/Core/CMakeFiles/ >> vtkCommonCore.dir/all' failed >> mingw32-make.exe[1]: *** [Common/Core/CMakeFiles/ vtkCommonCore.dir/all] >> Error 2 >> Makefile:128: recipe for target 'all' failed >> mingw32-make.exe: *** [all] Error 2 >> ------------------------------ ------------------------------ >> ------------------------------ ------------------------------ ---------- >> >> >> ______________________________ _________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ >> FAQ >> >> Search the list archives at: http://markmail.org/search/?q= vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/ listinfo/vtkusers >> >> >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From isaiah.norton at gmail.com Thu Apr 26 14:27:52 2018 From: isaiah.norton at gmail.com (Isaiah Norton) Date: Thu, 26 Apr 2018 14:27:52 -0400 Subject: [vtkusers] Python/VTK offscreen / headless rendering In-Reply-To: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> References: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> Message-ID: Depends on the OS, but for Linux see some links to discussion/resources here: https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python_scripting#How_can_I_run_Slicer_on_a_headless_compute_node.3F On Mon, Apr 23, 2018 at 6:52 AM, Robert.Atwood at diamond.ac.uk < Robert.Atwood at diamond.ac.uk> wrote: > Hi, > I would like to have a Python script to render several volume images > (tomography data) on a headless machine. I could not find any advice more > recent than 2011 , is this something that just isn't configured in the > Python as installed from existing packages? How do I tell? > If it's not in the python , what needs to be done, at the time of prior > questions it seemed to be a compile-time option of the VTK library, is that > still the case, Any exaples on line that are for the current release ? > Thanks > Robert > > > > -- > This e-mail and any attachments may contain confidential, copyright and or > privileged material, and are for the use of the intended addressee only. If > you are not the intended addressee or an authorised recipient of the > addressee please notify us of receipt by returning the e-mail and do not > use, copy, retain, distribute or disclose the information in or attached to > the e-mail. > Any opinions expressed within this e-mail are those of the individual and > not necessarily of Diamond Light Source Ltd. > Diamond Light Source Ltd. cannot guarantee that this e-mail or any > attachments are free from viruses and we cannot accept liability for any > damage which you may sustain as a result of software viruses which may be > transmitted in or with the message. > Diamond Light Source Limited (company no. 4375679). Registered in England > and Wales with its registered office at Diamond House, Harwell Science and > Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Thu Apr 26 16:15:39 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Thu, 26 Apr 2018 20:15:39 +0000 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: Hi Sankesh, Can you please reply to my question about SetVisibility? See below. Thanks, csaba -----Original Message----- From: vtkusers On Behalf Of Csaba Pinter Sent: Tuesday, April 24, 2018 16:15 To: Elvis Stansvik Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkMultiVolume and shading Hi Sankhesh and Elvis, The first issue that I was now able to confirm is that SetVisibility called on the individual vtkVolume objects within vtkMultiVolume has no effect. Not sure if this is intentional or not, but naively I'd think this is the way to show/hide a volume. I'm not fond of the idea to clear the connection in the mapper and set volume to null every time I want to hide one. The way to reproduce this is for example adding these lines to line 118 in Rendering\Volume\Testing\Cxx\TestGPURayCastMultiVolumeOverlapping.cxx else if (key == "w") { this->Volume->SetVisibility(!this->Volume->GetVisibility()); } If you start the test interactively (-I), then nothing happens if you press w. The other issue is that the user transform I set to the first volume seems to be ignored, while the second volume's transform is used properly. I haven't been able to reproduce it with this test yet, so I'll keep working on it until I find out what is the exact issue. Cheers, csaba -----Original Message----- From: Elvis Stansvik Sent: Tuesday, April 24, 2018 10:51 To: Csaba Pinter Cc: Sankhesh Jhaveri ; vtkusers at vtk.org Subject: Re: [vtkusers] vtkMultiVolume and shading 2018-04-24 15:15 GMT+02:00 Csaba Pinter : > Hi Sankhesh, > > > > Thanks for the quick answer! Just in a nutshell, what would be needed > to do programming-wise to add shading in the code? > > > > Also I?m wondering if the situation about funding applies to bugfixes > as well? I am struggling with issues related to per-volume visibility > and user transforms, and I think I?ll get back to you soon with > self-contained test cases once I was able to figure out which of these > are on the VTK side and how to reproduce them easily. I'm also about to experiment with the multi-volume support. Would be interesting to hear from you what problems you ran into wrt to per-volume visibility / user transforms, so I know what to look out for :) So if you file issues for those it would be great if you could link to them here. Cheers, Elvis > > > > Thanks, > > csaba > > > > From: Sankhesh Jhaveri > Sent: Monday, April 23, 2018 21:15 > To: Csaba Pinter > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkMultiVolume and shading > > > > Hi Csaba, > > I don?t believe there is a technical limitation. It was merely that > the original effort for adding multiple overlapping volumes support > was focused on selected features. I am not aware of current > efforts/funding to add support for additional features like shading, different blend modes, etc. > > Thanks, > Sankhesh > > > > On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter > wrote: > > Hello, > > > > I?m experimenting with using vtkMultiVolume to add proper multi-volume > rendering support into 3D Slicer. My main question is the reason > behind this actor not supporting shading, as apparent when used, but > also mentioned in the corresponding test: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu > b.com%2FKitware%2FVTK%2Fblob%2Fmaster%2FRendering%2FVolume%2FTesting%2 > FCxx%2FTestGPURayCastMultiVolumeOverlapping.cxx%23L229&data=02%7C01%7C > csaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3 > b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sdata=Ylx6UE%2B > 0l7IeQEWU5OEkSYHXSAuBYLT8DzB1RobJY34%3D&reserved=0 > > Is this a technical limitation that would be very hard to overcome, or > is it something simpler? I?m asking this because for this actor to be > really used for volume rendering, shading would be necessary. > > > > Thank you, > > Csaba > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > Fbd%2Bmo%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > fefTvNJWtuJta0b1o%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queen > su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838 > b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2 > o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > > -- > > Sankhesh Jhaveri > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > Fbd%2Bmo%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > fefTvNJWtuJta0b1o%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queen > su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838 > b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2 > o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=1lYCTXmxKFAOgv%2FQrW6cv9jtjQK75l%2BBZYeYtOJbE3o%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=ODhLD2F9vWvtEh4YL95uxjpGKVpqojmiZwFHwFgzIXo%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=uD61r5kXd18vHb8WBIo19IVG5ogZo9iK%2Fj3qCIKa7zY%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=NJl0QPc040TPW2yj%2Bp1DA5EjB33cgHpil3FD3fgaEAk%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=a%2Fct6kgmRJ6Bl6tRKZTCnjhhssJHmI%2BWaGVJYWN0PI0%3D&reserved=0 From sankhesh.jhaveri at kitware.com Thu Apr 26 16:59:19 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 26 Apr 2018 20:59:19 +0000 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: Thanks for reporting the issue Csaba. This might be an unintended side-effect of vtkMultiVolume in the GPU mapper. I've created an issue here: https://gitlab.kitware.com/vtk/vtk/issues/17302 to keep track of it. Thanks, Sankhesh On Thu, Apr 26, 2018 at 4:15 PM Csaba Pinter wrote: > Hi Sankesh, > > Can you please reply to my question about SetVisibility? See below. > > Thanks, > csaba > > -----Original Message----- > From: vtkusers On Behalf Of Csaba Pinter > Sent: Tuesday, April 24, 2018 16:15 > To: Elvis Stansvik > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkMultiVolume and shading > > Hi Sankhesh and Elvis, > > The first issue that I was now able to confirm is that SetVisibility > called on the individual vtkVolume objects within vtkMultiVolume has no > effect. Not sure if this is intentional or not, but naively I'd think this > is the way to show/hide a volume. I'm not fond of the idea to clear the > connection in the mapper and set volume to null every time I want to hide > one. > The way to reproduce this is for example adding these lines to line 118 in > Rendering\Volume\Testing\Cxx\TestGPURayCastMultiVolumeOverlapping.cxx > else if (key == "w") > { > this->Volume->SetVisibility(!this->Volume->GetVisibility()); > } > If you start the test interactively (-I), then nothing happens if you > press w. > > The other issue is that the user transform I set to the first volume seems > to be ignored, while the second volume's transform is used properly. I > haven't been able to reproduce it with this test yet, so I'll keep working > on it until I find out what is the exact issue. > > Cheers, > csaba > > -----Original Message----- > From: Elvis Stansvik > Sent: Tuesday, April 24, 2018 10:51 > To: Csaba Pinter > Cc: Sankhesh Jhaveri ; vtkusers at vtk.org > Subject: Re: [vtkusers] vtkMultiVolume and shading > > 2018-04-24 15:15 GMT+02:00 Csaba Pinter : > > Hi Sankhesh, > > > > > > > > Thanks for the quick answer! Just in a nutshell, what would be needed > > to do programming-wise to add shading in the code? > > > > > > > > Also I?m wondering if the situation about funding applies to bugfixes > > as well? I am struggling with issues related to per-volume visibility > > and user transforms, and I think I?ll get back to you soon with > > self-contained test cases once I was able to figure out which of these > > are on the VTK side and how to reproduce them easily. > > I'm also about to experiment with the multi-volume support. Would be > interesting to hear from you what problems you ran into wrt to per-volume > visibility / user transforms, so I know what to look out for :) So if you > file issues for those it would be great if you could link to them here. > > Cheers, > Elvis > > > > > > > > > Thanks, > > > > csaba > > > > > > > > From: Sankhesh Jhaveri > > Sent: Monday, April 23, 2018 21:15 > > To: Csaba Pinter > > Cc: vtkusers at vtk.org > > Subject: Re: [vtkusers] vtkMultiVolume and shading > > > > > > > > Hi Csaba, > > > > I don?t believe there is a technical limitation. It was merely that > > the original effort for adding multiple overlapping volumes support > > was focused on selected features. I am not aware of current > > efforts/funding to add support for additional features like shading, > different blend modes, etc. > > > > Thanks, > > Sankhesh > > > > > > > > On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter > > wrote: > > > > Hello, > > > > > > > > I?m experimenting with using vtkMultiVolume to add proper multi-volume > > rendering support into 3D Slicer. My main question is the reason > > behind this actor not supporting shading, as apparent when used, but > > also mentioned in the corresponding test: > > > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu > > b.com%2FKitware%2FVTK%2Fblob%2Fmaster%2FRendering%2FVolume%2FTesting%2 > > FCxx%2FTestGPURayCastMultiVolumeOverlapping.cxx%23L229&data=02%7C01%7C > > csaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3 > > b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sdata=Ylx6UE%2B > > 0l7IeQEWU5OEkSYHXSAuBYLT8DzB1RobJY34%3D&reserved=0 > > > > Is this a technical limitation that would be very hard to overcome, or > > is it something simpler? I?m asking this because for this actor to be > > really used for volume rendering, shading would be necessary. > > > > > > > > Thank you, > > > > Csaba > > > > _______________________________________________ > > Powered by > > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > > > Visit other Kitware open-source projects at > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > > > Please keep messages on-topic and check the VTK FAQ at: > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > > Fbd%2Bmo%3D&reserved=0 > > > > Search the list archives at: > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > > fefTvNJWtuJta0b1o%3D&reserved=0 > > > > Follow this link to subscribe/unsubscribe: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queen > > su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838 > > b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2 > > o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > > > > -- > > > > Sankhesh Jhaveri > > > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > > > > > _______________________________________________ > > Powered by > > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > > > Visit other Kitware open-source projects at > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > > > Please keep messages on-topic and check the VTK FAQ at: > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > > Fbd%2Bmo%3D&reserved=0 > > > > Search the list archives at: > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > > fefTvNJWtuJta0b1o%3D&reserved=0 > > > > Follow this link to subscribe/unsubscribe: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queen > > su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838 > > b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2 > > o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=1lYCTXmxKFAOgv%2FQrW6cv9jtjQK75l%2BBZYeYtOJbE3o%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=ODhLD2F9vWvtEh4YL95uxjpGKVpqojmiZwFHwFgzIXo%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=uD61r5kXd18vHb8WBIo19IVG5ogZo9iK%2Fj3qCIKa7zY%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=NJl0QPc040TPW2yj%2Bp1DA5EjB33cgHpil3FD3fgaEAk%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=a%2Fct6kgmRJ6Bl6tRKZTCnjhhssJHmI%2BWaGVJYWN0PI0%3D&reserved=0 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Thu Apr 26 17:04:15 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Thu, 26 Apr 2018 21:04:15 +0000 Subject: [vtkusers] vtkMultiVolume and shading In-Reply-To: References: Message-ID: Thank you Sankhesh! It?s good to know that this is indeed a bug. Thanks a lot for creating the issue and for looking into it! Best, csaba From: Sankhesh Jhaveri Sent: Thursday, April 26, 2018 16:59 To: Csaba Pinter Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkMultiVolume and shading Thanks for reporting the issue Csaba. This might be an unintended side-effect of vtkMultiVolume in the GPU mapper. I've created an issue here: https://gitlab.kitware.com/vtk/vtk/issues/17302 to keep track of it. Thanks, Sankhesh On Thu, Apr 26, 2018 at 4:15 PM Csaba Pinter > wrote: Hi Sankesh, Can you please reply to my question about SetVisibility? See below. Thanks, csaba -----Original Message----- From: vtkusers > On Behalf Of Csaba Pinter Sent: Tuesday, April 24, 2018 16:15 To: Elvis Stansvik > Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkMultiVolume and shading Hi Sankhesh and Elvis, The first issue that I was now able to confirm is that SetVisibility called on the individual vtkVolume objects within vtkMultiVolume has no effect. Not sure if this is intentional or not, but naively I'd think this is the way to show/hide a volume. I'm not fond of the idea to clear the connection in the mapper and set volume to null every time I want to hide one. The way to reproduce this is for example adding these lines to line 118 in Rendering\Volume\Testing\Cxx\TestGPURayCastMultiVolumeOverlapping.cxx else if (key == "w") { this->Volume->SetVisibility(!this->Volume->GetVisibility()); } If you start the test interactively (-I), then nothing happens if you press w. The other issue is that the user transform I set to the first volume seems to be ignored, while the second volume's transform is used properly. I haven't been able to reproduce it with this test yet, so I'll keep working on it until I find out what is the exact issue. Cheers, csaba -----Original Message----- From: Elvis Stansvik > Sent: Tuesday, April 24, 2018 10:51 To: Csaba Pinter > Cc: Sankhesh Jhaveri >; vtkusers at vtk.org Subject: Re: [vtkusers] vtkMultiVolume and shading 2018-04-24 15:15 GMT+02:00 Csaba Pinter >: > Hi Sankhesh, > > > > Thanks for the quick answer! Just in a nutshell, what would be needed > to do programming-wise to add shading in the code? > > > > Also I?m wondering if the situation about funding applies to bugfixes > as well? I am struggling with issues related to per-volume visibility > and user transforms, and I think I?ll get back to you soon with > self-contained test cases once I was able to figure out which of these > are on the VTK side and how to reproduce them easily. I'm also about to experiment with the multi-volume support. Would be interesting to hear from you what problems you ran into wrt to per-volume visibility / user transforms, so I know what to look out for :) So if you file issues for those it would be great if you could link to them here. Cheers, Elvis > > > > Thanks, > > csaba > > > > From: Sankhesh Jhaveri > > Sent: Monday, April 23, 2018 21:15 > To: Csaba Pinter > > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkMultiVolume and shading > > > > Hi Csaba, > > I don?t believe there is a technical limitation. It was merely that > the original effort for adding multiple overlapping volumes support > was focused on selected features. I am not aware of current > efforts/funding to add support for additional features like shading, different blend modes, etc. > > Thanks, > Sankhesh > > > > On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter > > wrote: > > Hello, > > > > I?m experimenting with using vtkMultiVolume to add proper multi-volume > rendering support into 3D Slicer. My main question is the reason > behind this actor not supporting shading, as apparent when used, but > also mentioned in the corresponding test: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu > b.com%2FKitware%2FVTK%2Fblob%2Fmaster%2FRendering%2FVolume%2FTesting%2 > FCxx%2FTestGPURayCastMultiVolumeOverlapping.cxx%23L229&data=02%7C01%7C > csaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3 > b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sdata=Ylx6UE%2B > 0l7IeQEWU5OEkSYHXSAuBYLT8DzB1RobJY34%3D&reserved=0 > > Is this a technical limitation that would be very hard to overcome, or > is it something simpler? I?m asking this because for this actor to be > really used for volume rendering, shading would be necessary. > > > > Thank you, > > Csaba > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > Fbd%2Bmo%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > fefTvNJWtuJta0b1o%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queen > su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838 > b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2 > o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > > -- > > Sankhesh Jhaveri > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c9 > 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sda > ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%4 > 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e > fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2BUe > pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394 > ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C > 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrgv%2 > Fbd%2Bmo%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queens > u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2FooB > fefTvNJWtuJta0b1o%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.o > rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queen > su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838 > b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2FnwJ2 > o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0 > _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=1lYCTXmxKFAOgv%2FQrW6cv9jtjQK75l%2BBZYeYtOJbE3o%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=ODhLD2F9vWvtEh4YL95uxjpGKVpqojmiZwFHwFgzIXo%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=uD61r5kXd18vHb8WBIo19IVG5ogZo9iK%2Fj3qCIKa7zY%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=NJl0QPc040TPW2yj%2Bp1DA5EjB33cgHpil3FD3fgaEAk%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C797077e62ecc4ee0f44408d5aa1fff3f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601976760404366&sdata=a%2Fct6kgmRJ6Bl6tRKZTCnjhhssJHmI%2BWaGVJYWN0PI0%3D&reserved=0 -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkorir at ebi.ac.uk Fri Apr 27 06:08:39 2018 From: pkorir at ebi.ac.uk (Paul Korir) Date: Fri, 27 Apr 2018 11:08:39 +0100 Subject: [vtkusers] Python/VTK offscreen / headless rendering In-Reply-To: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> References: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> Message-ID: <20152d4e-b07b-a350-1a54-341bc14793fc@ebi.ac.uk> How different is what you need from writing the rendered output directly to a file using one of the vtk*Writer classes? Correct me if I'm missing something. Paul K. Korir, PhD Scientific Programmer EMBL-EBI 01223494422 On 23/04/2018 11:52, Robert.Atwood at diamond.ac.uk wrote: > Hi, > I would like to have a Python script to render several volume images (tomography data) on a headless machine. I could not find any advice more recent than 2011 , is this something that just isn't configured in the Python as installed from existing packages? How do I tell? > If it's not in the python , what needs to be done, at the time of prior questions it seemed to be a compile-time option of the VTK library, is that still the case, Any exaples on line that are for the current release ? > Thanks > Robert > > > From Robert.Atwood at diamond.ac.uk Fri Apr 27 07:16:00 2018 From: Robert.Atwood at diamond.ac.uk (Robert.Atwood at diamond.ac.uk) Date: Fri, 27 Apr 2018 11:16:00 +0000 Subject: [vtkusers] Python/VTK offscreen / headless rendering In-Reply-To: <20152d4e-b07b-a350-1a54-341bc14793fc@ebi.ac.uk> References: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> <20152d4e-b07b-a350-1a54-341bc14793fc@ebi.ac.uk> Message-ID: Hi, Paul The difference is to get to the point where there is something rendered, without having to open a window on the terminal. In the case where I already know (or can calculate from the image data) the colour function and the transparency function, I know what camera angle I want and so on, I just want to run a background job on a remote workstation/cluster node to render that same view for a number of similar images (of the same object in different time steps) Instead of sitting on my computer watching it. But, the problem is that with the way I know how to do it, the creation of the render window trys to get a GL context, but it can't do that . If I try in python on a X-window connection even, I get the following ERROR: In /home/ilan/minonda/conda-bld/work/VTK-6.3.0/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 394 vtkXOpenGLRenderWindow (0x7f47c0fda000): Could not find a decent visual But maye the capability isn't compiled into the python package from Anaconda?? Is there a python package I can grab that has software rendering? I tried to buld the c++ from source of 7.1.1. But not successfully. .. ./CylinderRenderingProperties ERROR: In /dls/science/users/kny48981/sources/vtk/VTK-7.1.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 320 vtkXOpenGLRenderWindow (0xfc18a0): Could not find a decent config > -----Original Message----- > From: Paul Korir [mailto:pkorir at ebi.ac.uk] > Sent: 27 April 2018 11:09 > To: Atwood, Robert (DLSLtd,RAL,SCI); 'vtkusers at vtk.org' > Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering > > How different is what you need from writing the rendered output directly > to a file using one of the vtk*Writer classes? > > Correct me if I'm missing something. > > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > > On 23/04/2018 11:52, Robert.Atwood at diamond.ac.uk wrote: > > Hi, > > I would like to have a Python script to render several volume images > (tomography data) on a headless machine. I could not find any advice more > recent than 2011 , is this something that just isn't configured in the Python as > installed from existing packages? How do I tell? > > If it's not in the python , what needs to be done, at the time of prior > questions it seemed to be a compile-time option of the VTK library, is that > still the case, Any exaples on line that are for the current release ? > > Thanks > > Robert > > > > > > -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom From minpu.code at gmail.com Fri Apr 27 09:11:03 2018 From: minpu.code at gmail.com (pnt1614) Date: Fri, 27 Apr 2018 06:11:03 -0700 (MST) Subject: [vtkusers] Is there possible to use and manage many vtkLineWidgets in a scene? In-Reply-To: <1524731206340-0.post@n5.nabble.com> References: <1524731206340-0.post@n5.nabble.com> Message-ID: <1524834663283-0.post@n5.nabble.com> Due to the lack of document, I did not know that vtk has a widget named vtkPolyLineWidget. To solve this problem, I use a list of clicked points to make a vtkPolyLineRepresentation and then use this representation as an input to a vtkPolyLineWidget. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Robert.Atwood at diamond.ac.uk Fri Apr 27 09:25:03 2018 From: Robert.Atwood at diamond.ac.uk (Robert.Atwood at diamond.ac.uk) Date: Fri, 27 Apr 2018 13:25:03 +0000 Subject: [vtkusers] Python/VTK offscreen / headless rendering In-Reply-To: References: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> Message-ID: HI Isaiah, Thanks for the link. However , it defies comprehension (by me) The link which you sent claims the following, 2-> You can use a modern version of X that supports running a dummy framebuffer. This can be installed in user mode so you don't even need to have root on the system. Xdummy standlone You can start a new display using the dummy driver without needing any special privileges (no root, no suid), you should specify your own log and config files: Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config ./xorg.conf :10 However, the link within the link that this link refers to does not say anything about how o install it in user mode. Do you know anyting about that ? The nodes do not have Xorg installed. A workstation already has Xorg running so I don?t understand If I run as specified in the link, it either doesn?t work *cannot specify ?logfile with elevated priviliges* or else if I skip the logfile, it opens a *real* display on top of my display. I don?t understand which part of the command is supposed to access the dummy driver. com09-10 ~]$ Xorg -bash: Xorg: command not found From: Isaiah Norton [mailto:isaiah.norton at gmail.com] Sent: 26 April 2018 19:28 To: Atwood, Robert (DLSLtd,RAL,SCI) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering Depends on the OS, but for Linux see some links to discussion/resources here: https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python_scripting#How_can_I_run_Slicer_on_a_headless_compute_node.3F On Mon, Apr 23, 2018 at 6:52 AM, Robert.Atwood at diamond.ac.uk > wrote: Hi, I would like to have a Python script to render several volume images (tomography data) on a headless machine. I could not find any advice more recent than 2011 , is this something that just isn't configured in the Python as installed from existing packages? How do I tell? If it's not in the python , what needs to be done, at the time of prior questions it seemed to be a compile-time option of the VTK library, is that still the case, Any exaples on line that are for the current release ? Thanks Robert -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.smolens at kitware.com Fri Apr 27 09:51:40 2018 From: max.smolens at kitware.com (Max Smolens) Date: Fri, 27 Apr 2018 09:51:40 -0400 Subject: [vtkusers] Python/VTK offscreen / headless rendering In-Reply-To: References: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> <20152d4e-b07b-a350-1a54-341bc14793fc@ebi.ac.uk> Message-ID: Hi Robert, The conda-forge channel includes a variant of the vtk package that supports offscreen rendering with OSMesa. This variant is chosen automatically if the mesalib package is installed when installing vtk: conda config --add channels conda-forge conda install mesalib vtk HTH, Max On Fri, Apr 27, 2018 at 7:16 AM, Robert.Atwood at diamond.ac.uk < Robert.Atwood at diamond.ac.uk> wrote: > Hi, Paul > The difference is to get to the point where there is something rendered, > without having to open a window on the terminal. > In the case where I already know (or can calculate from the image data) > the colour function and the transparency function, I know what camera angle > I want and so on, I just want to run a background job on a remote > workstation/cluster node to render that same view for a number of similar > images (of the same object in different time steps) Instead of sitting on > my computer watching it. > > But, the problem is that with the way I know how to do it, the creation of > the render window trys to get a GL context, but it can't do that . > > If I try in python on a X-window connection even, I get the following > ERROR: In /home/ilan/minonda/conda-bld/work/VTK-6.3.0/Rendering/ > OpenGL/vtkXOpenGLRenderWindow.cxx, line 394 > vtkXOpenGLRenderWindow (0x7f47c0fda000): Could not find a decent visual > > > But maye the capability isn't compiled into the python package from > Anaconda?? > Is there a python package I can grab that has software rendering? > > > > > I tried to buld the c++ from source of 7.1.1. But not successfully. .. > > ./CylinderRenderingProperties > ERROR: In /dls/science/users/kny48981/sources/vtk/VTK-7.1.1/ > Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 320 > vtkXOpenGLRenderWindow (0xfc18a0): Could not find a decent config > > > > > > > > -----Original Message----- > > From: Paul Korir [mailto:pkorir at ebi.ac.uk] > > Sent: 27 April 2018 11:09 > > To: Atwood, Robert (DLSLtd,RAL,SCI); 'vtkusers at vtk.org' > > Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering > > > > How different is what you need from writing the rendered output directly > > to a file using one of the vtk*Writer classes? > > > > Correct me if I'm missing something. > > > > Paul K. Korir, PhD > > Scientific Programmer > > EMBL-EBI > > 01223494422 > > > > On 23/04/2018 11:52, Robert.Atwood at diamond.ac.uk wrote: > > > Hi, > > > I would like to have a Python script to render several volume images > > (tomography data) on a headless machine. I could not find any advice > more > > recent than 2011 , is this something that just isn't configured in the > Python as > > installed from existing packages? How do I tell? > > > If it's not in the python , what needs to be done, at the time of prior > > questions it seemed to be a compile-time option of the VTK library, is > that > > still the case, Any exaples on line that are for the current release ? > > > Thanks > > > Robert > > > > > > > > > > > > -- > This e-mail and any attachments may contain confidential, copyright and or > privileged material, and are for the use of the intended addressee only. If > you are not the intended addressee or an authorised recipient of the > addressee please notify us of receipt by returning the e-mail and do not > use, copy, retain, distribute or disclose the information in or attached to > the e-mail. > Any opinions expressed within this e-mail are those of the individual and > not necessarily of Diamond Light Source Ltd. > Diamond Light Source Ltd. cannot guarantee that this e-mail or any > attachments are free from viruses and we cannot accept liability for any > damage which you may sustain as a result of software viruses which may be > transmitted in or with the message. > Diamond Light Source Limited (company no. 4375679). Registered in England > and Wales with its registered office at Diamond House, Harwell Science and > Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Atwood at diamond.ac.uk Fri Apr 27 11:06:25 2018 From: Robert.Atwood at diamond.ac.uk (Robert.Atwood at diamond.ac.uk) Date: Fri, 27 Apr 2018 15:06:25 +0000 Subject: [vtkusers] Python/VTK offscreen / headless rendering In-Reply-To: References: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> <20152d4e-b07b-a350-1a54-341bc14793fc@ebi.ac.uk> Message-ID: Thanks Max, that seems to install if I use a conda enviromnet to avoid messing up other users ? conda create --prefix /path/to/my/local/env source activate /path/to/my/local/env conda config --add channels conda-forge conda install mesalib vtk It?s still installing ? but it looks like then I have to update to Python 3 and vtk 8 ???? From: Max Smolens [mailto:max.smolens at kitware.com] Sent: 27 April 2018 14:52 To: Atwood, Robert (DLSLtd,RAL,SCI) Cc: Paul Korir; vtkusers at vtk.org Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering Hi Robert, The conda-forge channel includes a variant of the vtk package that supports offscreen rendering with OSMesa. This variant is chosen automatically if the mesalib package is installed when installing vtk: conda config --add channels conda-forge conda install mesalib vtk HTH, Max On Fri, Apr 27, 2018 at 7:16 AM, Robert.Atwood at diamond.ac.uk > wrote: Hi, Paul The difference is to get to the point where there is something rendered, without having to open a window on the terminal. In the case where I already know (or can calculate from the image data) the colour function and the transparency function, I know what camera angle I want and so on, I just want to run a background job on a remote workstation/cluster node to render that same view for a number of similar images (of the same object in different time steps) Instead of sitting on my computer watching it. But, the problem is that with the way I know how to do it, the creation of the render window trys to get a GL context, but it can't do that . If I try in python on a X-window connection even, I get the following ERROR: In /home/ilan/minonda/conda-bld/work/VTK-6.3.0/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 394 vtkXOpenGLRenderWindow (0x7f47c0fda000): Could not find a decent visual But maye the capability isn't compiled into the python package from Anaconda?? Is there a python package I can grab that has software rendering? I tried to buld the c++ from source of 7.1.1. But not successfully. .. ./CylinderRenderingProperties ERROR: In /dls/science/users/kny48981/sources/vtk/VTK-7.1.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 320 vtkXOpenGLRenderWindow (0xfc18a0): Could not find a decent config > -----Original Message----- > From: Paul Korir [mailto:pkorir at ebi.ac.uk] > Sent: 27 April 2018 11:09 > To: Atwood, Robert (DLSLtd,RAL,SCI); 'vtkusers at vtk.org' > Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering > > How different is what you need from writing the rendered output directly > to a file using one of the vtk*Writer classes? > > Correct me if I'm missing something. > > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > > On 23/04/2018 11:52, Robert.Atwood at diamond.ac.uk wrote: > > Hi, > > I would like to have a Python script to render several volume images > (tomography data) on a headless machine. I could not find any advice more > recent than 2011 , is this something that just isn't configured in the Python as > installed from existing packages? How do I tell? > > If it's not in the python , what needs to be done, at the time of prior > questions it seemed to be a compile-time option of the VTK library, is that > still the case, Any exaples on line that are for the current release ? > > Thanks > > Robert > > > > > > -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Atwood at diamond.ac.uk Fri Apr 27 11:13:22 2018 From: Robert.Atwood at diamond.ac.uk (Robert.Atwood at diamond.ac.uk) Date: Fri, 27 Apr 2018 15:13:22 +0000 Subject: [vtkusers] Python/VTK offscreen / headless rendering In-Reply-To: References: <3c058693e8ce47b9ada7995851fe7d70@diamond.ac.uk> <20152d4e-b07b-a350-1a54-341bc14793fc@ebi.ac.uk> Message-ID: <19885c45445d4b3e98437fa9b048331a@diamond.ac.uk> Hi, What is the change in vtk8 that means the composite function doesn?t exist ? what do I use instead? Thanks Traceback (most recent call last): File "./vtktomo.py", line 84, in compositeFunction = vtk.vtkVolumeRayCastCompositeFunction() AttributeError: module 'vtk' has no attribute 'vtkVolumeRayCastCompositeFunction' From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Robert.Atwood at diamond.ac.uk Sent: 27 April 2018 16:06 To: 'Max Smolens' Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering Thanks Max, that seems to install if I use a conda enviromnet to avoid messing up other users ? conda create --prefix /path/to/my/local/env source activate /path/to/my/local/env conda config --add channels conda-forge conda install mesalib vtk It?s still installing ? but it looks like then I have to update to Python 3 and vtk 8 ???? From: Max Smolens [mailto:max.smolens at kitware.com] Sent: 27 April 2018 14:52 To: Atwood, Robert (DLSLtd,RAL,SCI) Cc: Paul Korir; vtkusers at vtk.org Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering Hi Robert, The conda-forge channel includes a variant of the vtk package that supports offscreen rendering with OSMesa. This variant is chosen automatically if the mesalib package is installed when installing vtk: conda config --add channels conda-forge conda install mesalib vtk HTH, Max On Fri, Apr 27, 2018 at 7:16 AM, Robert.Atwood at diamond.ac.uk > wrote: Hi, Paul The difference is to get to the point where there is something rendered, without having to open a window on the terminal. In the case where I already know (or can calculate from the image data) the colour function and the transparency function, I know what camera angle I want and so on, I just want to run a background job on a remote workstation/cluster node to render that same view for a number of similar images (of the same object in different time steps) Instead of sitting on my computer watching it. But, the problem is that with the way I know how to do it, the creation of the render window trys to get a GL context, but it can't do that . If I try in python on a X-window connection even, I get the following ERROR: In /home/ilan/minonda/conda-bld/work/VTK-6.3.0/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 394 vtkXOpenGLRenderWindow (0x7f47c0fda000): Could not find a decent visual But maye the capability isn't compiled into the python package from Anaconda?? Is there a python package I can grab that has software rendering? I tried to buld the c++ from source of 7.1.1. But not successfully. .. ./CylinderRenderingProperties ERROR: In /dls/science/users/kny48981/sources/vtk/VTK-7.1.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 320 vtkXOpenGLRenderWindow (0xfc18a0): Could not find a decent config > -----Original Message----- > From: Paul Korir [mailto:pkorir at ebi.ac.uk] > Sent: 27 April 2018 11:09 > To: Atwood, Robert (DLSLtd,RAL,SCI); 'vtkusers at vtk.org' > Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering > > How different is what you need from writing the rendered output directly > to a file using one of the vtk*Writer classes? > > Correct me if I'm missing something. > > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > > On 23/04/2018 11:52, Robert.Atwood at diamond.ac.uk wrote: > > Hi, > > I would like to have a Python script to render several volume images > (tomography data) on a headless machine. I could not find any advice more > recent than 2011 , is this something that just isn't configured in the Python as > installed from existing packages? How do I tell? > > If it's not in the python , what needs to be done, at the time of prior > questions it seemed to be a compile-time option of the VTK library, is that > still the case, Any exaples on line that are for the current release ? > > Thanks > > Robert > > > > > > -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Apr 27 12:45:05 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 27 Apr 2018 12:45:05 -0400 Subject: [vtkusers] vtk 8.1.1 coming soon Message-ID: Hey folks, We are going to put out an 8.1.1 release in the next couple of weeks. If you have substantial bugs/fixes that you really want to see in it, please tag them with the 8.1.1 milestone in the issue tracker. This will be a patch release so we are only looking for bug fixes not new features over 8.1.0. thanks David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysa0829 at gmail.com Sun Apr 29 05:53:30 2018 From: ysa0829 at gmail.com (Ang) Date: Sun, 29 Apr 2018 02:53:30 -0700 (MST) Subject: [vtkusers] Can I obtain vtkImageData via vtkImageResliceMapper SlabMode result? Message-ID: <1524995610145-0.post@n5.nabble.com> Hi all , as title , Does someone do it before? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ashahrior.91994 at gmail.com Sun Apr 29 14:43:42 2018 From: ashahrior.91994 at gmail.com (Ashef Shahrior) Date: Mon, 30 Apr 2018 00:43:42 +0600 Subject: [vtkusers] Creating a GUI based project for VTK and ITK Message-ID: Hi, I have done some basic work with DICOM file segmentation and visualization using ITK and VTK in C++. I have built it with CMAKE and Visual Studio and run it with command prompt (Windows 10). But now I wish to make a Graphical User Interface for this so that I can give it more of a project look. How can I do this? Please, help. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.woelfer at tuhh.de Mon Apr 30 05:17:58 2018 From: simon.woelfer at tuhh.de (jonas1993) Date: Mon, 30 Apr 2018 02:17:58 -0700 (MST) Subject: [vtkusers] Move actor via console after "renderWindowInteractor->Start(); " Message-ID: <1525079878418-0.post@n5.nabble.com> Hello VTK-Users, any Code after "renderWindowInteractor->Start();" won't be executed until I close the RenderWindow. I want it to stay open and translate and rotate one actor with respect to another one by clicking buttons or entering values via console. Is there a good way to do this? I read about Timers.. but I want to change the position and orientation time-independent and in an arbitrary sequence of x,y,z,a,b,c. best regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From daniel.popp at online.de Mon Apr 30 08:45:43 2018 From: daniel.popp at online.de (Otto Popp) Date: Mon, 30 Apr 2018 14:45:43 +0200 Subject: [vtkusers] Mailing List Message-ID: An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Mon Apr 30 09:42:04 2018 From: aron.helser at kitware.com (Aron Helser) Date: Mon, 30 Apr 2018 09:42:04 -0400 Subject: [vtkusers] Creating a GUI based project for VTK and ITK In-Reply-To: References: Message-ID: Hi Ashef, VTK and ITK do not provide any prescribed way to do a GUI - there are hundreds of choices you could use, and they would all work. For instance, ParaView is built on VTK, and uses QT for it's GUI. You could also build a gui in Python, perhaps using wxWidgets python bindings. Since you are working with DICOM, instead you may want to look at 3D Slicer (https://www.slicer.org/) which is an open-source medical visualization app that uses VTK and ITK. You may be able to write a plugin for it which does what you want, and take advantage of all it's other features. The best choice may be something that you are familiar with, or something that you can get help with! Good luck, Aron On Sun, Apr 29, 2018 at 2:43 PM, Ashef Shahrior wrote: > Hi, I have done some basic work with DICOM file segmentation and > visualization using ITK and VTK in C++. I have built it with CMAKE and > Visual Studio and run it with command prompt (Windows 10). But now I wish > to make a Graphical User Interface for this so that I can give it more of a > project look. How can I do this? Please, help. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Apr 30 10:00:44 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 30 Apr 2018 10:00:44 -0400 Subject: [vtkusers] Creating a GUI based project for VTK and ITK In-Reply-To: References: Message-ID: In addition to what Aron said, there are some nice examples using Qt available on the VTK Examples GitHub: https://lorensen.github.io/VTKExamples/site/Cxx/#qt Cory On Mon, Apr 30, 2018 at 9:42 AM, Aron Helser wrote: > Hi Ashef, > VTK and ITK do not provide any prescribed way to do a GUI - there are > hundreds of choices you could use, and they would all work. For instance, > ParaView is built on VTK, and uses QT for it's GUI. You could also build a > gui in Python, perhaps using wxWidgets python bindings. > Since you are working with DICOM, instead you may want to look at 3D > Slicer (https://www.slicer.org/) which is an open-source medical > visualization app that uses VTK and ITK. You may be able to write a plugin > for it which does what you want, and take advantage of all it's other > features. > > The best choice may be something that you are familiar with, or something > that you can get help with! > Good luck, > Aron > > On Sun, Apr 29, 2018 at 2:43 PM, Ashef Shahrior > wrote: > >> Hi, I have done some basic work with DICOM file segmentation and >> visualization using ITK and VTK in C++. I have built it with CMAKE and >> Visual Studio and run it with command prompt (Windows 10). But now I wish >> to make a Graphical User Interface for this so that I can give it more of a >> project look. How can I do this? Please, help. Thank you. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Mon Apr 30 13:08:01 2018 From: juch at zhaw.ch (normanius) Date: Mon, 30 Apr 2018 10:08:01 -0700 (MST) Subject: [vtkusers] How to elevate a vtkImageData into a vtkAlgorithm object? Message-ID: <1525108081562-0.post@n5.nabble.com> For some type-juggling, I would like to transform an object into a object, very much like the for objects.I found the ImageAlgorithmFilter example that shows that something like this has existed. However, it seems not to be available in vtk 8.1.0.Does anyone know more about this?Many thanks for your help! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Apr 30 13:14:08 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 30 Apr 2018 11:14:08 -0600 Subject: [vtkusers] How to elevate a vtkImageData into a vtkAlgorithm object? In-Reply-To: <1525108081562-0.post@n5.nabble.com> References: <1525108081562-0.post@n5.nabble.com> Message-ID: The vtkImageChangeInformation filter is probably the best choice, since it's a passthrough filter (it doesn't make a copy of its input). - David On Mon, Apr 30, 2018 at 11:08 AM, normanius wrote: > For some type-juggling, I would like to transform an > > vtkImageData > > object into a > > vtkAlgorithm > > object, very much like the > > vtkPassThroughFilter > > for > > vtkPolyData > > objects. I found the ImageAlgorithmFilter example > > that shows that something like this has existed. However, it seems not to > be available in vtk 8.1.0. Does anyone know more about this? Many thanks > for your help! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Mon Apr 30 13:17:23 2018 From: juch at zhaw.ch (normanius) Date: Mon, 30 Apr 2018 10:17:23 -0700 (MST) Subject: [vtkusers] How to elevate a vtkImageData into a vtkAlgorithm object? In-Reply-To: References: <1525108081562-0.post@n5.nabble.com> Message-ID: <1525108643051-0.post@n5.nabble.com> Quick and useful, as usual. Many thanks, David! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Mon Apr 30 13:22:46 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 30 Apr 2018 11:22:46 -0600 Subject: [vtkusers] How to elevate a vtkImageData into a vtkAlgorithm object? In-Reply-To: <1525108643051-0.post@n5.nabble.com> References: <1525108081562-0.post@n5.nabble.com> <1525108643051-0.post@n5.nabble.com> Message-ID: You can also try vtkTrivialProducer, it's a special vtkAlgorithm that does nothing. Just create a vtkTrivialProducer and then call SetOutput() to set what its output should be. - David On Mon, Apr 30, 2018 at 11:17 AM, normanius wrote: > Quick and useful, as usual. Many thanks, David! > -------------- next part -------------- An HTML attachment was scrubbed... URL: