From marcwang17 at hotmail.com Thu Mar 1 00:06:59 2018 From: marcwang17 at hotmail.com (WackoWanderer) Date: Wed, 28 Feb 2018 22:06:59 -0700 (MST) Subject: [vtkusers] How to use vtkImageReSlicer? Message-ID: <1519880819276-0.post@n5.nabble.com> I am trying to use vtkImageReSlicer to extract a 2d slice from a 3d vtkImageData object. But I can't seem to get the recipe right. I am also a bit confused about ResliceAxes Matrix. Does it represent a cutting plane? If I move the ReSliceAxes origin will it also move the cutting plane? When I call Update on the vtkImageReSlicer, the program crashes. But when I don't call it, the output is empty. Here's what I have so far: -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From marcwang17 at hotmail.com Thu Mar 1 00:15:59 2018 From: marcwang17 at hotmail.com (WackoWanderer) Date: Wed, 28 Feb 2018 22:15:59 -0700 (MST) Subject: [vtkusers] How to use vtkImageReSlicer? In-Reply-To: <1519880819276-0.post@n5.nabble.com> References: <1519880819276-0.post@n5.nabble.com> Message-ID: <1519881359535-0.post@n5.nabble.com> For some reason my code wasn't pasted in the previous message. #my input is any vtkactor that contains a closed curve of type vtkPolyData ShapePolyData = actor.GetMapper().GetInput() boundingBox = ShapePolyData.GetBounds() for i in range(0,6,2): delta = boundingBox[i+1]-boundingBox[i] newBoundingBox.append(boundingBox[i]-0.5*delta) newBoundingBox.append(boundingBox[i+1]+0.5*delta) voxelizer = vtk.vtkVoxelModeller() voxelizer.SetInputData(ShapePolyData) voxelizer.SetModelBounds(newBoundingBox) voxelizer.SetScalarTypeToBit() voxelizer.SetForegroundValue(1) voxelizer.SetBackgroundValue(0) voxelizer.Update() VoxelModel =voxelizer.GetOutput() ImageOrigin = VoxelModel.GetOrigin() slicer = vtk.vtkImageReslice() #Am I setting the cutting axis here slicer.SetResliceAxesDirectionCosines(1,0,0,0,1,0,0,0,1) #if I increase the z axis of the origin, will the cutting plane move as well? slicer.SetResliceAxesOrigin(ImageOrigin[0],ImageOrigin[1],ImageOrigin[2]) slicer.SetInputData(VoxelModel) slicer.SetInterpolationModeToLinear() slicer.SetOutputDimensionality(2) slicer.Update() #this makes the code crash voxelSurface = vtk.vtkContourFilter() voxelSurface.SetInputConnection(slicer.GetOutputPort()) voxelSurface.SetValue(0, .999) voxelMapper = vtk.vtkPolyDataMapper() voxelMapper.SetInputConnection(voxelSurface.GetOutputPort()) voxelActor = vtk.vtkActor() voxelActor.SetMapper(voxelMapper) Renderer.AddActor(voxelActor) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From polly_sukting at hotmail.com Thu Mar 1 01:01:59 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Thu, 1 Mar 2018 06:01:59 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter Message-ID: Hi, I would like to obtain the areas which are removed in 'Red Image'. Green image is original data and Red image is the thresholded data. I applied "union operation" in order to get the areas. I used the code given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter But the areas that I wanted couldn't be shown completely in grey image. The polygons are not connected. Any suggestion on how can I improve this? [cid:447fa535-f257-4dc6-b3fc-6e3077cf35dd] Thanks. Best, Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolean.jpg Type: image/jpeg Size: 29351 bytes Desc: boolean.jpg URL: From kor1581 at gmail.com Thu Mar 1 04:38:41 2018 From: kor1581 at gmail.com (ran) Date: Thu, 1 Mar 2018 02:38:41 -0700 (MST) Subject: [vtkusers] How to draw an Interactive rectangle using vtk Message-ID: <1519897121160-0.post@n5.nabble.com> Hi, I'm using vtkResliceImageViewer to display a 2D dicom image. I need to draw a rectangle over the image to select part of the image and need to retrieve four corner coordinates. The rectangle should be interactive ie should be possible to change its size and position and rotate over the image in 2d plane independently. For this, I tried vtkBorderwidget, but it cannot be rotatable and also it only give coordinate of the two diagonal corners. I also tried vtkPlaneWidget but it rotates in 3d plane and couldn't restrict rotation in one plane as I only need rotation in 2d plane. Please help.. Thanks in advance -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Thu Mar 1 05:17:45 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 1 Mar 2018 03:17:45 -0700 Subject: [vtkusers] Problem with resizing an image In-Reply-To: <1519859462671-0.post@n5.nabble.com> References: <1519859462671-0.post@n5.nabble.com> Message-ID: On Wed, Feb 28, 2018 at 4:11 PM, ochampao wrote: > > The first approach uses vtkImageResize. When using this approach the image > that I am trying to resize appears unchanged on the screen. > Well, vtkImageResize is actually a resampling filter. So if you use it to change the Dimensions of the image, it's really resampling the image at a new resolution (i.e. a new pixel Spacing). So if you want to stretch one PNG so that it fits over another, then two steps are needed: 1) use vtkImageResize to resample 2) then use vtkImageChangeInformation to set the Spacing to be the same as the other image Also look at the BorderOn()/BorderOff() option of vtkImageResize. > The second approach uses vtkImageReslice. When using this approach the > image > is cropped rather than resized to match the dimensions of the first image > (the image to be resized has larger dimensions). So this approach works > partially. > I won't go into detail, but the general idea is that unless you use SetResliceTransform() or SetResliceAxes() to apply a physical image transformation, vtkImageReslice just does resampling and/or cropping and padding. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Thu Mar 1 05:42:21 2018 From: nztoddler at yahoo.com (Todd) Date: Thu, 01 Mar 2018 23:42:21 +1300 Subject: [vtkusers] How to draw an Interactive rectangle using vtk In-Reply-To: <1519897121160-0.post@n5.nabble.com> Message-ID: <3d912424-4858-43f9-bc00-345dcf5fbc04@email.android.com> An HTML attachment was scrubbed... URL: From tamim.boubou at gmail.com Thu Mar 1 05:57:37 2018 From: tamim.boubou at gmail.com (Tamim) Date: Thu, 1 Mar 2018 03:57:37 -0700 (MST) Subject: [vtkusers] Deleting VTK boxWidget Message-ID: <1519901857340-0.post@n5.nabble.com> Hi all, I'm trying to move a boxWidget with the keyboard and when I press 'delete' I want it to be deleted(obviously) I'm having troubles about the reference count and the stuff related to it. at first when the box is created I'm printing the reference count and it's 3 (I don't know why) inside the 'execute' function I'm checking again and it's 2 ? (I don't know why either) I know that in order to properly delete an object all other objects related to it has to be deleted right? but I'm unable to know what is the other object that is related to the box widget I'm using vtktransform,vtkmatrix4x4 vtkactor, and I've tried them all but non of them seems Here is the main parts of the code : //setters for the boxcallback class boxCallback->setWidget(m_boxWidget); boxCallback->SetActor(cube); boxCallback->setViewer(m_pclViewer); boxCallback->setID(m_referenceID); // observers. m_boxWidget->AddObserver(vtkCallbackCommand::StartInteractionEvent, boxCallback); m_boxWidget->AddObserver(vtkCallbackCommand::InteractionEvent, boxCallback); m_pclViewer->getRenderWindow()->GetRenderers()->GetFirstRenderer()->GetActiveCamera()->AddObserver(vtkCallbackCommand::ModifiedEvent, boxCallback); m_pclViewer->getRenderWindow()->GetInteractor()->AddObserver(vtkCallbackCommand::KeyPressEvent, boxCallback); // THE EXECUTE METHOD. virtual void Execute(vtkObject* caller, unsigned long event, void* data) { m_orientation = new double[3]; m_boxWidget->Print(std::cout); vtkSmartPointer boxRep = reinterpret_cast(m_boxWidget->GetRepresentation()); vtkSmartPointer boxMatrix = m_boxTransform->GetMatrix(); vtkSmartPointer tempMatrix = vtkSmartPointer::New(); switch (event) { case vtkCallbackCommand::KeyPressEvent: { // Keyboard event. m_keyPressed = m_pclViewer->getRenderWindow()->GetInteractor()->GetKeySym(); //get the pressed key from the user // Get the transform of the box and store it in a 4x4 transformation matrix boxRep->GetTransform(m_boxTransform); boxMatrix = m_boxTransform->GetMatrix(); m_cam->GetPosition(m_camPos_a); // Store the latest position of the box in a new matrix with default orientation : tempMatrix->SetElement(0, 3, boxMatrix->GetElement(0, 3)); tempMatrix->SetElement(1, 3, boxMatrix->GetElement(1, 3)); tempMatrix->SetElement(2, 3, boxMatrix->GetElement(2, 3)); m_tempTransform->SetMatrix(tempMatrix); //Get the orientation of the camera ,do some adjustments and calculate the distance for the box to be moved. m_orientation = m_cam->GetOrientation(); double movingValue = getvalueByPressedKey(MOVEMENT_FACTOR); // initial camera orientation at Z is 90 ....made it zero so we don't have to rotate the box m_orientation[2] = 90 - m_orientation[2]; m_xDistance = movingValue * cos(m_orientation[2] * PI / 180); m_yDistance = movingValue * sin(m_orientation[2] * PI / 180); // According to current key pressed do. KeyboardCharacter keyPressed = getKeyboardCharacter(); switch (keyPressed) { case KeyboardCharacter::UnknownKey: { break; } case KeyboardCharacter::TopView: { m_cam->SetFocalPoint(boxMatrix->GetElement(0, 3), boxMatrix->GetElement(1, 3), boxMatrix->GetElement(2, 3)); m_pclViewer->setCameraPosition(boxMatrix->GetElement(0, 3), boxMatrix->GetElement(1, 3), upValue * 2 + boxMatrix->GetElement(2, 3), 1, 0, 0); break; } case KeyboardCharacter::FrontView: { m_cam->SetFocalPoint(boxMatrix->GetElement(0, 3), boxMatrix->GetElement(1, 3), boxMatrix->GetElement(2, 3)); m_pclViewer->setCameraPosition(-upValue + boxMatrix->GetElement(0, 3), boxMatrix->GetElement(1, 3), boxMatrix->GetElement(2, 3), 0, 0, 1); break; } case KeyboardCharacter::LeftView: { m_cam->SetFocalPoint(boxMatrix->GetElement(0, 3), boxMatrix->GetElement(1, 3), boxMatrix->GetElement(2, 3)); m_pclViewer->setCameraPosition(boxMatrix->GetElement(0, 3), leftRightVAlue + boxMatrix->GetElement(1, 3), boxMatrix->GetElement(2, 3), 0, 0, 1); break; } case KeyboardCharacter::RightView: { m_cam->SetFocalPoint(boxMatrix->GetElement(0, 3), boxMatrix->GetElement(1, 3), boxMatrix->GetElement(2, 3)); m_pclViewer->setCameraPosition(boxMatrix->GetElement(0, 3), -leftRightVAlue + boxMatrix->GetElement(1, 3), boxMatrix->GetElement(2, 3), 0, 0, 1); break; } case KeyboardCharacter::MoveUp: { m_tempTransform->Translate(m_xDistance, m_yDistance, 0); break; } case KeyboardCharacter::MoveDown: { m_tempTransform->Translate(-m_xDistance, -m_yDistance, 0); break; } case KeyboardCharacter::MoveLeft: { m_tempTransform->Translate(-m_yDistance, m_xDistance, 0); break; } case KeyboardCharacter::MoveRight: { m_tempTransform->Translate(m_yDistance, -m_xDistance, 0); break; } case KeyboardCharacter::MoveTop: { m_tempTransform->Translate(0, 0, MOVEMENT_FACTOR); break; } case KeyboardCharacter::MoveBottom: { m_tempTransform->Translate(0, 0, -MOVEMENT_FACTOR); break; } /*// HERE IS THE IMPORTANT PART */ case KeyboardCharacter::DeleteLabel: { std::cout << "widget refrence count at first:" << std::endl; std::cout << m_boxWidget->GetReferenceCount() << std::endl; // actor std::cout << "initial for the actor" << std::endl; std::cout << m_actor->GetReferenceCount() << std::endl; m_pclViewer->getRenderWindow()->GetRenderers()->GetFirstRenderer()->RemoveActor(m_actor); std::cout << "remove actor (renderer)" << std::endl; std::cout << m_actor->GetReferenceCount() << std::endl; m_pclViewer->removeShape(m_boxID); std::cout << "pcl remove shape " << std::endl; std::cout << m_actor->GetReferenceCount() << std::endl;// correct...the reference count is 1 // m_actor->Delete(); // end actor std::cout << "widget refrence count " << std::endl; //2 std::cout << m_boxWidget->GetReferenceCount() << std::endl; std::cout << "represntation refrence count " << std::endl; //3 std::cout << boxRep->GetReferenceCount() << std::endl; std::cout << "boxtransform refrence count before delete: " << std::endl; //1 std::cout << m_boxTransform->GetReferenceCount() << std::endl; std::cout << "temptransform refrence count before delete " << std::endl; //1 std::cout << m_tempTransform->GetReferenceCount() << std::endl; std::cout << "boxmatrix refrence count before delete " << std::endl; //2 std::cout << boxMatrix->GetReferenceCount() << std::endl; std::cout << "tempmatrix refrence count before delete " << std::endl; //1 ? std::cout << tempMatrix->GetReferenceCount() << std::endl; std::cout << "now tmp matrix, box transform, tmptransform are deleted" << std::endl; tempMatrix->Delete(); m_boxTransform->Delete(); m_tempTransform->Delete(); std::cout << "boxmatrix refrence count after delete " << std::endl; //1 std::cout << boxMatrix->GetReferenceCount() << std::endl; boxMatrix->Delete(); m_boxWidget->Delete(); m_boxWidget->Print(std::cout); std::cout << "represntation refrence count after delete: " << std::endl; std::cout << boxRep->GetReferenceCount() << std::endl; std::cout << "OUTSIDE DELETE." << std::endl; break; } default: break; } // REST OF THE CODE (I don't think it's relevant) //Store the new position after translation and restore the current orientation of the box. m_tempTransform->GetPosition(m_boxPos_a); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { tempMatrix->SetElement(i, j, boxMatrix->GetElement(i, j)); } } tempMatrix->SetElement(0, 3, m_boxPos_a[0]); tempMatrix->SetElement(1, 3, m_boxPos_a[1]); tempMatrix->SetElement(2, 3, m_boxPos_a[2]); m_tempTransform->SetMatrix(tempMatrix); // applying the transform and updating the screen boxRep->SetTransform(m_tempTransform); this->m_actor->SetUserTransform(m_tempTransform); m_pclViewer->getRenderWindow()->Render(); break; } } } any hint or idea would be great . -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ochampao at hotmail.com Thu Mar 1 07:09:37 2018 From: ochampao at hotmail.com (ochampao) Date: Thu, 1 Mar 2018 05:09:37 -0700 (MST) Subject: [vtkusers] Problem with resizing an image In-Reply-To: References: <1519859462671-0.post@n5.nabble.com> Message-ID: <1519906177652-0.post@n5.nabble.com> Hi David. Your first recommendation using vtkImageResize followed by vtkImageChangeInformation works vert well. Thanks a lot for you help. For reference, here is my working code: vtkNew resizeFilter; resizeFilter->SetResizeMethodToOutputDimensions(); resizeFilter->SetOutputDimensions(image1_dims[0], image1_dims[1], 0); resizeFilter->InterpolateOn(); resizeFilter->SetInputData(image2); resizeFilter->Update(); vtkNew changeFilter; changeFilter->SetInputConnection(resizeFilter->GetOutputPort()); changeFilter->SetOutputSpacing(image1->GetSpacing()); changeFilter->Update(); Regards, P. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Thu Mar 1 08:01:03 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 1 Mar 2018 08:01:03 -0500 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: Message-ID: On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui wrote: > Hi, > > I would like to obtain the areas which are removed in 'Red Image'. > Couldn't you invert the threshold operation to produce those areas instead of the red surface? > Green image is original data and Red image is the thresholded data. > > I applied "union operation" in order to get the areas. I used the code > given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ > BooleanOperationPolyDataFilter > The boolean operation filter won't work in this case because it does not handle boolean operations on overlapping surfaces. HTH, Cory > But the areas that I wanted couldn't be shown completely in grey image. > The polygons are not connected. > > Any suggestion on how can I improve this? > > > > Thanks. > > Best, > > 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 > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolean.jpg Type: image/jpeg Size: 29351 bytes Desc: not available URL: From bill.lorensen at gmail.com Thu Mar 1 09:16:59 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 1 Mar 2018 06:16:59 -0800 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: Message-ID: First, please use the new VTKExamples website: https://lorensen.github.io/VTKExamples/site The old wiki examples are no longer supported. Take a look at this example: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/FillHoles/ On Wed, Feb 28, 2018 at 10:01 PM, Polly Pui wrote: > Hi, > > I would like to obtain the areas which are removed in 'Red Image'. > > Green image is original data and Red image is the thresholded data. > > I applied "union operation" in order to get the areas. I used the code > given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ > BooleanOperationPolyDataFilter > > But the areas that I wanted couldn't be shown completely in grey image. > The polygons are not connected. > > Any suggestion on how can I improve this? > > > > Thanks. > > Best, > > 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 > > -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolean.jpg Type: image/jpeg Size: 29351 bytes Desc: not available URL: From gdeee at web.de Thu Mar 1 11:54:50 2018 From: gdeee at web.de (gde23) Date: Thu, 1 Mar 2018 09:54:50 -0700 (MST) Subject: [vtkusers] vtkPointInterpolator2D not interpolating In-Reply-To: References: <1519563733787-0.post@n5.nabble.com> Message-ID: <1519923290834-0.post@n5.nabble.com> @kenichiro yoshimi: Thanks a lot. Your example is working. Then I'll have to search for the error somewhere else. Best regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andrew.buckler at elucidbio.com Thu Mar 1 17:27:11 2018 From: andrew.buckler at elucidbio.com (Andrew J. Buckler (Elucid Bioimaging)) Date: Thu, 1 Mar 2018 22:27:11 +0000 Subject: [vtkusers] VTK 8.0.1 with Qt 5.10.1 Message-ID: Hello, I have a successfully built and running application using VTK (multiple versions, including 8 and earlier) running with Qt 5.5.1. It uses QVTKWidget extensively. At this time I am working to upgrade to Qt 5.10.1, specifically pairing it with VTK 8.0.1. Having successfully built Qt from source, I built VTK as follows: tar -xvzf VTK-8.0.1.tar.gz mkdir VTK-8.0.1-build cd VTK-8.0.1-build cmake -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS:BOOL=OFF -DQT_QMAKE_EXECUTABLE:PATH=/usr/local/Qt-5.10.1/bin/qmake -DCMAKE_PREFIX_PATH=/usr/local/Qt-5.10.1/ -DVTK_Group_Qt:BOOL=ON -DVTK_Group_Qt=1 -DVTK_QT_VERSION=5 ../VTK-8.0.1 make -j4 make install My application compiles and links without error on macOS 10.13, but the QVTKWidgets have erratic and inconsistent behavior. Specifically: 1. Two of them work perfectly well. 2. Some of them do not work at all, that is, have either a blank content or seem to have a double-buffering error where old content from a portion of the screen where the widget is supposed to be displays previously displayed content at that location, rather than the correct content. 3. Some of them show the correct content for a second or two and then revert to blank. It may be that the VTK build needs to be done with different flags, or some known incompatibility exists, or anything else. If anyone has run into this your help would be appreciated, or short of seeing the problem specifically any suggested debugging strategies would be great. With thanks, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From 312438111 at qq.com Thu Mar 1 21:29:19 2018 From: 312438111 at qq.com (=?gb18030?B?0e7B+Lb5x+A=?=) Date: Fri, 2 Mar 2018 10:29:19 +0800 Subject: [vtkusers] how to use vtkresliceimageviewer Message-ID: Hello guys, I wanna show the same directional image in different qvtkwidgets,like this I want to show four same cross-sectional in four qvtkwidgets,but one riw[2](riw[2] = vtkSmartPointer::New(); ) only can show once(like this riw[2]->SetRenderWindow(ui.view1->GetRenderWindow());). If I put riw[2] in the second qvtkwidget(riw[2]->SetRenderWindow(ui.view2->GetRenderWindow());) the first qvtkwidget will become empty.So I have to new one everytime.But if I want to do the same change,I have to change four times. I've tried several classes like vtkResliceImageViewer,vtkImagePlaneWidget and vtkImageViewer2,and they are all have this problem.which class could show the same directional image several times ? please HELP. Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BD6D0DA1 at CFD4D072.FFB6985A.jpg.jpg Type: image/jpeg Size: 43988 bytes Desc: not available URL: From Philipp.Fischer at dlr.de Fri Mar 2 06:21:46 2018 From: Philipp.Fischer at dlr.de (Philipp.Fischer at dlr.de) Date: Fri, 2 Mar 2018 11:21:46 +0000 Subject: [vtkusers] Compile VTk Linux Libraries without symbolic links Message-ID: <8A9D92E1C202244C9FBE5FF37B67B27B53004F98@DLDEFFMIMP03EXC.intra.dlr.de> Hi, I am struggling to compile VTK in a way, that no symbolic links are sued for the library names. What I am getting is e.g.: libvtkCommonXYZ-8.1.so.1 libvtkCommonXYZ-8.1.so -> libvtkCommonXYZ-8.1.so.1 What I would like to have is that I just get the libraries compiled to the "so"s and the symbolic names to not be generated. Some help to setup the build process accordingly would be great. Cheers Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri Mar 2 07:08:36 2018 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 2 Mar 2018 07:08:36 -0500 Subject: [vtkusers] Compile VTk Linux Libraries without symbolic links In-Reply-To: <8A9D92E1C202244C9FBE5FF37B67B27B53004F98@DLDEFFMIMP03EXC.intra.dlr.de> References: <8A9D92E1C202244C9FBE5FF37B67B27B53004F98@DLDEFFMIMP03EXC.intra.dlr.de> Message-ID: <20180302120836.GA9083@megas.kitware.com> On Fri, Mar 02, 2018 at 11:21:46 +0000, Philipp.Fischer at dlr.de wrote: > What I would like to have is that I just get the libraries compiled to > the "so"s and the symbolic names to not be generated. > > Some help to setup the build process accordingly would be great. The VTK build doesn't support that. What's your goal? --Ben From majid.msadeghi at yahoo.com Fri Mar 2 10:20:45 2018 From: majid.msadeghi at yahoo.com (Majid M. Sadeghi) Date: Fri, 2 Mar 2018 15:20:45 +0000 (UTC) Subject: [vtkusers] object orientation detection References: <1903632477.9254637.1520004045990.ref@mail.yahoo.com> Message-ID: <1903632477.9254637.1520004045990@mail.yahoo.com> Dear All, I have a 3D object which is located in an arbitrary positionand orientation in the space. My goal is to roughly find the orientation of theobject. To achieve that, I think I need a descriptor of the object todefine it. For that descriptor I am thinking maybe a skeleton of the object willwork, since my object?s shape is a specific shape with certain twists andcorners. After having the descriptor I need to be able to find theorientation of the descriptor. And for this I am thinking I might be able touse certain relationships of points located on the skeleton, with each other orwith the origin of the space. So my questions are: 1. Is there a better method to do this? (Finding theorientation of an object) 2. Is there a method in VTK/ITK to extract the skeleton ofan object? 3. Is there any other descriptor available in VTK/ITK whichmight be helpful??Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Fri Mar 2 10:48:58 2018 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 2 Mar 2018 10:48:58 -0500 Subject: [vtkusers] [ITK-users] object orientation detection In-Reply-To: <1903632477.9254637.1520004045990@mail.yahoo.com> References: <1903632477.9254637.1520004045990.ref@mail.yahoo.com> <1903632477.9254637.1520004045990@mail.yahoo.com> Message-ID: Hi Majid, we have moved to discourse forum. Reposting your question there might yield more answers. Finding orientation of an arbitrary object depends a lot on the shape of the object and the surrounding background image content. There is a 2D and 3D skeletonization filter. You might try objectness and vesselenss filters. Regards, D?enan On Fri, Mar 2, 2018 at 10:20 AM, Majid M. Sadeghi via Insight-users < insight-users at itk.org> wrote: > Dear All, > > I have a 3D object which is located in an arbitrary position and > orientation in the space. My goal is to roughly find the orientation of the > object. > > To achieve that, I think I need a descriptor of the object to define it. > For that descriptor I am thinking maybe a skeleton of the object will work, > since my object?s shape is a specific shape with certain twists and corners. > > After having the descriptor I need to be able to find the orientation of > the descriptor. And for this I am thinking I might be able to use certain > relationships of points located on the skeleton, with each other or with > the origin of the space. > > So my questions are: > > 1. Is there a better method to do this? (Finding the orientation of an > object) > > 2. Is there a method in VTK/ITK to extract the skeleton of an object? > > 3. Is there any other descriptor available in VTK/ITK which might be > helpful? > > Thanks. > > The ITK community is transitioning from this mailing list to > discourse.itk.org. Please join us there! > ________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > https://itk.org/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From polly_sukting at hotmail.com Fri Mar 2 13:39:23 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Fri, 2 Mar 2018 18:39:23 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: , Message-ID: Hi Cory, Thanks for your reply. I extracted the result in red image by using the vtkthreshold (ThresholdByLower=0.085). I tried to invert the extraction by using ThresholdByUpper=0.015, but the result weren't what i wanted. The red image with white holes (the removed areas are what i wanted). The blue area is extracted using the inverted value of threshold. [cid:f7c26712-986e-4e9b-9c1f-0174777617ab] I cant really understand what do you mean by boolean operations cant work on this case. Are we not able to obtain the areas using "difference" operation? Best, Polly ________________________________ From: Cory Quammen Sent: Thursday, March 1, 2018 9:01 PM To: Polly Pui Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui > wrote: Hi, I would like to obtain the areas which are removed in 'Red Image'. Couldn't you invert the threshold operation to produce those areas instead of the red surface? Green image is original data and Red image is the thresholded data. I applied "union operation" in order to get the areas. I used the code given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter The boolean operation filter won't work in this case because it does not handle boolean operations on overlapping surfaces. HTH, Cory But the areas that I wanted couldn't be shown completely in grey image. The polygons are not connected. Any suggestion on how can I improve this? [cid:447fa535-f257-4dc6-b3fc-6e3077cf35dd] Thanks. Best, 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 vtkusers Info Page - VTK - The Visualization Toolkit vtk.org To see the collection of prior postings to the list, visit the vtkusers Archives. Using vtkusers: To post a message to all the list members, send ... -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolean.jpg Type: image/jpeg Size: 29351 bytes Desc: boolean.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: above_below.jpg Type: image/jpeg Size: 68707 bytes Desc: above_below.jpg URL: From polly_sukting at hotmail.com Fri Mar 2 13:48:32 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Fri, 2 Mar 2018 18:48:32 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: , Message-ID: Hi Lorensen, Thanks for your reply. I will check it out. By the way, do you have any idea on how i can invert the thresholded areas in Red image. I extracted this result by using vtkthreshold, ThresholdByLower. Is there any solution that i can show the areas that meet the criterion, instead of removing the areas? Best, Polly ________________________________ From: Bill Lorensen Sent: Thursday, March 1, 2018 10:16 PM To: Polly Pui Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter First, please use the new VTKExamples website: https://lorensen.github.io/VTKExamples/site The old wiki examples are no longer supported. Take a look at this example: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/FillHoles/ FillHoles - GitHub Pages lorensen.github.io Download and Build FillHoles? Click here to download FillHoles and its CMakeLists.txt file. Once the tarball FillHoles.tar has been downloaded and extracted, On Wed, Feb 28, 2018 at 10:01 PM, Polly Pui > wrote: Hi, I would like to obtain the areas which are removed in 'Red Image'. Green image is original data and Red image is the thresholded data. I applied "union operation" in order to get the areas. I used the code given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter www.vtk.org Download and Build BooleanOperationPolyDataFilter. Click here to download BooleanOperationPolyDataFilter. and its CMakeLists.txt file. Once the tarball ... But the areas that I wanted couldn't be shown completely in grey image. The polygons are not connected. Any suggestion on how can I improve this? [cid:447fa535-f257-4dc6-b3fc-6e3077cf35dd] Thanks. Best, 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 vtkusers Info Page - VTK - The Visualization Toolkit vtk.org To see the collection of prior postings to the list, visit the vtkusers Archives. Using vtkusers: To post a message to all the list members, send ... -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolean.jpg Type: image/jpeg Size: 29351 bytes Desc: boolean.jpg URL: From cory.quammen at kitware.com Fri Mar 2 14:03:41 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 2 Mar 2018 14:03:41 -0500 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: Message-ID: On Fri, Mar 2, 2018 at 1:39 PM, Polly Pui wrote: > Hi Cory, > > Thanks for your reply. > > I extracted the result in red image by using the vtkthreshold > (ThresholdByLower=0.085). > > I tried to invert the extraction by using ThresholdByUpper=0.015, but the > result weren't what i wanted. > > The red image with white holes (the removed areas are what i wanted). The > blue area is extracted using the inverted value of threshold. > I think calling vtkThreshold::AllScalarsOff() should fix it. > > I cant really understand what do you mean by boolean operations cant work > on this case. > > Are we not able to obtain the areas using "difference" operation? > You are right in principle that a boolean operation should be able to do this. In practice, however, the existing boolean operations filter makes some assumptions about the input data, namely that each input geometry defines an enclosed volume and that no two intersecting polygons in the input geometries are coplanar. The output of the filter is a new surface that encloses the union, difference, or intersection of the volumes enclosed by the input geometries. This test case violates both assumptions, hence it won't work. Best, Cory > Best, > Polly > ------------------------------ > *From:* Cory Quammen > *Sent:* Thursday, March 1, 2018 9:01 PM > *To:* Polly Pui > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkBooleanOperationPolyDataFilter > > > > On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui > wrote: > > Hi, > > I would like to obtain the areas which are removed in 'Red Image'. > > Couldn't you invert the threshold operation to produce those areas instead > of the red surface? > > Green image is original data and Red image is the thresholded data. > > I applied "union operation" in order to get the areas. I used the code > given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/Boolea > nOperationPolyDataFilter > > The boolean operation filter won't work in this case because it does not > handle boolean operations on overlapping surfaces. > > HTH, > Cory > > But the areas that I wanted couldn't be shown completely in grey image. > The polygons are not connected. > > Any suggestion on how can I improve this? > > > > Thanks. > > Best, > > Polly > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > vtkusers Info Page - VTK - The Visualization Toolkit > > vtk.org > To see the collection of prior postings to the list, visit the vtkusers > Archives. Using vtkusers: To post a message to all the list members, send > ... > > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolean.jpg Type: image/jpeg Size: 29351 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: above_below.jpg Type: image/jpeg Size: 68707 bytes Desc: not available URL: From vincentrivola at hotmail.com Fri Mar 2 15:11:44 2018 From: vincentrivola at hotmail.com (Vincent RIVOLA) Date: Fri, 2 Mar 2018 20:11:44 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: Message-ID: Hi, Do you apply vtkThreshold on cell values or point values? This will make a difference and I guess the missing cells is related to that. If you really want to get the complementary part you should apply TheresoldByLower and ThresholdByUpper on cell data I think. Regards, Vincent Le 2 mars 2018 ? 19:39, Polly Pui > a ?crit : Hi Cory, Thanks for your reply. I extracted the result in red image by using the vtkthreshold (ThresholdByLower=0.085). I tried to invert the extraction by using ThresholdByUpper=0.015, but the result weren't what i wanted. The red image with white holes (the removed areas are what i wanted). The blue area is extracted using the inverted value of threshold. I cant really understand what do you mean by boolean operations cant work on this case. Are we not able to obtain the areas using "difference" operation? Best, Polly ________________________________ From: Cory Quammen > Sent: Thursday, March 1, 2018 9:01 PM To: Polly Pui Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui > wrote: Hi, I would like to obtain the areas which are removed in 'Red Image'. Couldn't you invert the threshold operation to produce those areas instead of the red surface? Green image is original data and Red image is the thresholded data. I applied "union operation" in order to get the areas. I used the code given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter The boolean operation filter won't work in this case because it does not handle boolean operations on overlapping surfaces. HTH, Cory But the areas that I wanted couldn't be shown completely in grey image. The polygons are not connected. Any suggestion on how can I improve this? Thanks. Best, 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 vtkusers Info Page - VTK - The Visualization Toolkit vtk.org To see the collection of prior postings to the list, visit the vtkusers Archives. Using vtkusers: To post a message to all the list members, send ... -- Cory Quammen Staff R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlewis at accuray.com Fri Mar 2 17:57:44 2018 From: jlewis at accuray.com (Jeffery Lewis) Date: Fri, 2 Mar 2018 22:57:44 +0000 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter Message-ID: I have a prototype that generates a super toroid surface model. A cut plane is defined to be orthogonal to the camera line of sight, and cuts through the middle of the surface model. The cut contour (generated by vtkCutter), and filled cut contour (generated by vtkContourTriangulator) is rendered with the surface model. The surface model is shown transparent as it is only a reference. The rendering of interest is the cut contour (shown as red contour) and filled cut contour (shown as green). Moving the mouse rotates the surface model. The cut plane stays orthogonal to the camera while the surface model rotates. By rotating the surface model, you can see the cut contour and filled cut contour get updated interactively as it slices through the middle of the surface model. Unfortunately, the filled cut contour does not look right and I can't seem to figure it out. If I change the surface model to something simpler like a cone, then everything looks fine. Also of note is that if I switch out the vtkCutter with a vtkPlaneCutter, the program crashes. I would like to use the vtkPlaneCutter since from its documentation seems to indicate that it will get better performance. The vtkPlaneCutter crashes using either the super toroid or cone. Attached is the source code. The stuff between "// Setup a slider widget for each varying parameter BEGIN" and "// Setup a slider widget for each varying parameter END" can be ignored as this only involves setting up sliders to manipulate the super toroid, which comes from the ParametricSuperToroidDemo example. The setup of the pipleline for the cut contour and filled cut contour is near the bottom. Also attached is a sample screen shot of the incorrect filled cut contour. [cid:image013.png at 01D3B236.CFCA0DE0] [cid:image014.png at 01D3B236.CFCA0DE0] [cid:image015.png at 01D3B236.CFCA0DE0] [cid:image016.png at 01D3B236.CFCA0DE0] [cid:image017.png at 01D3B236.CFCA0DE0] Jeffery Lewis Staff Software Engineer, Treatment Planning Systems 1310 Chesapeake Terrace Sunnyvale, CA 94089 USA Tel: 1.408.789.4367 jlewis at accuray.com -- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image013.png Type: image/png Size: 12364 bytes Desc: image013.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image014.png Type: image/png Size: 1447 bytes Desc: image014.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image015.png Type: image/png Size: 1625 bytes Desc: image015.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image016.png Type: image/png Size: 1612 bytes Desc: image016.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image017.png Type: image/png Size: 1344 bytes Desc: image017.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image018.jpg Type: image/jpeg Size: 831 bytes Desc: image018.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: VOISlicePrototype.cpp URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SuperToroidWithIncorrectFilledCutContour.png Type: image/png Size: 90337 bytes Desc: SuperToroidWithIncorrectFilledCutContour.png URL: From jlewis at accuray.com Fri Mar 2 18:46:09 2018 From: jlewis at accuray.com (Jeffery Lewis) Date: Fri, 2 Mar 2018 23:46:09 +0000 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter (Jeffery Lewis) Message-ID: Seems like the attachments didn't go through. Here is the code. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Callbacks for the interactions class SliderCallbackN1 : public vtkCommand { public: static SliderCallbackN1 *New() { return new SliderCallbackN1; } virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkSliderWidget *sliderWidget = reinterpret_cast(caller); double value = static_cast(sliderWidget->GetRepresentation())->GetValue(); this->SuperToroid->SetN1(value); } SliderCallbackN1() :SuperToroid(0) {} vtkParametricSuperToroid *SuperToroid; }; class SliderCallbackN2 : public vtkCommand { public: static SliderCallbackN2 *New() { return new SliderCallbackN2; } virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkSliderWidget *sliderWidget = reinterpret_cast(caller); double value = static_cast(sliderWidget->GetRepresentation())->GetValue(); this->SuperToroid->SetN2(value); } SliderCallbackN2() :SuperToroid(0) {} vtkParametricSuperToroid *SuperToroid; }; /**This callback will rotate the surface model about x and y axis depending on the *current location of the mouse. This will in turn update the cut plane that is ment to *be normal to the camera and cuts through the middle of the model, showing a red *cut contour, and green filled contour. */ class InteractionCallback : public vtkCommand { public: static InteractionCallback* New() { return new InteractionCallback; } virtual void Execute(vtkObject*, unsigned long eventID, void* pCallData) VTK_OVERRIDE { if (eventID == vtkCommand::MouseMoveEvent) { // Get the current mouse position. int aiCurrentPosition[2]; m_pInteractor->GetEventPosition(aiCurrentPosition); // Get the view port size. int iViewPortWidth = m_pInteractor->GetRenderWindow()->GetSize()[0]; int iViewPortHeight = m_pInteractor->GetRenderWindow()->GetSize()[1]; // Compute rotations about x and y axis. int iMousePositionAboutCenterX = aiCurrentPosition[0] - iViewPortWidth/2.0; int iMousePositionAboutCenterY = aiCurrentPosition[1] - iViewPortHeight/2.0; double dRotationAboutX = -iMousePositionAboutCenterY/(iViewPortHeight/2.0)*180.0; double dRotationAboutY = iMousePositionAboutCenterX/(iViewPortWidth/2.0)*180.0; // Compute transform. vtkSmartPointer sptmSurfacModel = vtkSmartPointer::New(); sptmSurfacModel->RotateX(dRotationAboutX); sptmSurfacModel->RotateY(dRotationAboutY); // Apply the rotation to the surface model actor. m_pActorSurface->SetUserMatrix(sptmSurfacModel->GetMatrix()); // Apply the change to the cut plan normal vector. // Translations are not required to be removed from the matrix since there should be none. double adInitialVector[3]; adInitialVector[0] = 0.0; adInitialVector[1] = 0.0; adInitialVector[2] = 1.0; double adTransformedVector[3]; sptmSurfacModel->TransformPoint(adInitialVector, adTransformedVector); m_pCutPlane->SetNormal(adTransformedVector[0], adTransformedVector[1], adTransformedVector[2]); // Apply the rotation to the contour actor in the opposite direction to make normal to camera. sptmSurfacModel->Inverse(); m_pActorContour->SetUserMatrix(sptmSurfacModel->GetMatrix()); // Apply the rotation to the filled actor in the opposite direction to make normal to camera. m_pActorFilled->SetUserMatrix(sptmSurfacModel->GetMatrix()); m_pInteractor->Render(); } } // Member variables // ---------------- vtkRenderWindowInteractor* m_pInteractor; vtkActor* m_pActorSurface; vtkPlane* m_pCutPlane; vtkActor* m_pActorContour; vtkActor* m_pActorFilled; }; int main(int, char *[]) { vtkSmartPointer surface =vtkSmartPointer::New(); vtkSmartPointer source = vtkSmartPointer::New(); source->SetParametricFunction(surface); // Create a synthetic cone. /*// Un-commented out so can switch surface model source. vtkSmartPointer source = vtkSmartPointer::New(); source->SetCenter(0, 0, 0); source->SetRadius(1); source->SetHeight(2); source->SetResolution(30); source->Update(); */ vtkSmartPointer renderer =vtkSmartPointer::New(); vtkSmartPointer mapper =vtkSmartPointer::New(); vtkSmartPointer actor = vtkSmartPointer::New(); mapper->SetInputConnection(source->GetOutputPort()); vtkSmartPointer backProperty = vtkSmartPointer::New(); backProperty->SetColor(0.8, 0.8, 0.8); backProperty->SetOpacity(0.6); actor->SetMapper(mapper); actor->SetBackfaceProperty(backProperty); actor->GetProperty()->SetDiffuseColor(1, 1, 1); actor->GetProperty()->SetOpacity(0.6); vtkSmartPointer renderWindow =vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); renderWindow->SetSize(640, 480); renderer->AddActor(actor); renderer->SetBackground(.2, .3, .4); vtkSmartPointer interactor =vtkSmartPointer::New(); interactor->SetRenderWindow(renderWindow); // Setup a slider widget for each varying parameter BEGIN double tubeWidth(.004); double sliderLength(.004); double titleHeight(.02); double labelHeight(.02); vtkSmartPointer sliderRepN1 = vtkSmartPointer::New(); sliderRepN1->SetMinimumValue(0.0); sliderRepN1->SetMaximumValue(4.0); sliderRepN1->SetValue(1.0); sliderRepN1->SetTitleText("Z squareness"); sliderRepN1->GetPoint1Coordinate()->SetCoordinateSystemToNormalizedDisplay(); sliderRepN1->GetPoint1Coordinate()->SetValue(.1, .1); sliderRepN1->GetPoint2Coordinate()->SetCoordinateSystemToNormalizedDisplay(); sliderRepN1->GetPoint2Coordinate()->SetValue(.9, .1); sliderRepN1->SetTubeWidth(tubeWidth); sliderRepN1->SetSliderLength(sliderLength); sliderRepN1->SetTitleHeight(titleHeight); sliderRepN1->SetLabelHeight(labelHeight); vtkSmartPointer sliderWidgetN1 = vtkSmartPointer::New(); sliderWidgetN1->SetInteractor(interactor); sliderWidgetN1->SetRepresentation(sliderRepN1); sliderWidgetN1->SetAnimationModeToAnimate(); sliderWidgetN1->EnabledOn(); vtkSmartPointer callbackN1 = vtkSmartPointer::New(); callbackN1->SuperToroid = surface; sliderWidgetN1->AddObserver(vtkCommand::InteractionEvent, callbackN1); vtkSmartPointer sliderRepN2 = vtkSmartPointer::New(); sliderRepN2->SetMinimumValue(0.0001); sliderRepN2->SetMaximumValue(4.0); sliderRepN2->SetValue(1.0); sliderRepN2->SetTitleText("XY squareness"); sliderRepN2->GetPoint1Coordinate()->SetCoordinateSystemToNormalizedDisplay(); sliderRepN2->GetPoint1Coordinate()->SetValue(.1, .9); sliderRepN2->GetPoint2Coordinate()->SetCoordinateSystemToNormalizedDisplay(); sliderRepN2->GetPoint2Coordinate()->SetValue(.9, .9); sliderRepN2->SetTubeWidth(tubeWidth); sliderRepN2->SetSliderLength(sliderLength); sliderRepN2->SetTitleHeight(titleHeight); sliderRepN2->SetLabelHeight(labelHeight); vtkSmartPointer sliderWidgetN2 = vtkSmartPointer::New(); sliderWidgetN2->SetInteractor(interactor); sliderWidgetN2->SetRepresentation(sliderRepN2); sliderWidgetN2->SetAnimationModeToAnimate(); sliderWidgetN2->EnabledOn(); vtkSmartPointer callbackN2 = vtkSmartPointer::New(); callbackN2->SuperToroid = surface; sliderWidgetN2->AddObserver(vtkCommand::InteractionEvent, callbackN2); vtkSmartPointer sliderRepMinimumV = vtkSmartPointer::New(); sliderRepN1->SetMinimumValue(.0001); sliderRepMinimumV->SetMaximumValue(.9999*vtkMath::Pi()); sliderRepMinimumV->SetValue(.0001); sliderRepMinimumV->SetTitleText("V min"); sliderRepMinimumV->GetPoint1Coordinate()->SetCoordinateSystemToNormalizedDisplay(); sliderRepMinimumV->GetPoint1Coordinate()->SetValue(.1, .1); sliderRepMinimumV->GetPoint2Coordinate()->SetCoordinateSystemToNormalizedDisplay(); sliderRepMinimumV->GetPoint2Coordinate()->SetValue(.1, .9); sliderRepMinimumV->SetTubeWidth(tubeWidth); sliderRepMinimumV->SetSliderLength(sliderLength); sliderRepMinimumV->SetTitleHeight(titleHeight); sliderRepMinimumV->SetLabelHeight(labelHeight); surface->SetN1(1.0); surface->SetN2(1.0); // Setup a slider widget for each varying parameter END // Set up the cut plane. vtkSmartPointer planeCut = vtkSmartPointer::New(); planeCut->SetOrigin(0.0, 0.0, 0.0); planeCut->SetNormal(0.0, 0.0, 1.0); // Set up the cutter which will produce the contour polygons. vtkSmartPointer polygonsContour = vtkSmartPointer::New(); //vtkSmartPointer polygonsContour = vtkSmartPointer::New(); // testjal polygonsContour->SetInputConnection(source->GetOutputPort()); //polygonsContour->SetPlane(planeCut); // SetPlane only works with a vtkPlaneCutter. // testjal polygonsContour->SetCutFunction(planeCut); // Clean the polygons from the cutter. Note, this is an experiment to see if this helps the fills. It does not // seem to help. vtkSmartPointer polygonsContourClean = vtkSmartPointer::New(); // testjal polygonsContourClean->SetInputConnection(polygonsContour->GetOutputPort()); // testjal // Set up the filled polygons of the contour. vtkSmartPointer polygonsFilled = vtkSmartPointer::New(); polygonsFilled->SetInputConnection(polygonsContourClean->GetOutputPort()); polygonsFilled->TriangulationErrorDisplayOn(); // testjal // Set up the mapper of the contour. vtkSmartPointer mapperContour = vtkSmartPointer::New(); mapperContour->SetInputConnection(polygonsContourClean->GetOutputPort()); mapperContour->ScalarVisibilityOff(); // Set up the mapper of the filled polygons of the contour vtkSmartPointer mapperFilled = vtkSmartPointer::New(); mapperFilled->SetInputConnection(polygonsFilled->GetOutputPort()); mapperFilled->ScalarVisibilityOff(); // Set up the actor of the contour. vtkSmartPointer actorContour = vtkSmartPointer::New(); actorContour->SetMapper(mapperContour); actorContour->GetProperty()->SetColor(1,0,0); actorContour->GetProperty()->SetLineWidth(5); // Set up the actor of the filled polygons of the contour. vtkSmartPointer actorFilled = vtkSmartPointer::New(); actorFilled->SetMapper(mapperFilled); actorFilled->GetProperty()->SetColor(0, 1, 0); // Add the contour actor. renderer->AddActor(actorContour); // Add the filld polygons of the contour. renderer->AddActor(actorFilled); // Set up the interaction. vtkSmartPointer callback = vtkSmartPointer::New(); callback->m_pInteractor = interactor.Get(); callback->m_pActorSurface = actor.Get(); callback->m_pCutPlane = planeCut.Get(); callback->m_pActorContour = actorContour.Get(); callback->m_pActorFilled = actorFilled.Get(); vtkSmartPointer style = vtkSmartPointer::New(); interactor->SetInteractorStyle(style); style->AddObserver(vtkCommand::MouseMoveEvent, callback); renderer->ResetCamera(-1, 1, -1, 1, -1, 1); renderer->GetActiveCamera()->ParallelProjectionOn(); renderWindow->Render(); interactor->Initialize(); interactor->Start(); return EXIT_SUCCESS; } -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of vtkusers-request at vtk.org Sent: Friday, March 02, 2018 3:19 PM To: vtkusers at vtk.org Subject: vtkusers Digest, Vol 167, Issue 6 Send vtkusers mailing list submissions to vtkusers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LEPlWwob3RaATj2F7NLtpCgz9jCbYxrZVKqUBxw04QA&s=Ej7w16ZJQy02Uvg3d2LzSZ7xIDDkBIUqNYKBToY2xxE&e= or, via email, send a message with subject or body 'help' to vtkusers-request at vtk.org You can reach the person managing the list at vtkusers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..." Today's Topics: 1. Problem with vtkContourTriangulator and vtkPlaneCutter (Jeffery Lewis) ---------------------------------------------------------------------- Message: 1 Date: Fri, 2 Mar 2018 22:57:44 +0000 From: Jeffery Lewis To: "vtkusers at vtk.org" Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter Message-ID: Content-Type: text/plain; charset="us-ascii" I have a prototype that generates a super toroid surface model. A cut plane is defined to be orthogonal to the camera line of sight, and cuts through the middle of the surface model. The cut contour (generated by vtkCutter), and filled cut contour (generated by vtkContourTriangulator) is rendered with the surface model. The surface model is shown transparent as it is only a reference. The rendering of interest is the cut contour (shown as red contour) and filled cut contour (shown as green). Moving the mouse rotates the surface model. The cut plane stays orthogonal to the camera while the surface model rotates. By rotating the surface model, you can see the cut contour and filled cut contour get updated interactively as it slices through the middle of the surface model. Unfortunately, the filled cut contour does not look right and I can't seem to figure it out. If I change the surface model to something simpler like a cone, then everything looks fine. Also of note is that if I switch out the vtkCutter with a vtkPlaneCutter, the program crashes. I would like to use the vtkPlaneCutter since from its documentation seems to indicate that it will get better performance. The vtkPlaneCutter crashes using either the super toroid or cone. Attached is the source code. The stuff between "// Setup a slider widget for each varying parameter BEGIN" and "// Setup a slider widget for each varying parameter END" can be ignored as this only involves setting up sliders to manipulate the super toroid, which comes from the ParametricSuperToroidDemo example. The setup of the pipleline for the cut contour and filled cut contour is near the bottom. Also attached is a sample screen shot of the incorrect filled cut contour. [cid:image013.png at 01D3B236.CFCA0DE0] [cid:image014.png at 01D3B236.CFCA0DE0] [cid:image015.png at 01D3B236.CFCA0DE0] [cid:image016.png at 01D3B236.CFCA0DE0] [cid:image017.png at 01D3B236.CFCA0DE0] Jeffery Lewis Staff Software Engineer, Treatment Planning Systems 1310 Chesapeake Terrace Sunnyvale, CA 94089 USA Tel: 1.408.789.4367 jlewis at accuray.com -- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image013.png Type: image/png Size: 12364 bytes Desc: image013.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image014.png Type: image/png Size: 1447 bytes Desc: image014.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image015.png Type: image/png Size: 1625 bytes Desc: image015.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image016.png Type: image/png Size: 1612 bytes Desc: image016.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image017.png Type: image/png Size: 1344 bytes Desc: image017.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image018.jpg Type: image/jpeg Size: 831 bytes Desc: image018.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: VOISlicePrototype.cpp URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SuperToroidWithIncorrectFilledCutContour.png Type: image/png Size: 90337 bytes Desc: SuperToroidWithIncorrectFilledCutContour.png URL: ------------------------------ Subject: Digest Footer _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LEPlWwob3RaATj2F7NLtpCgz9jCbYxrZVKqUBxw04QA&s=TuQF8iwlh-IhUDR0LAh9baWfXIXEL55VHq35P8wLo7E&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LEPlWwob3RaATj2F7NLtpCgz9jCbYxrZVKqUBxw04QA&s=HhpDrCKJqpW3QIZU1YwmOtFIPsJYJ_GSZl-NHRs52co&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LEPlWwob3RaATj2F7NLtpCgz9jCbYxrZVKqUBxw04QA&s=fUyhxNhkz96eHFBsI5ozYbI_SYRNZS5erqHGt5lcB98&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LEPlWwob3RaATj2F7NLtpCgz9jCbYxrZVKqUBxw04QA&s=Ej7w16ZJQy02Uvg3d2LzSZ7xIDDkBIUqNYKBToY2xxE&e= ------------------------------ End of vtkusers Digest, Vol 167, Issue 6 **************************************** -- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. From g.bogle at auckland.ac.nz Sat Mar 3 00:52:30 2018 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 3 Mar 2018 05:52:30 +0000 Subject: [vtkusers] Updating render Message-ID: <1520056338346.5905@auckland.ac.nz> Hello, I have a simple QVTK program that draws a collection of cylinder actors (Qt 4.8.1, VTK 5.10). The function that updates the actor positions is a Qt slot; on receiving a signal from another thread the function is invoked with the array of new positions. Everything is working fine, except that the scene does not get updated unless I interact with it (move the mouse). I don't understand what is needed to force the scene update. I'm sure it must be something simple. Please enlighten me. Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Mar 3 02:20:48 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 3 Mar 2018 08:20:48 +0100 Subject: [vtkusers] Updating render In-Reply-To: <1520056338346.5905@auckland.ac.nz> References: <1520056338346.5905@auckland.ac.nz> Message-ID: 2018-03-03 6:52 GMT+01:00 Gib Bogle : > Hello, > > > I have a simple QVTK program that draws a collection of cylinder actors (Qt > 4.8.1, VTK 5.10). The function that updates the actor positions is a Qt > slot; on receiving a signal from another thread the function is invoked with > the array of new positions. Everything is working fine, except that the > scene does not get updated unless I interact with it (move the mouse). I > don't understand what is needed to force the scene update. I'm sure it must > be something simple. > > > Please enlighten me. If you're using QVTKOpenGLWidget, I think a call to update() should be enough (it's a Qt function). If you're using the old and deprecated QVTKWidget, then I think a call to GetRenderWindow()->Render() is what is needed. Hope that helps. Elvis > > > Thanks > > Gib > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 g.bogle at auckland.ac.nz Sat Mar 3 05:46:56 2018 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 3 Mar 2018 10:46:56 +0000 Subject: [vtkusers] [FORGED] Re: Updating render In-Reply-To: References: <1520056338346.5905@auckland.ac.nz>, Message-ID: <1520074017037.40858@auckland.ac.nz> Thanks Elvis. I am using QVTKWidget, and your suggestion did the trick. Cheers, Gib ________________________________________ From: Elvis Stansvik Sent: Saturday, 3 March 2018 8:20 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: [FORGED] Re: [vtkusers] Updating render 2018-03-03 6:52 GMT+01:00 Gib Bogle : > Hello, > > > I have a simple QVTK program that draws a collection of cylinder actors (Qt > 4.8.1, VTK 5.10). The function that updates the actor positions is a Qt > slot; on receiving a signal from another thread the function is invoked with > the array of new positions. Everything is working fine, except that the > scene does not get updated unless I interact with it (move the mouse). I > don't understand what is needed to force the scene update. I'm sure it must > be something simple. > > > Please enlighten me. If you're using QVTKOpenGLWidget, I think a call to update() should be enough (it's a Qt function). If you're using the old and deprecated QVTKWidget, then I think a call to GetRenderWindow()->Render() is what is needed. Hope that helps. Elvis > > > Thanks > > Gib > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 pdhahn at compintensehpc.com Sat Mar 3 08:50:02 2018 From: pdhahn at compintensehpc.com (Paul Douglas Hahn) Date: Sat, 3 Mar 2018 07:50:02 -0600 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: Message-ID: <9983ae91-cd6d-9f9f-1d84-74ddd1ab9476@compintensehpc.com> Well, I actually got KWWidgets working with VTK 8.1.0!? :-) It was a bit of a struggle, though. Attached is a screen shot of /KWWidgetsTourExample/ as proof. :-) FYI, one of the keys for success is to do the following in your build directory after a fresh generation of the Makefile via cmake, before actually doing the make: ??? > find . -name '*.cxx' | xargs -n 1 egrep -nHl vtksys/ios | xargs sed -i 's|vtksys/ios/||' ??? > find . -name '*.cxx' | xargs -n 1 egrep -nHl vtksys/stl | xargs sed -i 's|vtksys/stl/||' I just wish there were a viable + freeware alternative to Qt5 out there with a business-friendly license like MIT or BSD (etc.) [i.e., no, NOT LGPL, thank you!] that could also easily integrate with VTK!? [? BTW, I love Qt and have used it since 2003 (15 years).? ] - Paul On 02/26/2018 01:33 PM, David Gobbi wrote: > In addition, it's worth mentioning that KWWidgets was retired around > 10 yrs ago.? I'd be surprised if anyone has it working with VTK 6, > much less VTK 7 or 8.? Too much has changed in VTK (both the build > system and the API) to allow KWWidgets to be used with modern VTK. > > ?- David > > > On Mon, Feb 26, 2018 at 12:25 PM, David E DeMarle > > wrote: > > TCL support was deprecated in 8.1. So 8.0 will be compatible, 8.1 > only compatible with VTK_LEGACY_REMOVE set to off. master (to be > 9.0) will not be compatible. > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Mon, Feb 26, 2018 at 2:08 PM, Melvin Robinson > > wrote: > > Hello, > > I am trying to build KWWidgets with the development version of > VTK; however there is no variable VTK_WRAP_TCL when using > ccmake.? I checked out VTK 7.1.1 which does have the variable. > > There is a file in the CMake directory that seems should allow > the user to turn on that variable. > > Any ideas on how to build KWWidgets with development VTK? > > Melvin > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-KWWidgetsTourExample.png Type: image/png Size: 103628 bytes Desc: not available URL: From marcwang17 at hotmail.com Sat Mar 3 21:38:53 2018 From: marcwang17 at hotmail.com (WackoWanderer) Date: Sat, 3 Mar 2018 19:38:53 -0700 (MST) Subject: [vtkusers] How to splice an vtkImageData into another one? Message-ID: <1520131133353-0.post@n5.nabble.com> for example I have two vtkImageData, I have VoxelGeo1 with size (5,5,5) and VoxelGeo2 with size(10,10,10) I would like to copy the value of VoxelGeo1 into VoxelGeo2 but on the index range x = 4 to 9, y = 4 to 9, z = 4 to 9 . Is there a way to do it without iterating over each cell? I looked at subclassing vtkImageAlgorithm to create my own filter. But this feels like overkill. I am also working in python. Cheers -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From polly_sukting at hotmail.com Sun Mar 4 21:20:28 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Mon, 5 Mar 2018 02:20:28 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: , Message-ID: Hi Vinvent, Thanks for you reply. I applied the vtkCurvature on my data. Then i extracted those areas by using vtkthreshold with ThresholdByLower. The following is my code. Could you please advice? ....... vtkPolyDataReader *reader = vtkPolyDataReader::New(); reader->SetFileName(argv[1]); reader->Update(); int nOfPnts = reader->GetOutput()->GetPoints()->GetNumberOfPoints(); vtkCurvatures *meanCurve = vtkCurvatures::New(); meanCurve->SetInputConnection(reader->GetOutputPort()); meanCurve->SetCurvatureTypeToMean(); meanCurve->Update(); vtkThreshold *thresh = vtkThreshold::New(); thresh->SetInputConnection(meanCurve->GetOutputPort()); thresh->ThresholdByLower(0.085); thresh->Update(); vtkGeometryFilter *geom = vtkGeometryFilter::New(); geom->SetInputConnection(thresh->GetOutputPort()); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(geom->GetOutputPort()); ........ Thank you. Regards, Polly ________________________________ From: Vincent RIVOLA Sent: Saturday, March 3, 2018 4:11 AM To: Polly Pui Cc: Cory Quammen; vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter Hi, Do you apply vtkThreshold on cell values or point values? This will make a difference and I guess the missing cells is related to that. If you really want to get the complementary part you should apply TheresoldByLower and ThresholdByUpper on cell data I think. Regards, Vincent Le 2 mars 2018 ? 19:39, Polly Pui > a ?crit : Hi Cory, Thanks for your reply. I extracted the result in red image by using the vtkthreshold (ThresholdByLower=0.085). I tried to invert the extraction by using ThresholdByUpper=0.015, but the result weren't what i wanted. The red image with white holes (the removed areas are what i wanted). The blue area is extracted using the inverted value of threshold. I cant really understand what do you mean by boolean operations cant work on this case. Are we not able to obtain the areas using "difference" operation? Best, Polly ________________________________ From: Cory Quammen > Sent: Thursday, March 1, 2018 9:01 PM To: Polly Pui Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui > wrote: Hi, I would like to obtain the areas which are removed in 'Red Image'. Couldn't you invert the threshold operation to produce those areas instead of the red surface? Green image is original data and Red image is the thresholded data. I applied "union operation" in order to get the areas. I used the code given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter The boolean operation filter won't work in this case because it does not handle boolean operations on overlapping surfaces. HTH, Cory But the areas that I wanted couldn't be shown completely in grey image. The polygons are not connected. Any suggestion on how can I improve this? Thanks. Best, 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 vtkusers Info Page - VTK - The Visualization Toolkit vtk.org VTK - The Visualization Toolkit vtk.org Visualize Your Data With VTK. The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, image processing, and ... To see the collection of prior postings to the list, visit the vtkusers Archives. Using vtkusers: To post a message to all the list members, send ... -- Cory Quammen Staff R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers vtkusers Info Page - VTK - The Visualization Toolkit vtk.org To see the collection of prior postings to the list, visit the vtkusers Archives. Using vtkusers: To post a message to all the list members, send ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From polly_sukting at hotmail.com Sun Mar 4 22:49:06 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Mon, 5 Mar 2018 03:49:06 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter In-Reply-To: References: , Message-ID: Hi Cory, Thanks for your reply. I could get those regions by calling AllScalarsOff correctly now. Thank you! Best, Polly ________________________________ From: Cory Quammen Sent: Saturday, March 3, 2018 3:03 AM To: Polly Pui Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter On Fri, Mar 2, 2018 at 1:39 PM, Polly Pui > wrote: Hi Cory, Thanks for your reply. I extracted the result in red image by using the vtkthreshold (ThresholdByLower=0.085). I tried to invert the extraction by using ThresholdByUpper=0.015, but the result weren't what i wanted. The red image with white holes (the removed areas are what i wanted). The blue area is extracted using the inverted value of threshold. I think calling vtkThreshold::AllScalarsOff() should fix it. [cid:f7c26712-986e-4e9b-9c1f-0174777617ab] I cant really understand what do you mean by boolean operations cant work on this case. Are we not able to obtain the areas using "difference" operation? You are right in principle that a boolean operation should be able to do this. In practice, however, the existing boolean operations filter makes some assumptions about the input data, namely that each input geometry defines an enclosed volume and that no two intersecting polygons in the input geometries are coplanar. The output of the filter is a new surface that encloses the union, difference, or intersection of the volumes enclosed by the input geometries. This test case violates both assumptions, hence it won't work. Best, Cory Best, Polly ________________________________ From: Cory Quammen > Sent: Thursday, March 1, 2018 9:01 PM To: Polly Pui Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui > wrote: Hi, I would like to obtain the areas which are removed in 'Red Image'. Couldn't you invert the threshold operation to produce those areas instead of the red surface? Green image is original data and Red image is the thresholded data. I applied "union operation" in order to get the areas. I used the code given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter www.vtk.org Download and Build BooleanOperationPolyDataFilter. Click here to download BooleanOperationPolyDataFilter. and its CMakeLists.txt file. Once the tarball ... The boolean operation filter won't work in this case because it does not handle boolean operations on overlapping surfaces. HTH, Cory But the areas that I wanted couldn't be shown completely in grey image. The polygons are not connected. Any suggestion on how can I improve this? [cid:447fa535-f257-4dc6-b3fc-6e3077cf35dd] Thanks. Best, 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 vtkusers Info Page - VTK - The Visualization Toolkit vtk.org To see the collection of prior postings to the list, visit the vtkusers Archives. Using vtkusers: To post a message to all the list members, send ... -- Cory Quammen Staff R&D Engineer Kitware, Inc. -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolean.jpg Type: image/jpeg Size: 29351 bytes Desc: boolean.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: above_below.jpg Type: image/jpeg Size: 68707 bytes Desc: above_below.jpg URL: From elvis.stansvik at orexplore.com Mon Mar 5 02:06:59 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 5 Mar 2018 08:06:59 +0100 Subject: [vtkusers] VTK 8.0.1 with Qt 5.10.1 In-Reply-To: References: Message-ID: 2018-03-01 23:27 GMT+01:00 Andrew J. Buckler (Elucid Bioimaging) : > Hello, > > I have a successfully built and running application using VTK (multiple > versions, including 8 and earlier) running with Qt 5.5.1. It uses QVTKWidget > extensively. At this time I am working to upgrade to Qt 5.10.1, specifically > pairing it with VTK 8.0.1. > > > Having successfully built Qt from source, I built VTK as follows: > > tar -xvzf VTK-8.0.1.tar.gz > mkdir VTK-8.0.1-build > cd VTK-8.0.1-build > cmake -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS:BOOL=OFF > -DQT_QMAKE_EXECUTABLE:PATH=/usr/local/Qt-5.10.1/bin/qmake > -DCMAKE_PREFIX_PATH=/usr/local/Qt-5.10.1/ -DVTK_Group_Qt:BOOL=ON > -DVTK_Group_Qt=1 -DVTK_QT_VERSION=5 ../VTK-8.0.1 > make -j4 > make install > > > My application compiles and links without error on macOS 10.13, but the > QVTKWidgets have erratic and inconsistent behavior. Specifically: > > Two of them work perfectly well. > Some of them do not work at all, that is, have either a blank content or > seem to have a double-buffering error where old content from a portion of > the screen where the widget is supposed to be displays previously displayed > content at that location, rather than the correct content. > Some of them show the correct content for a second or two and then revert to > blank. > > > It may be that the VTK build needs to be done with different flags, or some > known incompatibility exists, or anything else. If anyone has run into this > your help would be appreciated, or short of seeing the problem specifically > any suggested debugging strategies would be great. Hm, I don't think I've seen this problem, but I dug up an old version of our app that used QVTKWidget (we've since ported to QVTKOpenGLWidget), and in our QVTKWidget subclass, we had: QSurfaceFormat surfaceFormat = window->format(); surfaceFormat.setSamples(0); surfaceFormat.setStencilBufferSize(8); window->setFormat(surfaceFormat); I remember the setStencilBufferSize(8) call was some workaround for some zbuffer issue we had with QVTKWidget+OpenGL2. I can't remember the details, but perhaps you could try that out? Though the recommended thing I think is to port to QVTKOpenGLWidget first. Elvis > > > With thanks, > > Andy > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 Zoltan.Kovacs at esi-group.com Mon Mar 5 03:52:08 2018 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 5 Mar 2018 08:52:08 +0000 Subject: [vtkusers] VTK 8.0.1 with Qt 5.10.1 In-Reply-To: References: Message-ID: Hi, Why don't you use QVTKOpenGLWidget instead of QVTKWidget? The latter one is obsolete and its application is already deprecated. I am not sure if it is correctly supported by the VTK development now. QVTKOpenGLWidget takes over the window management and OpenGL context creation, which is a different solution compared with QVTKWidget. Regards, Zoltan From: vtkusers On Behalf Of Andrew J. Buckler (Elucid Bioimaging) Sent: Donnerstag, 1. M?rz 2018 23:27 To: vtkusers at vtk.org Subject: [vtkusers] VTK 8.0.1 with Qt 5.10.1 Hello, I have a successfully built and running application using VTK (multiple versions, including 8 and earlier) running with Qt 5.5.1. It uses QVTKWidget extensively. At this time I am working to upgrade to Qt 5.10.1, specifically pairing it with VTK 8.0.1. Having successfully built Qt from source, I built VTK as follows: tar -xvzf VTK-8.0.1.tar.gz mkdir VTK-8.0.1-build cd VTK-8.0.1-build cmake -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS:BOOL=OFF -DQT_QMAKE_EXECUTABLE:PATH=/usr/local/Qt-5.10.1/bin/qmake -DCMAKE_PREFIX_PATH=/usr/local/Qt-5.10.1/ -DVTK_Group_Qt:BOOL=ON -DVTK_Group_Qt=1 -DVTK_QT_VERSION=5 ../VTK-8.0.1 make -j4 make install My application compiles and links without error on macOS 10.13, but the QVTKWidgets have erratic and inconsistent behavior. Specifically: 1. Two of them work perfectly well. 2. Some of them do not work at all, that is, have either a blank content or seem to have a double-buffering error where old content from a portion of the screen where the widget is supposed to be displays previously displayed content at that location, rather than the correct content. 3. Some of them show the correct content for a second or two and then revert to blank. It may be that the VTK build needs to be done with different flags, or some known incompatibility exists, or anything else. If anyone has run into this your help would be appreciated, or short of seeing the problem specifically any suggested debugging strategies would be great. With thanks, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartolomei-luca at virgilio.it Mon Mar 5 05:23:28 2018 From: bartolomei-luca at virgilio.it (bartolomei-luca at virgilio.it) Date: Mon, 5 Mar 2018 11:23:28 +0100 (CET) Subject: [vtkusers] Problem with vtkContourFilter with unstructured grid Message-ID: <363835878.734473.1520245408737@mail.virgilio.it> Hello everyone! I have a question about how to use the vtkContourFilter with an unstructured grid. I have an unstructured grid where the values are stored at the center of the cells. So, before using the contour filter, I use the CellDataToPointData filter. The problem is that I do not see any output after using the contourFilter. I also tried to use vtkImplicitModeller to pre-process the grid, but the situation does not change. The grid cells do contain values, since I can display them when I process for other tasks, but I did not manage to display isosurfaces. Here it is my code: // CELL TO POINT DATA vtkSmartPointer c2p {vtkSmartPointer::New()}; c2p->SetInputData(grid); // grid is the unstructured grid I have created c2p->Update(); // CONTOUR FILTER vtkSmartPointer contourFilter = vtkSmartPointer::New(); contourFilter->SetInputConnection(c2p->GetOutputPort()); contourFilter->GenerateValues(10, c2p->GetOutput()->GetScalarRange()); contourFilter->Modified(); contourFilter->Update(); // MAPPER vtkSmartPointer contourMapper {vtkSmartPointer::New()}; contourMapper->SetInputConnection(contourFilter->GetOutputPort()); contourMapper->Update(); // VISUALIZATION vtkSmartPointer contourActor {vtkSmartPointer::New()}; contourActor->SetMapper(contourMapper); vtkSmartPointer renderer {vtkSmartPointer::New()}; contourActor->SetMapper(contourMapper); renderer->AddActor(contourActor); Do you have any suggestion? Thanks a lot for the help! Best, Luca -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Mon Mar 5 08:03:14 2018 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Mon, 05 Mar 2018 08:03:14 -0500 Subject: [vtkusers] VTK 8.0.1 with Qt 5.10.1 Message-ID: And also the old QVTKWidget will not work properly with Retina screens on macOS ( not sure about other operating systems). The problem you describe sounds like a retina issue we had before all the retina fixes were put into VTK 8.1 -- Michael Jackson | Owner, President BlueQuartz Software [e] mike.jackson at bluequartz.net [w] www.bluequartz.net From: vtkusers on behalf of Zoltan Kovacs Date: Monday, March 5, 2018 at 3:52 AM To: "'Andrew J. Buckler (Elucid Bioimaging)'" , "'vtkusers at vtk.org'" Subject: Re: [vtkusers] VTK 8.0.1 with Qt 5.10.1 Hi, Why don?t you use QVTKOpenGLWidget instead of QVTKWidget? The latter one is obsolete and its application is already deprecated. I am not sure if it is correctly supported by the VTK development now. QVTKOpenGLWidget takes over the window management and OpenGL context creation, which is a different solution compared with QVTKWidget. Regards, Zoltan From: vtkusers On Behalf Of Andrew J. Buckler (Elucid Bioimaging) Sent: Donnerstag, 1. M?rz 2018 23:27 To: vtkusers at vtk.org Subject: [vtkusers] VTK 8.0.1 with Qt 5.10.1 Hello, I have a successfully built and running application using VTK (multiple versions, including 8 and earlier) running with Qt 5.5.1. It uses QVTKWidget extensively. At this time I am working to upgrade to Qt 5.10.1, specifically pairing it with VTK 8.0.1. Having successfully built Qt from source, I built VTK as follows: tar -xvzf VTK-8.0.1.tar.gz mkdir VTK-8.0.1-build cd VTK-8.0.1-build cmake -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS:BOOL=OFF -DQT_QMAKE_EXECUTABLE:PATH=/usr/local/Qt-5.10.1/bin/qmake -DCMAKE_PREFIX_PATH=/usr/local/Qt-5.10.1/ -DVTK_Group_Qt:BOOL=ON -DVTK_Group_Qt=1 -DVTK_QT_VERSION=5 ../VTK-8.0.1 make -j4 make install My application compiles and links without error on macOS 10.13, but the QVTKWidgets have erratic and inconsistent behavior. Specifically: 1. Two of them work perfectly well. 2. Some of them do not work at all, that is, have either a blank content or seem to have a double-buffering error where old content from a portion of the screen where the widget is supposed to be displays previously displayed content at that location, rather than the correct content. 3. Some of them show the correct content for a second or two and then revert to blank. It may be that the VTK build needs to be done with different flags, or some known incompatibility exists, or anything else. If anyone has run into this your help would be appreciated, or short of seeing the problem specifically any suggested debugging strategies would be great. With thanks, Andy _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 amine.aboufirass at gmail.com Mon Mar 5 09:59:01 2018 From: amine.aboufirass at gmail.com (Amine Aboufirass) Date: Mon, 5 Mar 2018 15:59:01 +0100 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration Message-ID: Hello, I am trying to read a vtk unstructured grid file with tensor data in paraview. I cannot for the life of me figure out why I am getting the following error message: *Error reading asci data. Possible mismatch of datasize with declaration*. The problem is that I have actually counted up the points and the tensors inside this file. It is apparent that it contains 1560 points and 4680 corresponding tensor entries. I have attached the file above so that the problem can be reproduced. Why am I getting the above error and how can I fix it? Thanks, Amine -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.vtk Type: application/octet-stream Size: 830291 bytes Desc: not available URL: From peer9802 at gmail.com Mon Mar 5 10:36:17 2018 From: peer9802 at gmail.com (Eric Petersen) Date: Mon, 5 Mar 2018 09:36:17 -0600 Subject: [vtkusers] Issues with vtkImageReslice orientation Message-ID: Hello, I'm trying to create an app where I can recreate trans-esophageal echo views using a CT scan. My current prototype has two render windows where the "left" window displays a segmented STL of the CT data, the esophagus path, and the TEE imaging plane. The right window then displays the double-oblique view of the simulated TEE plane. Everything is working fine in the "left" window--I can modify the plane orientation/origin and easily see what I want to image. The issue I'm having is converting this to the vtkImageReslice object. My first approach was to simply take the 4x4 transform matrix "left" window (which is vtk poly data) and set this as the vtkImageReslice reslice matrix. I quickly realized this doesn't work because the reslice plane origins are different. I've tried some different offsets/origins for the 4x4 reslice matrix and I can get the slices correct under some conditions but not double-oblique views. So, I have poly data (of a heart in this case) and a plane with known origin and rotation matrix (global x,y,z coordinates known). What do I need to know in order to obtain an image of this plane using vtkImageReslice? Do I need to approach how I'm creating the reslice matrix differently (I'm currently doing all rotations using (0,0,0) origin then translating to desired point)? Any help is greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Mar 5 11:24:20 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 5 Mar 2018 08:24:20 -0800 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration In-Reply-To: References: Message-ID: Tensor data should have 9 entries per point. Your data has 3 entries per point On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass wrote: > Hello, > > > > I am trying to read a vtk unstructured grid file with tensor data in > paraview. I cannot for the life of me figure out why I am getting the > following error message: > > > > Error reading asci data. Possible mismatch of datasize with declaration. > > > > The problem is that I have actually counted up the points and the tensors > inside this file. It is apparent that it contains 1560 points and 4680 > corresponding tensor entries. I have attached the file above so that the > problem can be reproduced. > > > > Why am I getting the above error and how can I fix it? > > > > Thanks, > > > > Amine > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 kit.chambers.kc at gmail.com Mon Mar 5 11:39:53 2018 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Mon, 5 Mar 2018 16:39:53 +0000 Subject: [vtkusers] VTK pipeline thread safety Message-ID: <03E6557F-1735-4DA9-9CA9-15E9E980A3C8@googlemail.com> Hi, I am looking to write a VTK filter which contains a series of sub filters which are executed in parallel inside an OpenMP loop. The RequestData would look something like this: 1- Set up the the filters (filter1 -> filter2 -> filter3), this sequence might change between different usages. 2- Start threading / create the parallel region 3- Parallel loop over some different inputs 3a - Set filter1 input 3b - Execute the filter series 3c - Add the result to output Would I be correct in thinking that the above will result in a conflict where filter inputs and outputs get over written by successive threads? If so then is there a handy way to create a thread local copy of the VTK filters between steps 2 and 3? Any help would be appreciated. Kit From bill.lorensen at gmail.com Mon Mar 5 11:48:02 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 5 Mar 2018 08:48:02 -0800 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration In-Reply-To: References: Message-ID: Sorry, you have 6 entries per point. Tses are symetric tensors. Declare the type as TENSORS6 rather than TENSORS. Bill On Mon, Mar 5, 2018 at 8:24 AM, Bill Lorensen wrote: > Tensor data should have 9 entries per point. Your data has 3 entries per point > > > On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass > wrote: >> Hello, >> >> >> >> I am trying to read a vtk unstructured grid file with tensor data in >> paraview. I cannot for the life of me figure out why I am getting the >> following error message: >> >> >> >> Error reading asci data. Possible mismatch of datasize with declaration. >> >> >> >> The problem is that I have actually counted up the points and the tensors >> inside this file. It is apparent that it contains 1560 points and 4680 >> corresponding tensor entries. I have attached the file above so that the >> problem can be reproduced. >> >> >> >> Why am I getting the above error and how can I fix it? >> >> >> >> Thanks, >> >> >> >> Amine >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Mar 5 11:49:56 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 5 Mar 2018 08:49:56 -0800 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration In-Reply-To: References: Message-ID: The error message says there is a mismatch in the number declared and the number present. On Mar 5, 2018 8:48 AM, "Bill Lorensen" wrote: > Sorry, you have 6 entries per point. Tses are symetric tensors. Declare > the type as TENSORS6 rather than TENSORS. > > Bill > > > On Mon, Mar 5, 2018 at 8:24 AM, Bill Lorensen > wrote: > > Tensor data should have 9 entries per point. Your data has 3 entries per > point > > > > > > On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass > > wrote: > >> Hello, > >> > >> > >> > >> I am trying to read a vtk unstructured grid file with tensor data in > >> paraview. I cannot for the life of me figure out why I am getting the > >> following error message: > >> > >> > >> > >> Error reading asci data. Possible mismatch of datasize with declaration. > >> > >> > >> > >> The problem is that I have actually counted up the points and the > tensors > >> inside this file. It is apparent that it contains 1560 points and 4680 > >> corresponding tensor entries. I have attached the file above so that the > >> problem can be reproduced. > >> > >> > >> > >> Why am I getting the above error and how can I fix it? > >> > >> > >> > >> Thanks, > >> > >> > >> > >> Amine > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> 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 > > > > -- > Unpaid intern in BillsParadise at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Mar 5 11:56:17 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 5 Mar 2018 08:56:17 -0800 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration In-Reply-To: References: Message-ID: Ignore I previous responses. I miscalcuated. From amine.aboufirass at gmail.com Mon Mar 5 12:10:21 2018 From: amine.aboufirass at gmail.com (Amine Aboufirass) Date: Mon, 5 Mar 2018 18:10:21 +0100 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration In-Reply-To: References: Message-ID: There are 9 tensor components. It is a true tensor On Mon, Mar 5, 2018 at 5:56 PM, Bill Lorensen wrote: > Ignore I previous responses. I miscalcuated. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Mar 5 14:26:04 2018 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 5 Mar 2018 14:26:04 -0500 Subject: [vtkusers] Iterate over vtkInformation In-Reply-To: <403FB8A2E4E75A4CA51E33B6E9FC06C209D7BC@exchange3.microbrightfield.com> References: <403FB8A2E4E75A4CA51E33B6E9FC06C209D7BC@exchange3.microbrightfield.com> Message-ID: I **think** somehow you have to pass that custom key down to both the code that is inserting the key and the code that is checking if the key exists. Unless I am missing something I don't think there is anyway around that. Usually the key is a static defined somewhere and the code that uses it includes the header that defines it. Hope that helps! On Wed, Feb 28, 2018 at 11:35 AM, Doug Hoppes wrote: > Hey all, > > > > For a vtkprop, I need to set some custom attributes (i.e. > allowSecureDeletion, etc). So, the main way to do this is to set a > property key (in a vtkinformation object) and then access the property > later on. > > > > The problem is that I need the original custom key pointer > to access the property. However, I don?t have access to that property > object since I?m looping through all of the vtkprops and want to ask it if > the specific property key exists. > > > > Dougie > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 juch at zhaw.ch Mon Mar 5 16:24:14 2018 From: juch at zhaw.ch (normanius) Date: Mon, 5 Mar 2018 14:24:14 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D Message-ID: <1520285054864-0.post@n5.nabble.com> Dear all I've got a follow-up question on this post . How can I triangulate two non-intersecting contours that are /not/ lying in the same plane? See the screenshot below that illustrates my problem. Any ideas? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From juch at zhaw.ch Mon Mar 5 16:29:31 2018 From: juch at zhaw.ch (normanius) Date: Mon, 5 Mar 2018 14:29:31 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D In-Reply-To: <1520285054864-0.post@n5.nabble.com> References: <1520285054864-0.post@n5.nabble.com> Message-ID: <1520285371710-0.post@n5.nabble.com> The contour triangulator that was suggested in my previous post operates only in 2D. So one solution to this problem that came to my mind is that the contours need to be projected into the same plane where the contour triangulation is performed. Then, only the edges from contour need to be "transferred" into a common polydata object. (All this works only if the contours are lying in parallel planes, which is the case for me.) In simplified code, this would read as However, this does not work robustly, as shown in this screenshot... -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From juch at zhaw.ch Mon Mar 5 16:35:36 2018 From: juch at zhaw.ch (normanius) Date: Mon, 5 Mar 2018 14:35:36 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D In-Reply-To: <1520285371710-0.post@n5.nabble.com> References: <1520285054864-0.post@n5.nabble.com> <1520285371710-0.post@n5.nabble.com> Message-ID: <1520285736914-0.post@n5.nabble.com> (I think I forgot to set the HTML flag before, now the code should be visible.) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Mar 5 17:29:28 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 5 Mar 2018 14:29:28 -0800 Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D In-Reply-To: <1520285736914-0.post@n5.nabble.com> References: <1520285054864-0.post@n5.nabble.com> <1520285371710-0.post@n5.nabble.com> <1520285736914-0.post@n5.nabble.com> Message-ID: This example may be useful. https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ContoursToSurface/ On Mar 5, 2018 1:35 PM, "normanius" wrote: > (I think I forgot to set the HTML flag before, now the code should be > visible.) > > > # comboBefore = combinePolyData(edge1, edge2) > # center1 = computeCenter(edge1) > # center2 = computeCenter(edge2) > # edge2 = scaleObject(edge2, 1.2) > # Scaling is required to make sure that the contours are not intersecting in 2D > # edge2 = moveObject(edge2, center1-center2) > # comboAfter = combinePolyData(edge1, edge2) > result = vtk.vtkContourTriangulator() > result.SetInputData(combo) > result.Update() > > poly = vtk.vtkPolyData() > poly.SetPoints(comboBefore.GetPoints()) > poly.SetPolys(result.GetPolys()) > poly.BuildLinks() > poly.BuildCells() > > > ------------------------------ > Sent from the VTK - Users mailing list archive > at Nabble.com. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Mon Mar 5 19:29:48 2018 From: juch at zhaw.ch (normanius) Date: Mon, 5 Mar 2018 17:29:48 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D In-Reply-To: References: <1520285054864-0.post@n5.nabble.com> <1520285371710-0.post@n5.nabble.com> <1520285736914-0.post@n5.nabble.com> Message-ID: <1520296188366-0.post@n5.nabble.com> Many thanks for the hint, Bill!I found that sample too. However, it is very difficult to create watertight closures with this approach. See what my result looks like. From distance things look okayish. However, if I zoom in, the result does not look good. What can I do to improve?(Here a sketch of my implementation: https://pastebin.com/kPR1wKv6 ) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Mon Mar 5 19:32:40 2018 From: juch at zhaw.ch (normanius) Date: Mon, 5 Mar 2018 17:32:40 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D In-Reply-To: <1520296188366-0.post@n5.nabble.com> References: <1520285054864-0.post@n5.nabble.com> <1520285371710-0.post@n5.nabble.com> <1520285736914-0.post@n5.nabble.com> <1520296188366-0.post@n5.nabble.com> Message-ID: <1520296360148-0.post@n5.nabble.com> >From far, the result looks okayish... -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Mon Mar 5 19:56:19 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 6 Mar 2018 09:56:19 +0900 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration In-Reply-To: References: Message-ID: Hello Amine, Could you try to replace very small numbers (like 2.778595324927526E-106) with zeros? Overflow or underflow might be caused by them in a single-precision floating-point numbers. Thanks 2018-03-06 2:10 GMT+09:00 Amine Aboufirass : > There are 9 tensor components. It is a true tensor > > On Mon, Mar 5, 2018 at 5:56 PM, Bill Lorensen > wrote: >> >> Ignore I previous responses. I miscalcuated. > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 312438111 at qq.com Mon Mar 5 22:15:22 2018 From: 312438111 at qq.com (=?gb18030?B?0e7B+Lb5x+A=?=) Date: Tue, 6 Mar 2018 11:15:22 +0800 Subject: [vtkusers] how to replicate the data rendering line between two vtkresliceimageviewer variables? Message-ID: hello guys, I want to assign the data from a vtkresliceimageviewer variable to anther ones.If I use "=",it copys the data only.How to replicate the data rendering line between two vtkresliceimageviewer variables? I will be crazy because of that question. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Mon Mar 5 23:24:06 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 6 Mar 2018 15:24:06 +1100 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter (Jeffery Lewis) Message-ID: Jeffery ?I think this is related to the ParametricFunctions. These functions are generated by mapping R? -> R? and are then triangulated. I tried vtkParametricSuperToroid and sometimes the contouring and cutting worked but in some orientations the triangulation failed. ?If you use a vtkSuperquadricSource e.g: vtkSmartPointer source = vtkSmartPointer::New(); source->SetCenter(0, 0, 0); source->SetPhiRoundness(1.0); source->SetThetaRoundness(1.0); source->ToroidalOn(); Everything seems to work Ok. Andrew > ---------- Forwarded message ---------- > From: Jeffery Lewis > To: "vtkusers at vtk.org" > Cc: > Bcc: > Date: Fri, 2 Mar 2018 23:46:09 +0000 > Subject: Re: [vtkusers] Problem with vtkContourTriangulator and > vtkPlaneCutter (Jeffery Lewis) > Seems like the attachments didn't go through. Here is the code. > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > // Callbacks for the interactions > class SliderCallbackN1 : public vtkCommand { > public: > static SliderCallbackN1 *New() { > return new SliderCallbackN1; > } > virtual void Execute(vtkObject *caller, unsigned long, void*) { > vtkSliderWidget *sliderWidget = > reinterpret_cast(caller); > double value = static_cast(sliderWidget-> > GetRepresentation())->GetValue(); > this->SuperToroid->SetN1(value); > } > SliderCallbackN1() :SuperToroid(0) {} > vtkParametricSuperToroid *SuperToroid; > }; > > class SliderCallbackN2 : public vtkCommand { > public: > static SliderCallbackN2 *New() { > return new SliderCallbackN2; > } > virtual void Execute(vtkObject *caller, unsigned long, void*) { > vtkSliderWidget *sliderWidget = > reinterpret_cast(caller); > double value = static_cast(sliderWidget-> > GetRepresentation())->GetValue(); > this->SuperToroid->SetN2(value); > } > SliderCallbackN2() :SuperToroid(0) {} > vtkParametricSuperToroid *SuperToroid; > }; > > /**This callback will rotate the surface model about x and y axis > depending on the > *current location of the mouse. This will in turn update the cut plane > that is ment to > *be normal to the camera and cuts through the middle of the model, showing > a red > *cut contour, and green filled contour. */ > class InteractionCallback : public vtkCommand { > public: > static InteractionCallback* New() { > return new InteractionCallback; > } > > virtual void Execute(vtkObject*, unsigned long eventID, void* pCallData) > VTK_OVERRIDE { > if (eventID == vtkCommand::MouseMoveEvent) { > // Get the current mouse position. > int aiCurrentPosition[2]; > m_pInteractor->GetEventPosition(aiCurrentPosition); > > // Get the view port size. > int iViewPortWidth = m_pInteractor->GetRenderWindow()->GetSize()[0]; > int iViewPortHeight = m_pInteractor->GetRenderWindow()->GetSize()[1]; > > // Compute rotations about x and y axis. > int iMousePositionAboutCenterX = aiCurrentPosition[0] - iViewPortWidth/2.0; > int iMousePositionAboutCenterY = aiCurrentPosition[1] - > iViewPortHeight/2.0; > double dRotationAboutX = -iMousePositionAboutCenterY/( > iViewPortHeight/2.0)*180.0; > double dRotationAboutY = iMousePositionAboutCenterX/( > iViewPortWidth/2.0)*180.0; > > // Compute transform. > vtkSmartPointer sptmSurfacModel = > vtkSmartPointer::New(); > sptmSurfacModel->RotateX(dRotationAboutX); > sptmSurfacModel->RotateY(dRotationAboutY); > > // Apply the rotation to the surface model actor. > m_pActorSurface->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > // Apply the change to the cut plan normal vector. > // Translations are not required to be removed from the matrix since there > should be none. > double adInitialVector[3]; > adInitialVector[0] = 0.0; > adInitialVector[1] = 0.0; > adInitialVector[2] = 1.0; > double adTransformedVector[3]; > sptmSurfacModel->TransformPoint(adInitialVector, adTransformedVector); > m_pCutPlane->SetNormal(adTransformedVector[0], adTransformedVector[1], > adTransformedVector[2]); > > // Apply the rotation to the contour actor in the opposite direction to > make normal to camera. > sptmSurfacModel->Inverse(); > m_pActorContour->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > // Apply the rotation to the filled actor in the opposite direction to > make normal to camera. > m_pActorFilled->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > m_pInteractor->Render(); > } > } > > // Member variables > // ---------------- > vtkRenderWindowInteractor* m_pInteractor; > vtkActor* m_pActorSurface; > vtkPlane* m_pCutPlane; > vtkActor* m_pActorContour; > vtkActor* m_pActorFilled; > }; > > > int main(int, char *[]) { > > vtkSmartPointer surface =vtkSmartPointer< > vtkParametricSuperToroid>::New(); > vtkSmartPointer source = vtkSmartPointer< > vtkParametricFunctionSource>::New(); > source->SetParametricFunction(surface); > > // Create a synthetic cone. > /*// Un-commented out so can switch surface model source. > vtkSmartPointer source = vtkSmartPointer > ::New(); > source->SetCenter(0, 0, 0); > source->SetRadius(1); > source->SetHeight(2); > source->SetResolution(30); > source->Update(); > */ > > vtkSmartPointer renderer =vtkSmartPointer: > :New(); > vtkSmartPointer mapper =vtkSmartPointer< > vtkPolyDataMapper>::New(); > vtkSmartPointer actor = vtkSmartPointer::New(); > > mapper->SetInputConnection(source->GetOutputPort()); > > vtkSmartPointer backProperty = vtkSmartPointer:: > New(); > backProperty->SetColor(0.8, 0.8, 0.8); > backProperty->SetOpacity(0.6); > actor->SetMapper(mapper); > actor->SetBackfaceProperty(backProperty); > actor->GetProperty()->SetDiffuseColor(1, 1, 1); > actor->GetProperty()->SetOpacity(0.6); > > vtkSmartPointer renderWindow =vtkSmartPointer< > vtkRenderWindow>::New(); > renderWindow->AddRenderer(renderer); > renderWindow->SetSize(640, 480); > renderer->AddActor(actor); > renderer->SetBackground(.2, .3, .4); > > vtkSmartPointer interactor =vtkSmartPointer< > vtkRenderWindowInteractor>::New(); > interactor->SetRenderWindow(renderWindow); > > // Setup a slider widget for each varying parameter BEGIN > double tubeWidth(.004); > double sliderLength(.004); > double titleHeight(.02); > double labelHeight(.02); > > vtkSmartPointer sliderRepN1 = vtkSmartPointer< > vtkSliderRepresentation2D>::New(); > > sliderRepN1->SetMinimumValue(0.0); > sliderRepN1->SetMaximumValue(4.0); > sliderRepN1->SetValue(1.0); > sliderRepN1->SetTitleText("Z squareness"); > > sliderRepN1->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN1->GetPoint1Coordinate()->SetValue(.1, .1); > sliderRepN1->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN1->GetPoint2Coordinate()->SetValue(.9, .1); > > sliderRepN1->SetTubeWidth(tubeWidth); > sliderRepN1->SetSliderLength(sliderLength); > sliderRepN1->SetTitleHeight(titleHeight); > sliderRepN1->SetLabelHeight(labelHeight); > > vtkSmartPointer sliderWidgetN1 = vtkSmartPointer< > vtkSliderWidget>::New(); > sliderWidgetN1->SetInteractor(interactor); > sliderWidgetN1->SetRepresentation(sliderRepN1); > sliderWidgetN1->SetAnimationModeToAnimate(); > sliderWidgetN1->EnabledOn(); > > vtkSmartPointer callbackN1 = vtkSmartPointer< > SliderCallbackN1>::New(); > callbackN1->SuperToroid = surface; > > sliderWidgetN1->AddObserver(vtkCommand::InteractionEvent, callbackN1); > > vtkSmartPointer sliderRepN2 = vtkSmartPointer< > vtkSliderRepresentation2D>::New(); > > sliderRepN2->SetMinimumValue(0.0001); > sliderRepN2->SetMaximumValue(4.0); > sliderRepN2->SetValue(1.0); > sliderRepN2->SetTitleText("XY squareness"); > > sliderRepN2->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN2->GetPoint1Coordinate()->SetValue(.1, .9); > sliderRepN2->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN2->GetPoint2Coordinate()->SetValue(.9, .9); > > sliderRepN2->SetTubeWidth(tubeWidth); > sliderRepN2->SetSliderLength(sliderLength); > sliderRepN2->SetTitleHeight(titleHeight); > sliderRepN2->SetLabelHeight(labelHeight); > > vtkSmartPointer sliderWidgetN2 = vtkSmartPointer< > vtkSliderWidget>::New(); > sliderWidgetN2->SetInteractor(interactor); > sliderWidgetN2->SetRepresentation(sliderRepN2); > sliderWidgetN2->SetAnimationModeToAnimate(); > sliderWidgetN2->EnabledOn(); > > vtkSmartPointer callbackN2 = vtkSmartPointer< > SliderCallbackN2>::New(); > callbackN2->SuperToroid = surface; > > sliderWidgetN2->AddObserver(vtkCommand::InteractionEvent, callbackN2); > > vtkSmartPointer sliderRepMinimumV = > vtkSmartPointer::New(); > > sliderRepN1->SetMinimumValue(.0001); > sliderRepMinimumV->SetMaximumValue(.9999*vtkMath::Pi()); > sliderRepMinimumV->SetValue(.0001); > sliderRepMinimumV->SetTitleText("V min"); > > sliderRepMinimumV->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepMinimumV->GetPoint1Coordinate()->SetValue(.1, .1); > sliderRepMinimumV->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepMinimumV->GetPoint2Coordinate()->SetValue(.1, .9); > > sliderRepMinimumV->SetTubeWidth(tubeWidth); > sliderRepMinimumV->SetSliderLength(sliderLength); > sliderRepMinimumV->SetTitleHeight(titleHeight); > sliderRepMinimumV->SetLabelHeight(labelHeight); > > surface->SetN1(1.0); > surface->SetN2(1.0); > // Setup a slider widget for each varying parameter END > > // Set up the cut plane. > vtkSmartPointer planeCut = vtkSmartPointer::New(); > planeCut->SetOrigin(0.0, 0.0, 0.0); > planeCut->SetNormal(0.0, 0.0, 1.0); > > // Set up the cutter which will produce the contour polygons. > vtkSmartPointer polygonsContour = vtkSmartPointer:: > New(); > //vtkSmartPointer polygonsContour = vtkSmartPointer::New(); > // testjal > polygonsContour->SetInputConnection(source->GetOutputPort()); > //polygonsContour->SetPlane(planeCut); // SetPlane only works with a > vtkPlaneCutter. // testjal > polygonsContour->SetCutFunction(planeCut); > > // Clean the polygons from the cutter. Note, this is an experiment to see > if this helps the fills. It does not > // seem to help. > vtkSmartPointer polygonsContourClean = vtkSmartPointer::New(); > // testjal > polygonsContourClean->SetInputConnection(polygonsContour->GetOutputPort()); > // testjal > > // Set up the filled polygons of the contour. > vtkSmartPointer polygonsFilled = vtkSmartPointer< > vtkContourTriangulator>::New(); > polygonsFilled->SetInputConnection(polygonsContourClean->GetOutputPort()); > polygonsFilled->TriangulationErrorDisplayOn(); // testjal > > // Set up the mapper of the contour. > vtkSmartPointer mapperContour = vtkSmartPointer< > vtkDataSetMapper>::New(); > mapperContour->SetInputConnection(polygonsContourClean->GetOutputPort()); > mapperContour->ScalarVisibilityOff(); > > // Set up the mapper of the filled polygons of the contour > vtkSmartPointer mapperFilled = vtkSmartPointer< > vtkDataSetMapper>::New(); > mapperFilled->SetInputConnection(polygonsFilled->GetOutputPort()); > mapperFilled->ScalarVisibilityOff(); > > // Set up the actor of the contour. > vtkSmartPointer actorContour = vtkSmartPointer::New(); > actorContour->SetMapper(mapperContour); > actorContour->GetProperty()->SetColor(1,0,0); > actorContour->GetProperty()->SetLineWidth(5); > > // Set up the actor of the filled polygons of the contour. > vtkSmartPointer actorFilled = vtkSmartPointer::New(); > actorFilled->SetMapper(mapperFilled); > actorFilled->GetProperty()->SetColor(0, 1, 0); > > // Add the contour actor. > renderer->AddActor(actorContour); > > // Add the filld polygons of the contour. > renderer->AddActor(actorFilled); > > // Set up the interaction. > vtkSmartPointer callback = vtkSmartPointer< > InteractionCallback>::New(); > callback->m_pInteractor = interactor.Get(); > callback->m_pActorSurface = actor.Get(); > callback->m_pCutPlane = planeCut.Get(); > callback->m_pActorContour = actorContour.Get(); > callback->m_pActorFilled = actorFilled.Get(); > vtkSmartPointer style = vtkSmartPointer< > vtkInteractorStyle>::New(); > interactor->SetInteractorStyle(style); > style->AddObserver(vtkCommand::MouseMoveEvent, callback); > > renderer->ResetCamera(-1, 1, -1, 1, -1, 1); > renderer->GetActiveCamera()->ParallelProjectionOn(); > renderWindow->Render(); > > interactor->Initialize(); > > interactor->Start(); > > return EXIT_SUCCESS; > } > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of > vtkusers-request at vtk.org > Sent: Friday, March 02, 2018 3:19 PM > To: vtkusers at vtk.org > Subject: vtkusers Digest, Vol 167, Issue 6 > > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk. > org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I- > OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m= > LEPlWwob3RaATj2F7NLtpCgz9jCbYxrZVKqUBxw04QA&s= > Ej7w16ZJQy02Uvg3d2LzSZ7xIDDkBIUqNYKBToY2xxE&e= > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific than > "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. Problem with vtkContourTriangulator and vtkPlaneCutter > (Jeffery Lewis) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 2 Mar 2018 22:57:44 +0000 > From: Jeffery Lewis > To: "vtkusers at vtk.org" > Subject: [vtkusers] Problem with vtkContourTriangulator and > vtkPlaneCutter > Message-ID: > namprd05.prod.outlook.com> > > Content-Type: text/plain; charset="us-ascii" > > I have a prototype that generates a super toroid surface model. A cut > plane is defined to be orthogonal to the camera line of sight, and cuts > through the middle of the surface model. The cut contour (generated by > vtkCutter), and filled cut contour (generated by vtkContourTriangulator) is > rendered with the surface model. The surface model is shown transparent as > it is only a reference. The rendering of interest is the cut contour (shown > as red contour) and filled cut contour (shown as green). Moving the mouse > rotates the surface model. The cut plane stays orthogonal to the camera > while the surface model rotates. By rotating the surface model, you can see > the cut contour and filled cut contour get updated interactively as it > slices through the middle of the surface model. > > Unfortunately, the filled cut contour does not look right and I can't seem > to figure it out. If I change the surface model to something simpler like a > cone, then everything looks fine. > > Also of note is that if I switch out the vtkCutter with a vtkPlaneCutter, > the program crashes. I would like to use the vtkPlaneCutter since from its > documentation seems to indicate that it will get better performance. The > vtkPlaneCutter crashes using either the super toroid or cone. > > Attached is the source code. The stuff between "// Setup a slider widget > for each varying parameter BEGIN" and "// Setup a slider widget for each > varying parameter END" can be ignored as this only involves setting up > sliders to manipulate the super toroid, which comes from the > ParametricSuperToroidDemo example. The setup of the pipleline for the cut > contour and filled cut contour is near the bottom. > > Also attached is a sample screen shot of the incorrect filled cut contour. > > > > > Jeffery Lewis > Staff Software Engineer, Treatment Planning Systems > > 1310 Chesapeake Terrace > Sunnyvale, CA 94089 > USA > Tel: 1.408.789.4367 > jlewis at accuray.com > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruvva at yahoo.com Tue Mar 6 02:00:39 2018 From: ruvva at yahoo.com (Koteswara Rao Ruvva) Date: Tue, 6 Mar 2018 07:00:39 +0000 (UTC) Subject: [vtkusers] Assembly Rotation References: <1188740731.10630293.1520319639402.ref@mail.yahoo.com> Message-ID: <1188740731.10630293.1520319639402@mail.yahoo.com> Hello All, I have a vtkAssembly that is made out of two vtkPolydata objects. After rendering them, I create points and lines interactively and add to the assembly using AddPart method. So far so good. When I rotate the assembly about a vector by an angle 'theta', the Polydata objects rotate by correct amount. But?the points and the lines rotate by double the theta. And no issues with translation. I could not figure it out. Any help? Thank youRao -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellby at yahoo.com Tue Mar 6 05:20:08 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Tue, 6 Mar 2018 11:20:08 +0100 Subject: [vtkusers] VTK + Qt in a remote ssh session Message-ID: <7fabd892-3511-fb0e-baa2-7f0e2d68caac@yahoo.com> Hi, I'm trying to run an application using python, VTK and Qt in a remote box through an ssh connection. A simple example with just python+VTK works by using vglrun, but when I try python+VTK+Qt I get: ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 785 vtkXOpenGLRenderWindow (0x1e5bde0): GLEW could not be initialized. If instead of a plain ssh connection I use the ThinLinc client, then with vglrun both work. How could I solve/debug this? I'm using VTK 8.1.0 installed with pip, and I've tried differet PyQt4, PyQt5, PySide versions all to the same effect. Thanks, Ignacio These are my sample files: test.py =============================================== import vtk cylinder = vtk.vtkCylinderSource() cylinder.SetResolution(8) cylinderMapper = vtk.vtkPolyDataMapper() cylinderMapper.SetInputConnection(cylinder.GetOutputPort()) cylinderActor = vtk.vtkActor() cylinderActor.SetMapper(cylinderMapper) cylinderActor.GetProperty().SetColor(1,0,0) ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.AddActor(cylinderActor) iren.Initialize() iren.Start() =============================================== testqt.py =============================================== import sys import vtk from qtpy import QtCore, QtGui, QtWidgets from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor class MainWindow(QtWidgets.QMainWindow): def __init__(self, parent = None): QtWidgets.QMainWindow.__init__(self, parent) self.frame = QtWidgets.QFrame() self.vl = QtWidgets.QVBoxLayout() self.vtkWidget = QVTKRenderWindowInteractor(self.frame) self.vl.addWidget(self.vtkWidget) self.ren = vtk.vtkRenderer() self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) self.iren = self.vtkWidget.GetRenderWindow().GetInteractor() # Create source source = vtk.vtkSphereSource() source.SetCenter(0, 0, 0) source.SetRadius(5.0) # Create a mapper mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(source.GetOutputPort()) # Create an actor actor = vtk.vtkActor() actor.SetMapper(mapper) self.ren.AddActor(actor) self.ren.ResetCamera() self.frame.setLayout(self.vl) self.setCentralWidget(self.frame) self.show() self.iren.Initialize() if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) window = MainWindow() sys.exit(app.exec_()) =============================================== From amine.aboufirass at gmail.com Tue Mar 6 07:29:02 2018 From: amine.aboufirass at gmail.com (Amine Aboufirass) Date: Tue, 6 Mar 2018 13:29:02 +0100 Subject: [vtkusers] Rendering and saving unstructured grid mesh to image file Message-ID: Dear all, I have an unstructured grid cell data file which I would like to render and then save to a png image. I made use of available examples to generate a python code which I have attached below. The file I am using this with is also attached. The rendering seems to work but I am not sure why it cannot send the render window content to an image. It keeps giving me the following error: ?!: libpng warning: Image width is zero in IHDR ?!: libpng warning: Image height is zero in IHDR I'm not sure what is causing this, I followed the documentation to the best of my ability but still can't figure it out. Could anyone please help? Thanks Amine -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- from vtk import * # The source file file_name = 'MeshData.vtk'#"MeshData.vtk" # Read the source file. reader = vtkUnstructuredGridReader() reader.SetFileName(file_name) reader.Update() # Needed because of GetScalarRange output = reader.GetOutput() #scalar_range = output.GetScalarRange() # Create the mapper that corresponds the objects of the vtk file # into graphics elements mapper = vtkDataSetMapper() mapper.SetInputData(output) #mapper.SetScalarRange(scalar_range) # Create the Actor actor = vtkActor() actor.GetProperty().SetRepresentationToWireframe() actor.SetMapper(mapper) # Create the Renderer renderer = vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(1, 1, 1) # Set background to white # Create the RendererWindow renderer_window = vtkRenderWindow() renderer_window.AddRenderer(renderer) #Image https://www.vtk.org/Wiki/VTK/Examples/Python/Screenshot w2if = vtk.vtkWindowToImageFilter() w2if.SetInput(renderer_window) w2if.Update() writer = vtk.vtkPNGWriter() writer.SetFileName("screenshot.png") writer.SetInputData(w2if.GetOutput()) writer.Write() # Create the RendererWindowInteractor and display the vtk_file #interactor = vtkRenderWindowInteractor() #interactor.SetRenderWindow(renderer_window) #interactor.Initialize() #interactor.Start() # -------------- next part -------------- A non-text attachment was scrubbed... Name: MeshData.vtk Type: application/octet-stream Size: 566142 bytes Desc: not available URL: From niklas.karcher at navasto.de Tue Mar 6 07:48:38 2018 From: niklas.karcher at navasto.de (Niklas Karcher) Date: Tue, 6 Mar 2018 12:48:38 +0000 Subject: [vtkusers] Strange behavior of VTK in the computation of polygon area Message-ID: Hello, I am experiencing a strange behavior of VTK using its python interface. I am using VTK 8.0.1 and Python 2.7.14 on CentOS7. The base code of my minimum working example is the following: import vtk coneSource = vtk.vtkConeSource() coneSource.Update() cone = vtk.vtkPolyData() cone.DeepCopy(coneSource.GetOutput()) cone2 = vtk.vtkPolyData() cone2.DeepCopy(cone) N = 10 for _ in range(N): print cone.GetCell(0).ComputeArea(), cone2.GetCell(0).ComputeArea() What it does: 1. It creates a cone 'cone' from a vtkConeSource 2. Duplicates it into a 'cone2' and 3. accesses the polygon cell at the base of the cone of 'cone' and 'cone2' and evaluates the area. The for-loop in step 3 shows the strange behavior. With varying 'N' the print statements produces different results. Also whether or not I run this code in PyCharm or in a terminal triggers a different outcome of the print statements. In my IDE the results for different N are the following: +----+------+-------+ | N | Case | Case2 | +----+------+-------+ | 1 | inf | OK | | 10 | inf | OK | | 80 | OK | OK | +----+------+-------+ Strangely enough the result also depends on whether or not the following import at the top of the script is present even though its functionality is never used: from vtk.util.numpy_support import vtk_to_numpy Then the result is the following: +----+------+-------+ | N | Case | Case2 | +----+------+-------+ | 1 | nan | OK | | 10 | inf | OK | | 80 | OK | OK | +----+------+-------+ I also varied the way the vtkConeSource returns its result to 'cone'. If I change the lines cone = vtk.vtkPolyData() cone.DeepCopy(coneSource.GetOutput()) to cone = coneSource.GetOutput() The result tables look like this: +----+------+-------+ | N | Case | Case2 | +----+------+-------+ | 1 | OK | OK | | 10 | (ok) | OK | | 80 | (ok) | OK | +----+------+-------+ with (ok) meaning that the first print of the for loop prints an incorrect result like inf or nan but the rest of the output is correct. Note that all other cell areas of the cones are computed correctly (my hunch is that this is due to the fact that the rest of the cells are triangles and not polygons, even though the vtkPolyData object does not distinguish between the two types). Also all the results displayed above are 100% reproduceable on my machine. My question to the mailing list is: What I am doing wrong in the creation and copying of my two cones? It appears as if the memory behind the two cones is corrupted in some way. How can I assure that the area calculation is always successful? Regards Niklas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5728 bytes Desc: not available URL: From grothausmann.roman at mh-hannover.de Tue Mar 6 08:36:30 2018 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Tue, 6 Mar 2018 14:36:30 +0100 Subject: [vtkusers] Why two versions of UpdatePiece() for vtkXMLPolyDataReader Message-ID: <3b007f87-cd19-6de7-a82a-2e3a41d895e5@mh-hannover.de> Dear mailing list members, VTK-7.1 introduced a change to the API concerning StreamingDemandDrivenPipeline (https://www.vtk.org/doc/nightly/html/VTK-7-1-Changes.html). I gethered from that, that reader->SetUpdateExtent(0, myId, numProcs, 0); needs to be changed to reader->UpdatePiece(0, myId, numProcs, 0); which works fine for e.g. vtkXMLImageDataReader but does not work for e.g. vtkXMLPolyDataReader, which under "all members" (https://www.vtk.org/doc/nightly/html/classvtkXMLPolyDataReader-members.html) has two UpdatePiece listed. It seems the one from vtkAlgroithm is needed. Is casting to vtkXMLDataReader/vtkAlgroithm the intended way to get to this? Many thanks for any help or hints Roman -- 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 jellby at yahoo.com Tue Mar 6 11:45:41 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Tue, 6 Mar 2018 17:45:41 +0100 Subject: [vtkusers] Saving image with transparent background from Qt Message-ID: Hi, I'd like to save a PNG image with transparent background (even though the render window has a coloured background). I've checked the example at https://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot and I can get what I want from a simple python+VTK application. But when I add Qt into the mix, the image I get has opaque background. The relevant code is simply: renWin = self.vtkWidget.GetRenderWindow() renWin.SetAlphaBitPlanes(1) wti = vtk.vtkWindowToImageFilter() wti.SetInput(renWin) wti.SetInputBufferTypeToRGBA() wti.ReadFrontBufferOff() wti.Update() w = vtk.vtkPNGWriter() w.SetFileName('screenshot.png') w.SetInputConnection(wti.GetOutputPort()) w.Write() Can anyone get it to work? Ignacio From allison.vacanti at kitware.com Tue Mar 6 11:51:02 2018 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Tue, 6 Mar 2018 11:51:02 -0500 Subject: [vtkusers] VTK pipeline thread safety In-Reply-To: <03E6557F-1735-4DA9-9CA9-15E9E980A3C8@googlemail.com> References: <03E6557F-1735-4DA9-9CA9-15E9E980A3C8@googlemail.com> Message-ID: Hi Kit, You are correct, you will run into issues trying to share the filter between threads since they are stateful. You'll need to manually create and configure a new filter for each thread. The VruiVTK project has done something similar, but it executes isolated data pipelines in a single background thread while doing threaded rendering to multiple OpenGL contexts, including thread safe data transfer between data<->render pipelines. Might be worth poking around in it and see if anything useful pops out. VruiVTK library: https://github.com/VruiVTK/vtkVRUI MooseViewer (uses VruiVTK, the "mvClassName" classes are relevant to threading): https://github.com/VruiVTK/MooseViewer Be warned that there are dragons lurking -- the pipeline/filter system itself is thread safe when done carefully, but some utilities in VTK (e.g. text rendering) use single-threaded external libraries or process-wide globals that can bite you. For just crunching some data, though, you should be fine. HTH, Allie On Mon, Mar 5, 2018 at 11:39 AM, Kit Chambers wrote: > Hi, > > I am looking to write a VTK filter which contains a series of sub filters > which are executed in parallel inside an OpenMP loop. The RequestData would > look something like this: > > 1- Set up the the filters (filter1 -> filter2 -> filter3), this sequence > might change between different usages. > 2- Start threading / create the parallel region > 3- Parallel loop over some different inputs > 3a - Set filter1 input > 3b - Execute the filter series > 3c - Add the result to output > > Would I be correct in thinking that the above will result in a conflict > where filter inputs and outputs get over written by successive threads? If > so then is there a handy way to create a thread local copy of the VTK > filters between steps 2 and 3? > > Any help would be appreciated. > > Kit > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 jlewis at accuray.com Tue Mar 6 12:22:29 2018 From: jlewis at accuray.com (Jeffery Lewis) Date: Tue, 6 Mar 2018 17:22:29 +0000 Subject: [vtkusers] Issues with vtkImageReslice orientation Message-ID: Hi Eric, I set the matrix passed to SetResliceTransform() to the following... Inverse of [View]x[Volume] Where [View] transforms world space into screen space (so it has scaling built into this matrix). [Volume] transforms the volume coordinate system into world space. You will probably want to center things in your view port. You can do this with SetOutputOrigin() and proving a translation of half your view port. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of vtkusers-request at vtk.org Sent: Monday, March 05, 2018 9:00 AM To: vtkusers at vtk.org Subject: vtkusers Digest, Vol 167, Issue 11 Send vtkusers mailing list submissions to vtkusers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e= or, via email, send a message with subject or body 'help' to vtkusers-request at vtk.org You can reach the person managing the list at vtkusers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..." Today's Topics: 1. Issues with vtkImageReslice orientation (Eric Petersen) 2. Re: Error reading asci data. Possible mismatch of datasize with declaration (Bill Lorensen) 3. VTK pipeline thread safety (Kit Chambers) 4. Re: Error reading asci data. Possible mismatch of datasize with declaration (Bill Lorensen) 5. Re: Error reading asci data. Possible mismatch of datasize with declaration (Bill Lorensen) 6. Re: Error reading asci data. Possible mismatch of datasize with declaration (Bill Lorensen) ---------------------------------------------------------------------- Message: 1 Date: Mon, 5 Mar 2018 09:36:17 -0600 From: Eric Petersen To: VTK Users Subject: [vtkusers] Issues with vtkImageReslice orientation Message-ID: Content-Type: text/plain; charset="utf-8" Hello, I'm trying to create an app where I can recreate trans-esophageal echo views using a CT scan. My current prototype has two render windows where the "left" window displays a segmented STL of the CT data, the esophagus path, and the TEE imaging plane. The right window then displays the double-oblique view of the simulated TEE plane. Everything is working fine in the "left" window--I can modify the plane orientation/origin and easily see what I want to image. The issue I'm having is converting this to the vtkImageReslice object. My first approach was to simply take the 4x4 transform matrix "left" window (which is vtk poly data) and set this as the vtkImageReslice reslice matrix. I quickly realized this doesn't work because the reslice plane origins are different. I've tried some different offsets/origins for the 4x4 reslice matrix and I can get the slices correct under some conditions but not double-oblique views. So, I have poly data (of a heart in this case) and a plane with known origin and rotation matrix (global x,y,z coordinates known). What do I need to know in order to obtain an image of this plane using vtkImageReslice? Do I need to approach how I'm creating the reslice matrix differently (I'm currently doing all rotations using (0,0,0) origin then translating to desired point)? Any help is greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Mon, 5 Mar 2018 08:24:20 -0800 From: Bill Lorensen To: Amine Aboufirass Cc: VTK Users , vtk-developers-request at vtk.org, VTK Developers Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration Message-ID: Content-Type: text/plain; charset="UTF-8" Tensor data should have 9 entries per point. Your data has 3 entries per point On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass wrote: > Hello, > > > > I am trying to read a vtk unstructured grid file with tensor data in > paraview. I cannot for the life of me figure out why I am getting the > following error message: > > > > Error reading asci data. Possible mismatch of datasize with declaration. > > > > The problem is that I have actually counted up the points and the > tensors inside this file. It is apparent that it contains 1560 points > and 4680 corresponding tensor entries. I have attached the file above > so that the problem can be reproduced. > > > > Why am I getting the above error and how can I fix it? > > > > Thanks, > > > > Amine > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_op > ensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHH > QX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwA > jDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e= > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_V > TK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTI > tPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0B > rzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e= > > Search the list archives at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_searc > h_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgM > iAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Ok > rck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_l > istinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi > AohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okr > ck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e= > -- Unpaid intern in BillsParadise at noware dot com ------------------------------ Message: 3 Date: Mon, 5 Mar 2018 16:39:53 +0000 From: Kit Chambers To: VTK Users Subject: [vtkusers] VTK pipeline thread safety Message-ID: <03E6557F-1735-4DA9-9CA9-15E9E980A3C8 at googlemail.com> Content-Type: text/plain; charset=us-ascii Hi, I am looking to write a VTK filter which contains a series of sub filters which are executed in parallel inside an OpenMP loop. The RequestData would look something like this: 1- Set up the the filters (filter1 -> filter2 -> filter3), this sequence might change between different usages. 2- Start threading / create the parallel region 3- Parallel loop over some different inputs 3a - Set filter1 input 3b - Execute the filter series 3c - Add the result to output Would I be correct in thinking that the above will result in a conflict where filter inputs and outputs get over written by successive threads? If so then is there a handy way to create a thread local copy of the VTK filters between steps 2 and 3? Any help would be appreciated. Kit ------------------------------ Message: 4 Date: Mon, 5 Mar 2018 08:48:02 -0800 From: Bill Lorensen To: Amine Aboufirass Cc: VTK Users , vtk-developers-request at vtk.org, VTK Developers Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration Message-ID: Content-Type: text/plain; charset="utf-8" Sorry, you have 6 entries per point. Tses are symetric tensors. Declare the type as TENSORS6 rather than TENSORS. Bill On Mon, Mar 5, 2018 at 8:24 AM, Bill Lorensen wrote: > Tensor data should have 9 entries per point. Your data has 3 entries per point > > > On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass > wrote: >> Hello, >> >> >> >> I am trying to read a vtk unstructured grid file with tensor data in >> paraview. I cannot for the life of me figure out why I am getting the >> following error message: >> >> >> >> Error reading asci data. Possible mismatch of datasize with declaration. >> >> >> >> The problem is that I have actually counted up the points and the tensors >> inside this file. It is apparent that it contains 1560 points and 4680 >> corresponding tensor entries. I have attached the file above so that the >> problem can be reproduced. >> >> >> >> Why am I getting the above error and how can I fix it? >> >> >> >> Thanks, >> >> >> >> Amine >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e= >> >> Please keep messages on-topic and check the VTK FAQ at: >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0BrzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e= >> >> Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e= >> >> Follow this link to subscribe/unsubscribe: >> https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e= >> > > > > -- > Unpaid intern in BillsParadise at noware dot com -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 5 Date: Mon, 5 Mar 2018 08:49:56 -0800 From: Bill Lorensen To: Amine Aboufirass Cc: VTK Users , vtk-developers-request at vtk.org, VTK Developers Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration Message-ID: Content-Type: text/plain; charset="utf-8" The error message says there is a mismatch in the number declared and the number present. On Mar 5, 2018 8:48 AM, "Bill Lorensen" wrote: > Sorry, you have 6 entries per point. Tses are symetric tensors. Declare > the type as TENSORS6 rather than TENSORS. > > Bill > > > On Mon, Mar 5, 2018 at 8:24 AM, Bill Lorensen > wrote: > > Tensor data should have 9 entries per point. Your data has 3 entries per > point > > > > > > On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass > > wrote: > >> Hello, > >> > >> > >> > >> I am trying to read a vtk unstructured grid file with tensor data in > >> paraview. I cannot for the life of me figure out why I am getting the > >> following error message: > >> > >> > >> > >> Error reading asci data. Possible mismatch of datasize with declaration. > >> > >> > >> > >> The problem is that I have actually counted up the points and the > tensors > >> inside this file. It is apparent that it contains 1560 points and 4680 > >> corresponding tensor entries. I have attached the file above so that the > >> problem can be reproduced. > >> > >> > >> > >> Why am I getting the above error and how can I fix it? > >> > >> > >> > >> Thanks, > >> > >> > >> > >> Amine > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e= > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0BrzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e= > >> > >> Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e= > >> > >> Follow this link to subscribe/unsubscribe: > >> https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e= > >> > > > > > > > > -- > > Unpaid intern in BillsParadise at noware dot com > > > > -- > Unpaid intern in BillsParadise at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 6 Date: Mon, 5 Mar 2018 08:56:17 -0800 From: Bill Lorensen To: Amine Aboufirass Cc: VTK Users , vtk-developers-request at vtk.org, VTK Developers Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration Message-ID: Content-Type: text/plain; charset="UTF-8" Ignore I previous responses. I miscalcuated. ------------------------------ Subject: Digest Footer _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0BrzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e= ------------------------------ End of vtkusers Digest, Vol 167, Issue 11 ***************************************** -- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. From polly_sukting at hotmail.com Tue Mar 6 12:28:51 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Tue, 6 Mar 2018 17:28:51 +0000 Subject: [vtkusers] vtkCurvatures SetCurvatureTypeToGaussian Message-ID: Hi, I would like to calculate curvature on my 3D vtk data using vtkCurvatures, SetCurvatureTypeToGaussian. When I applied fran_cut.vtk, the result showed the face completely. But, when I applied my 3D vtk data (ASCII, polydata, 5090 points), I got a line in the middle of the face. [cid:a2df0569-c266-444b-8b5e-2032ddd0a947] And also, I couldn't execute both mean and gaussian function at the same time by using vtkCurvatures. It can only detect on one of the filter (which comes in the later line) For example, vtkCurvatures *HKCurve = vtkCurvatures::New(); HKCurve->SetInputConnection(reader->GetOutputPort()); HKCurve->SetCurvatureTypeToGaussian(); HKCurve->SetCurvatureTypeToMean(); HKCurve->Update(); Only Mean curvature will be calculated. Your advice will be much appreciated! Thank you. Best, Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: G_0.035.jpg Type: image/jpeg Size: 46647 bytes Desc: G_0.035.jpg URL: From jlewis at accuray.com Tue Mar 6 12:00:57 2018 From: jlewis at accuray.com (Jeffery Lewis) Date: Tue, 6 Mar 2018 17:00:57 +0000 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter Message-ID: Thank you Andrew for looking into this. Doing the changes does seem to work. Unfortunately, if you change the resolution of the surface model by adding the following two lines of code... source->SetPhiResolution(100); source->SetThetaResolution(100); ...you will see the same type of issues on the filled contour. Also, if I substitute the vtkPlaneCutter for the vtkCutter using the vtkSuperquadricSource, it crashes in a similar way. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of vtkusers-request at vtk.org Sent: Tuesday, March 06, 2018 4:29 AM To: vtkusers at vtk.org Subject: vtkusers Digest, Vol 167, Issue 12 Send vtkusers mailing list submissions to vtkusers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=MWPDDDsPKpMgwMJj4wU5oge7N5g3Nur9iaPwBS295Gs&e= or, via email, send a message with subject or body 'help' to vtkusers-request at vtk.org You can reach the person managing the list at vtkusers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..." Today's Topics: 1. Re: Error reading asci data. Possible mismatch of datasize with declaration (Amine Aboufirass) 2. Re: Iterate over vtkInformation (Ken Martin) 3. How to triangulate two non-intersecting polylines, now in 3D (normanius) 4. Re: How to triangulate two non-intersecting polylines, now in 3D (normanius) 5. Re: How to triangulate two non-intersecting polylines, now in 3D (normanius) 6. Re: How to triangulate two non-intersecting polylines, now in 3D (Bill Lorensen) 7. Re: How to triangulate two non-intersecting polylines, now in 3D (normanius) 8. Re: How to triangulate two non-intersecting polylines, now in 3D (normanius) 9. Re: Error reading asci data. Possible mismatch of datasize with declaration (kenichiro yoshimi) 10. how to replicate the data rendering line between two vtkresliceimageviewer variables? (=?gb18030?B?0e7B+Lb5x+A=?=) 11. Re: Problem with vtkContourTriangulator and vtkPlaneCutter (Jeffery Lewis) (Andrew Maclean) 12. Assembly Rotation (Koteswara Rao Ruvva) 13. VTK + Qt in a remote ssh session (Ignacio Fern?ndez Galv?n) 14. Rendering and saving unstructured grid mesh to image file (Amine Aboufirass) ---------------------------------------------------------------------- Message: 1 Date: Mon, 5 Mar 2018 18:10:21 +0100 From: Amine Aboufirass To: Bill Lorensen Cc: VTK Users , vtk-developers-request at vtk.org, VTK Developers Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration Message-ID: Content-Type: text/plain; charset="utf-8" There are 9 tensor components. It is a true tensor On Mon, Mar 5, 2018 at 5:56 PM, Bill Lorensen wrote: > Ignore I previous responses. I miscalcuated. > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Mon, 5 Mar 2018 14:26:04 -0500 From: Ken Martin To: Doug Hoppes Cc: "vtkusers at vtk.org" Subject: Re: [vtkusers] Iterate over vtkInformation Message-ID: Content-Type: text/plain; charset="utf-8" I **think** somehow you have to pass that custom key down to both the code that is inserting the key and the code that is checking if the key exists. Unless I am missing something I don't think there is anyway around that. Usually the key is a static defined somewhere and the code that uses it includes the header that defines it. Hope that helps! On Wed, Feb 28, 2018 at 11:35 AM, Doug Hoppes wrote: > Hey all, > > > > For a vtkprop, I need to set some custom attributes (i.e. > allowSecureDeletion, etc). So, the main way to do this is to set a > property key (in a vtkinformation object) and then access the property > later on. > > > > The problem is that I need the original custom key > pointer to access the property. However, I don?t have access to that > property object since I?m looping through all of the vtkprops and want > to ask it if the specific property key exists. > > > > Dougie > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_&d > =DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rts > YkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=epnvRQ7HOVR7d > r1pNmcchM4eLG-93AitCbnvHexf9nk&e= > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_V > TK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTI > tPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=4vW > mhE6snubmnh4n3w18s3fAMY84jczAIn076hKXtxo&e= > > Search the list archives at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_searc > h_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgM > iAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEq > yHQ&s=A_26bezXudAI1o583GywYuDetkaSQqFX-AERDqviacI&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_l > istinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi > AohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqy > HQ&s=MWPDDDsPKpMgwMJj4wU5oge7N5g3Nur9iaPwBS295Gs&e= > > -- 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: ------------------------------ Message: 3 Date: Mon, 5 Mar 2018 14:24:14 -0700 (MST) From: normanius To: vtkusers at vtk.org Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D Message-ID: <1520285054864-0.post at n5.nabble.com> Content-Type: text/plain; charset=us-ascii Dear all I've got a follow-up question on this post . How can I triangulate two non-intersecting contours that are /not/ lying in the same plane? See the screenshot below that illustrates my problem. Any ideas? -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk.1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=ZcXXP5FbvaYCmTevP7gcBfmN_62nJVqZnOFMqzl1aKU&e= ------------------------------ Message: 4 Date: Mon, 5 Mar 2018 14:29:31 -0700 (MST) From: normanius To: vtkusers at vtk.org Subject: Re: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D Message-ID: <1520285371710-0.post at n5.nabble.com> Content-Type: text/plain; charset=us-ascii The contour triangulator that was suggested in my previous post operates only in 2D. So one solution to this problem that came to my mind is that the contours need to be projected into the same plane where the contour triangulation is performed. Then, only the edges from contour need to be "transferred" into a common polydata object. (All this works only if the contours are lying in parallel planes, which is the case for me.) In simplified code, this would read as However, this does not work robustly, as shown in this screenshot... -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk.1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=ZcXXP5FbvaYCmTevP7gcBfmN_62nJVqZnOFMqzl1aKU&e= ------------------------------ Message: 5 Date: Mon, 5 Mar 2018 14:35:36 -0700 (MST) From: normanius To: vtkusers at vtk.org Subject: Re: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D Message-ID: <1520285736914-0.post at n5.nabble.com> Content-Type: text/plain; charset="us-ascii" (I think I forgot to set the HTML flag before, now the code should be visible.) -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk.1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=ZcXXP5FbvaYCmTevP7gcBfmN_62nJVqZnOFMqzl1aKU&e= -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 6 Date: Mon, 5 Mar 2018 14:29:28 -0800 From: Bill Lorensen To: normanius Cc: VTK Users Subject: Re: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D Message-ID: Content-Type: text/plain; charset="utf-8" This example may be useful. https://urldefense.proofpoint.com/v2/url?u=https-3A__lorensen.github.io_VTKExamples_site_Cxx_PolyData_ContoursToSurface_&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=k6WgciejkyjS4qHvcaEB8VBZUJsrKRZ80G4T9z9rjSE&e= On Mar 5, 2018 1:35 PM, "normanius" wrote: > (I think I forgot to set the HTML flag before, now the code should be > visible.) > > > # comboBefore = combinePolyData(edge1, edge2) # center1 = > computeCenter(edge1) # center2 = computeCenter(edge2) # edge2 = > scaleObject(edge2, 1.2) # Scaling is required to make sure that the > contours are not intersecting in 2D # edge2 = moveObject(edge2, > center1-center2) # comboAfter = combinePolyData(edge1, edge2) result = > vtk.vtkContourTriangulator() > result.SetInputData(combo) > result.Update() > > poly = vtk.vtkPolyData() > poly.SetPoints(comboBefore.GetPoints()) > poly.SetPolys(result.GetPolys()) > poly.BuildLinks() > poly.BuildCells() > > > ------------------------------ > Sent from the VTK - Users mailing list archive > at Nabble.com. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_&d > =DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rts > YkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=epnvRQ7HOVR7d > r1pNmcchM4eLG-93AitCbnvHexf9nk&e= > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_V > TK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTI > tPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=4vW > mhE6snubmnh4n3w18s3fAMY84jczAIn076hKXtxo&e= > > Search the list archives at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_searc > h_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgM > iAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEq > yHQ&s=A_26bezXudAI1o583GywYuDetkaSQqFX-AERDqviacI&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_l > istinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi > AohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqy > HQ&s=MWPDDDsPKpMgwMJj4wU5oge7N5g3Nur9iaPwBS295Gs&e= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 7 Date: Mon, 5 Mar 2018 17:29:48 -0700 (MST) From: normanius To: vtkusers at vtk.org Subject: Re: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D Message-ID: <1520296188366-0.post at n5.nabble.com> Content-Type: text/plain; charset="us-ascii" Many thanks for the hint, Bill!I found that sample too. However, it is very difficult to create watertight closures with this approach. See what my result looks like. From distance things look okayish. However, if I zoom in, the result does not look good. What can I do to improve?(Here a sketch of my implementation: https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_kPR1wKv6&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=krhjtGnUcGcFmk9EodBR4FXkBlGcwORi0V_oKapsWnA&e= ) -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk.1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=ZcXXP5FbvaYCmTevP7gcBfmN_62nJVqZnOFMqzl1aKU&e= -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 8 Date: Mon, 5 Mar 2018 17:32:40 -0700 (MST) From: normanius To: vtkusers at vtk.org Subject: Re: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D Message-ID: <1520296360148-0.post at n5.nabble.com> Content-Type: text/plain; charset="us-ascii" >From far, the result looks okayish... -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk.1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=ZcXXP5FbvaYCmTevP7gcBfmN_62nJVqZnOFMqzl1aKU&e= -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 9 Date: Tue, 6 Mar 2018 09:56:19 +0900 From: kenichiro yoshimi To: Amine Aboufirass Cc: Bill Lorensen , VTK Developers , VTK Users , vtk-developers-request at vtk.org Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration Message-ID: Content-Type: text/plain; charset="UTF-8" Hello Amine, Could you try to replace very small numbers (like 2.778595324927526E-106) with zeros? Overflow or underflow might be caused by them in a single-precision floating-point numbers. Thanks 2018-03-06 2:10 GMT+09:00 Amine Aboufirass : > There are 9 tensor components. It is a true tensor > > On Mon, Mar 5, 2018 at 5:56 PM, Bill Lorensen > wrote: >> >> Ignore I previous responses. I miscalcuated. > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=68iGeE9EI54qfZjkbpoDtnQcVUn_zOQBlUMEtsdtER0&e= > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=4vWmhE6snubmnh4n3w18s3fAMY84jczAIn076hKXtxo&e= > > Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=A_26bezXudAI1o583GywYuDetkaSQqFX-AERDqviacI&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=MWPDDDsPKpMgwMJj4wU5oge7N5g3Nur9iaPwBS295Gs&e= > ------------------------------ Message: 10 Date: Tue, 6 Mar 2018 11:15:22 +0800 From: "=?gb18030?B?0e7B+Lb5x+A=?=" <312438111 at qq.com> To: "=?gb18030?B?dnRrdXNlcnM=?=" Subject: [vtkusers] how to replicate the data rendering line between two vtkresliceimageviewer variables? Message-ID: Content-Type: text/plain; charset="gb18030" hello guys, I want to assign the data from a vtkresliceimageviewer variable to anther ones.If I use "=",it copys the data only.How to replicate the data rendering line between two vtkresliceimageviewer variables? I will be crazy because of that question. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 11 Date: Tue, 6 Mar 2018 15:24:06 +1100 From: Andrew Maclean To: vtk Cc: Jeffery Lewis Subject: Re: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter (Jeffery Lewis) Message-ID: Content-Type: text/plain; charset="utf-8" Jeffery ?I think this is related to the ParametricFunctions. These functions are generated by mapping R? -> R? and are then triangulated. I tried vtkParametricSuperToroid and sometimes the contouring and cutting worked but in some orientations the triangulation failed. ?If you use a vtkSuperquadricSource e.g: vtkSmartPointer source = vtkSmartPointer::New(); source->SetCenter(0, 0, 0); source->SetPhiRoundness(1.0); source->SetThetaRoundness(1.0); source->ToroidalOn(); Everything seems to work Ok. Andrew > ---------- Forwarded message ---------- > From: Jeffery Lewis > To: "vtkusers at vtk.org" > Cc: > Bcc: > Date: Fri, 2 Mar 2018 23:46:09 +0000 > Subject: Re: [vtkusers] Problem with vtkContourTriangulator and > vtkPlaneCutter (Jeffery Lewis) > Seems like the attachments didn't go through. Here is the code. > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > // Callbacks for the interactions > class SliderCallbackN1 : public vtkCommand { > public: > static SliderCallbackN1 *New() { > return new SliderCallbackN1; > } > virtual void Execute(vtkObject *caller, unsigned long, void*) { > vtkSliderWidget *sliderWidget = > reinterpret_cast(caller); > double value = static_cast(sliderWidget-> > GetRepresentation())->GetValue(); > this->SuperToroid->SetN1(value); > } > SliderCallbackN1() :SuperToroid(0) {} > vtkParametricSuperToroid *SuperToroid; > }; > > class SliderCallbackN2 : public vtkCommand { > public: > static SliderCallbackN2 *New() { > return new SliderCallbackN2; > } > virtual void Execute(vtkObject *caller, unsigned long, void*) { > vtkSliderWidget *sliderWidget = > reinterpret_cast(caller); > double value = static_cast(sliderWidget-> > GetRepresentation())->GetValue(); > this->SuperToroid->SetN2(value); > } > SliderCallbackN2() :SuperToroid(0) {} > vtkParametricSuperToroid *SuperToroid; > }; > > /**This callback will rotate the surface model about x and y axis > depending on the > *current location of the mouse. This will in turn update the cut plane > that is ment to > *be normal to the camera and cuts through the middle of the model, showing > a red > *cut contour, and green filled contour. */ > class InteractionCallback : public vtkCommand { > public: > static InteractionCallback* New() { > return new InteractionCallback; > } > > virtual void Execute(vtkObject*, unsigned long eventID, void* pCallData) > VTK_OVERRIDE { > if (eventID == vtkCommand::MouseMoveEvent) { > // Get the current mouse position. > int aiCurrentPosition[2]; > m_pInteractor->GetEventPosition(aiCurrentPosition); > > // Get the view port size. > int iViewPortWidth = m_pInteractor->GetRenderWindow()->GetSize()[0]; > int iViewPortHeight = m_pInteractor->GetRenderWindow()->GetSize()[1]; > > // Compute rotations about x and y axis. > int iMousePositionAboutCenterX = aiCurrentPosition[0] - iViewPortWidth/2.0; > int iMousePositionAboutCenterY = aiCurrentPosition[1] - > iViewPortHeight/2.0; > double dRotationAboutX = -iMousePositionAboutCenterY/( > iViewPortHeight/2.0)*180.0; > double dRotationAboutY = iMousePositionAboutCenterX/( > iViewPortWidth/2.0)*180.0; > > // Compute transform. > vtkSmartPointer sptmSurfacModel = > vtkSmartPointer::New(); > sptmSurfacModel->RotateX(dRotationAboutX); > sptmSurfacModel->RotateY(dRotationAboutY); > > // Apply the rotation to the surface model actor. > m_pActorSurface->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > // Apply the change to the cut plan normal vector. > // Translations are not required to be removed from the matrix since there > should be none. > double adInitialVector[3]; > adInitialVector[0] = 0.0; > adInitialVector[1] = 0.0; > adInitialVector[2] = 1.0; > double adTransformedVector[3]; > sptmSurfacModel->TransformPoint(adInitialVector, adTransformedVector); > m_pCutPlane->SetNormal(adTransformedVector[0], adTransformedVector[1], > adTransformedVector[2]); > > // Apply the rotation to the contour actor in the opposite direction to > make normal to camera. > sptmSurfacModel->Inverse(); > m_pActorContour->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > // Apply the rotation to the filled actor in the opposite direction to > make normal to camera. > m_pActorFilled->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > m_pInteractor->Render(); > } > } > > // Member variables > // ---------------- > vtkRenderWindowInteractor* m_pInteractor; > vtkActor* m_pActorSurface; > vtkPlane* m_pCutPlane; > vtkActor* m_pActorContour; > vtkActor* m_pActorFilled; > }; > > > int main(int, char *[]) { > > vtkSmartPointer surface =vtkSmartPointer< > vtkParametricSuperToroid>::New(); > vtkSmartPointer source = vtkSmartPointer< > vtkParametricFunctionSource>::New(); > source->SetParametricFunction(surface); > > // Create a synthetic cone. > /*// Un-commented out so can switch surface model source. > vtkSmartPointer source = vtkSmartPointer > ::New(); > source->SetCenter(0, 0, 0); > source->SetRadius(1); > source->SetHeight(2); > source->SetResolution(30); > source->Update(); > */ > > vtkSmartPointer renderer =vtkSmartPointer: > :New(); > vtkSmartPointer mapper =vtkSmartPointer< > vtkPolyDataMapper>::New(); > vtkSmartPointer actor = vtkSmartPointer::New(); > > mapper->SetInputConnection(source->GetOutputPort()); > > vtkSmartPointer backProperty = vtkSmartPointer:: > New(); > backProperty->SetColor(0.8, 0.8, 0.8); > backProperty->SetOpacity(0.6); > actor->SetMapper(mapper); > actor->SetBackfaceProperty(backProperty); > actor->GetProperty()->SetDiffuseColor(1, 1, 1); > actor->GetProperty()->SetOpacity(0.6); > > vtkSmartPointer renderWindow =vtkSmartPointer< > vtkRenderWindow>::New(); > renderWindow->AddRenderer(renderer); > renderWindow->SetSize(640, 480); > renderer->AddActor(actor); > renderer->SetBackground(.2, .3, .4); > > vtkSmartPointer interactor =vtkSmartPointer< > vtkRenderWindowInteractor>::New(); > interactor->SetRenderWindow(renderWindow); > > // Setup a slider widget for each varying parameter BEGIN > double tubeWidth(.004); > double sliderLength(.004); > double titleHeight(.02); > double labelHeight(.02); > > vtkSmartPointer sliderRepN1 = vtkSmartPointer< > vtkSliderRepresentation2D>::New(); > > sliderRepN1->SetMinimumValue(0.0); > sliderRepN1->SetMaximumValue(4.0); > sliderRepN1->SetValue(1.0); > sliderRepN1->SetTitleText("Z squareness"); > > sliderRepN1->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN1->GetPoint1Coordinate()->SetValue(.1, .1); > sliderRepN1->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN1->GetPoint2Coordinate()->SetValue(.9, .1); > > sliderRepN1->SetTubeWidth(tubeWidth); > sliderRepN1->SetSliderLength(sliderLength); > sliderRepN1->SetTitleHeight(titleHeight); > sliderRepN1->SetLabelHeight(labelHeight); > > vtkSmartPointer sliderWidgetN1 = vtkSmartPointer< > vtkSliderWidget>::New(); > sliderWidgetN1->SetInteractor(interactor); > sliderWidgetN1->SetRepresentation(sliderRepN1); > sliderWidgetN1->SetAnimationModeToAnimate(); > sliderWidgetN1->EnabledOn(); > > vtkSmartPointer callbackN1 = vtkSmartPointer< > SliderCallbackN1>::New(); > callbackN1->SuperToroid = surface; > > sliderWidgetN1->AddObserver(vtkCommand::InteractionEvent, callbackN1); > > vtkSmartPointer sliderRepN2 = vtkSmartPointer< > vtkSliderRepresentation2D>::New(); > > sliderRepN2->SetMinimumValue(0.0001); > sliderRepN2->SetMaximumValue(4.0); > sliderRepN2->SetValue(1.0); > sliderRepN2->SetTitleText("XY squareness"); > > sliderRepN2->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN2->GetPoint1Coordinate()->SetValue(.1, .9); > sliderRepN2->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepN2->GetPoint2Coordinate()->SetValue(.9, .9); > > sliderRepN2->SetTubeWidth(tubeWidth); > sliderRepN2->SetSliderLength(sliderLength); > sliderRepN2->SetTitleHeight(titleHeight); > sliderRepN2->SetLabelHeight(labelHeight); > > vtkSmartPointer sliderWidgetN2 = vtkSmartPointer< > vtkSliderWidget>::New(); > sliderWidgetN2->SetInteractor(interactor); > sliderWidgetN2->SetRepresentation(sliderRepN2); > sliderWidgetN2->SetAnimationModeToAnimate(); > sliderWidgetN2->EnabledOn(); > > vtkSmartPointer callbackN2 = vtkSmartPointer< > SliderCallbackN2>::New(); > callbackN2->SuperToroid = surface; > > sliderWidgetN2->AddObserver(vtkCommand::InteractionEvent, callbackN2); > > vtkSmartPointer sliderRepMinimumV = > vtkSmartPointer::New(); > > sliderRepN1->SetMinimumValue(.0001); > sliderRepMinimumV->SetMaximumValue(.9999*vtkMath::Pi()); > sliderRepMinimumV->SetValue(.0001); > sliderRepMinimumV->SetTitleText("V min"); > > sliderRepMinimumV->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepMinimumV->GetPoint1Coordinate()->SetValue(.1, .1); > sliderRepMinimumV->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > dDisplay(); > sliderRepMinimumV->GetPoint2Coordinate()->SetValue(.1, .9); > > sliderRepMinimumV->SetTubeWidth(tubeWidth); > sliderRepMinimumV->SetSliderLength(sliderLength); > sliderRepMinimumV->SetTitleHeight(titleHeight); > sliderRepMinimumV->SetLabelHeight(labelHeight); > > surface->SetN1(1.0); > surface->SetN2(1.0); > // Setup a slider widget for each varying parameter END > > // Set up the cut plane. > vtkSmartPointer planeCut = vtkSmartPointer::New(); > planeCut->SetOrigin(0.0, 0.0, 0.0); > planeCut->SetNormal(0.0, 0.0, 1.0); > > // Set up the cutter which will produce the contour polygons. > vtkSmartPointer polygonsContour = vtkSmartPointer:: > New(); > //vtkSmartPointer polygonsContour = vtkSmartPointer::New(); > // testjal > polygonsContour->SetInputConnection(source->GetOutputPort()); > //polygonsContour->SetPlane(planeCut); // SetPlane only works with a > vtkPlaneCutter. // testjal > polygonsContour->SetCutFunction(planeCut); > > // Clean the polygons from the cutter. Note, this is an experiment to see > if this helps the fills. It does not > // seem to help. > vtkSmartPointer polygonsContourClean = vtkSmartPointer::New(); > // testjal > polygonsContourClean->SetInputConnection(polygonsContour->GetOutputPort()); > // testjal > > // Set up the filled polygons of the contour. > vtkSmartPointer polygonsFilled = vtkSmartPointer< > vtkContourTriangulator>::New(); > polygonsFilled->SetInputConnection(polygonsContourClean->GetOutputPort()); > polygonsFilled->TriangulationErrorDisplayOn(); // testjal > > // Set up the mapper of the contour. > vtkSmartPointer mapperContour = vtkSmartPointer< > vtkDataSetMapper>::New(); > mapperContour->SetInputConnection(polygonsContourClean->GetOutputPort()); > mapperContour->ScalarVisibilityOff(); > > // Set up the mapper of the filled polygons of the contour > vtkSmartPointer mapperFilled = vtkSmartPointer< > vtkDataSetMapper>::New(); > mapperFilled->SetInputConnection(polygonsFilled->GetOutputPort()); > mapperFilled->ScalarVisibilityOff(); > > // Set up the actor of the contour. > vtkSmartPointer actorContour = vtkSmartPointer::New(); > actorContour->SetMapper(mapperContour); > actorContour->GetProperty()->SetColor(1,0,0); > actorContour->GetProperty()->SetLineWidth(5); > > // Set up the actor of the filled polygons of the contour. > vtkSmartPointer actorFilled = vtkSmartPointer::New(); > actorFilled->SetMapper(mapperFilled); > actorFilled->GetProperty()->SetColor(0, 1, 0); > > // Add the contour actor. > renderer->AddActor(actorContour); > > // Add the filld polygons of the contour. > renderer->AddActor(actorFilled); > > // Set up the interaction. > vtkSmartPointer callback = vtkSmartPointer< > InteractionCallback>::New(); > callback->m_pInteractor = interactor.Get(); > callback->m_pActorSurface = actor.Get(); > callback->m_pCutPlane = planeCut.Get(); > callback->m_pActorContour = actorContour.Get(); > callback->m_pActorFilled = actorFilled.Get(); > vtkSmartPointer style = vtkSmartPointer< > vtkInteractorStyle>::New(); > interactor->SetInteractorStyle(style); > style->AddObserver(vtkCommand::MouseMoveEvent, callback); > > renderer->ResetCamera(-1, 1, -1, 1, -1, 1); > renderer->GetActiveCamera()->ParallelProjectionOn(); > renderWindow->Render(); > > interactor->Initialize(); > > interactor->Start(); > > return EXIT_SUCCESS; > } > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of > vtkusers-request at vtk.org > Sent: Friday, March 02, 2018 3:19 PM > To: vtkusers at vtk.org > Subject: vtkusers Digest, Vol 167, Issue 6 > > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk. > org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I- > OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m= > LEPlWwob3RaATj2F7NLtpCgz9jCbYxrZVKqUBxw04QA&s= > Ej7w16ZJQy02Uvg3d2LzSZ7xIDDkBIUqNYKBToY2xxE&e= > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific than > "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. Problem with vtkContourTriangulator and vtkPlaneCutter > (Jeffery Lewis) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 2 Mar 2018 22:57:44 +0000 > From: Jeffery Lewis > To: "vtkusers at vtk.org" > Subject: [vtkusers] Problem with vtkContourTriangulator and > vtkPlaneCutter > Message-ID: > namprd05.prod.outlook.com> > > Content-Type: text/plain; charset="us-ascii" > > I have a prototype that generates a super toroid surface model. A cut > plane is defined to be orthogonal to the camera line of sight, and cuts > through the middle of the surface model. The cut contour (generated by > vtkCutter), and filled cut contour (generated by vtkContourTriangulator) is > rendered with the surface model. The surface model is shown transparent as > it is only a reference. The rendering of interest is the cut contour (shown > as red contour) and filled cut contour (shown as green). Moving the mouse > rotates the surface model. The cut plane stays orthogonal to the camera > while the surface model rotates. By rotating the surface model, you can see > the cut contour and filled cut contour get updated interactively as it > slices through the middle of the surface model. > > Unfortunately, the filled cut contour does not look right and I can't seem > to figure it out. If I change the surface model to something simpler like a > cone, then everything looks fine. > > Also of note is that if I switch out the vtkCutter with a vtkPlaneCutter, > the program crashes. I would like to use the vtkPlaneCutter since from its > documentation seems to indicate that it will get better performance. The > vtkPlaneCutter crashes using either the super toroid or cone. > > Attached is the source code. The stuff between "// Setup a slider widget > for each varying parameter BEGIN" and "// Setup a slider widget for each > varying parameter END" can be ignored as this only involves setting up > sliders to manipulate the super toroid, which comes from the > ParametricSuperToroidDemo example. The setup of the pipleline for the cut > contour and filled cut contour is near the bottom. > > Also attached is a sample screen shot of the incorrect filled cut contour. > > > > > Jeffery Lewis > Staff Software Engineer, Treatment Planning Systems > > 1310 Chesapeake Terrace > Sunnyvale, CA 94089 > USA > Tel: 1.408.789.4367 > jlewis at accuray.com > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 12 Date: Tue, 6 Mar 2018 07:00:39 +0000 (UTC) From: Koteswara Rao Ruvva To: Todd via Vtkusers Subject: [vtkusers] Assembly Rotation Message-ID: <1188740731.10630293.1520319639402 at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hello All, I have a vtkAssembly that is made out of two vtkPolydata objects. After rendering them, I create points and lines interactively and add to the assembly using AddPart method. So far so good. When I rotate the assembly about a vector by an angle 'theta', the Polydata objects rotate by correct amount. But?the points and the lines rotate by double the theta. And no issues with translation. I could not figure it out. Any help? Thank youRao -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 13 Date: Tue, 6 Mar 2018 11:20:08 +0100 From: Ignacio Fern?ndez Galv?n To: vtkusers at vtk.org Subject: [vtkusers] VTK + Qt in a remote ssh session Message-ID: <7fabd892-3511-fb0e-baa2-7f0e2d68caac at yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Hi, I'm trying to run an application using python, VTK and Qt in a remote box through an ssh connection. A simple example with just python+VTK works by using vglrun, but when I try python+VTK+Qt I get: ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 785 vtkXOpenGLRenderWindow (0x1e5bde0): GLEW could not be initialized. If instead of a plain ssh connection I use the ThinLinc client, then with vglrun both work. How could I solve/debug this? I'm using VTK 8.1.0 installed with pip, and I've tried differet PyQt4, PyQt5, PySide versions all to the same effect. Thanks, Ignacio These are my sample files: test.py =============================================== import vtk cylinder = vtk.vtkCylinderSource() cylinder.SetResolution(8) cylinderMapper = vtk.vtkPolyDataMapper() cylinderMapper.SetInputConnection(cylinder.GetOutputPort()) cylinderActor = vtk.vtkActor() cylinderActor.SetMapper(cylinderMapper) cylinderActor.GetProperty().SetColor(1,0,0) ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.AddActor(cylinderActor) iren.Initialize() iren.Start() =============================================== testqt.py =============================================== import sys import vtk from qtpy import QtCore, QtGui, QtWidgets from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor class MainWindow(QtWidgets.QMainWindow): def __init__(self, parent = None): QtWidgets.QMainWindow.__init__(self, parent) self.frame = QtWidgets.QFrame() self.vl = QtWidgets.QVBoxLayout() self.vtkWidget = QVTKRenderWindowInteractor(self.frame) self.vl.addWidget(self.vtkWidget) self.ren = vtk.vtkRenderer() self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) self.iren = self.vtkWidget.GetRenderWindow().GetInteractor() # Create source source = vtk.vtkSphereSource() source.SetCenter(0, 0, 0) source.SetRadius(5.0) # Create a mapper mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(source.GetOutputPort()) # Create an actor actor = vtk.vtkActor() actor.SetMapper(mapper) self.ren.AddActor(actor) self.ren.ResetCamera() self.frame.setLayout(self.vl) self.setCentralWidget(self.frame) self.show() self.iren.Initialize() if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) window = MainWindow() sys.exit(app.exec_()) =============================================== ------------------------------ Message: 14 Date: Tue, 6 Mar 2018 13:29:02 +0100 From: Amine Aboufirass To: paraview at public.kitware.com, VTK Users , VTK Developers , ParaView Developers Subject: [vtkusers] Rendering and saving unstructured grid mesh to image file Message-ID: Content-Type: text/plain; charset="utf-8" Dear all, I have an unstructured grid cell data file which I would like to render and then save to a png image. I made use of available examples to generate a python code which I have attached below. The file I am using this with is also attached. The rendering seems to work but I am not sure why it cannot send the render window content to an image. It keeps giving me the following error: ?!: libpng warning: Image width is zero in IHDR ?!: libpng warning: Image height is zero in IHDR I'm not sure what is causing this, I followed the documentation to the best of my ability but still can't figure it out. Could anyone please help? Thanks Amine -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- from vtk import * # The source file file_name = 'MeshData.vtk'#"MeshData.vtk" # Read the source file. reader = vtkUnstructuredGridReader() reader.SetFileName(file_name) reader.Update() # Needed because of GetScalarRange output = reader.GetOutput() #scalar_range = output.GetScalarRange() # Create the mapper that corresponds the objects of the vtk file # into graphics elements mapper = vtkDataSetMapper() mapper.SetInputData(output) #mapper.SetScalarRange(scalar_range) # Create the Actor actor = vtkActor() actor.GetProperty().SetRepresentationToWireframe() actor.SetMapper(mapper) # Create the Renderer renderer = vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(1, 1, 1) # Set background to white # Create the RendererWindow renderer_window = vtkRenderWindow() renderer_window.AddRenderer(renderer) #Image https://urldefense.proofpoint.com/v2/url?u=https-3A__www.vtk.org_Wiki_VTK_Examples_Python_Screenshot&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=pRLXlyyqx1ouO7MYLTjJGwBgXK6CsaJY-16ikvhTLTs&e= w2if = vtk.vtkWindowToImageFilter() w2if.SetInput(renderer_window) w2if.Update() writer = vtk.vtkPNGWriter() writer.SetFileName("screenshot.png") writer.SetInputData(w2if.GetOutput()) writer.Write() # Create the RendererWindowInteractor and display the vtk_file #interactor = vtkRenderWindowInteractor() #interactor.SetRenderWindow(renderer_window) #interactor.Initialize() #interactor.Start() # -------------- next part -------------- A non-text attachment was scrubbed... Name: MeshData.vtk Type: application/octet-stream Size: 566142 bytes Desc: not available URL: ------------------------------ Subject: Digest Footer _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=68iGeE9EI54qfZjkbpoDtnQcVUn_zOQBlUMEtsdtER0&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=4vWmhE6snubmnh4n3w18s3fAMY84jczAIn076hKXtxo&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=A_26bezXudAI1o583GywYuDetkaSQqFX-AERDqviacI&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=LzDma4aBFHGZKAtPn_bt9-VNjhbyVLR57wCEQUEqyHQ&s=MWPDDDsPKpMgwMJj4wU5oge7N5g3Nur9iaPwBS295Gs&e= ------------------------------ End of vtkusers Digest, Vol 167, Issue 12 ***************************************** -- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. From ben.boeckel at kitware.com Tue Mar 6 12:50:46 2018 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 6 Mar 2018 12:50:46 -0500 Subject: [vtkusers] Saving image with transparent background from Qt In-Reply-To: References: Message-ID: <20180306175046.GA18526@rotor.kitware.com> On Tue, Mar 06, 2018 at 17:45:41 +0100, Ignacio Fern?ndez Galv?n via vtkusers wrote: > Can anyone get it to work? ParaView does it this way: https://gitlab.kitware.com/paraview/paraview/blob/master/ParaViewCore/ServerManager/Rendering/vtkSMViewProxy.cxx#L474 Basically it screenshots twice, once with a black background and again with a white background to figure out what is "visible" and subtracts them. --Ben From chihebz at hotmail.com Tue Mar 6 12:51:00 2018 From: chihebz at hotmail.com (ZACK) Date: Tue, 6 Mar 2018 10:51:00 -0700 (MST) Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: <1519745754257-0.post@n5.nabble.com> References: <1519407298212-0.post@n5.nabble.com> <1519656814432-0.post@n5.nabble.com> <1519745754257-0.post@n5.nabble.com> Message-ID: <1520358660884-0.post@n5.nabble.com> Hi , When I moved to vtk 8.1.0 vtkOpenGLRenderer is rendering only one vtkActor at a time!! If I add only one actor, the rendering is fine but as soon as I add for example rendering the geometry wireframes actor on top of a colored volume it does not work. rendering the wireframe by itself is working!! My code used to work fine. Any clue? Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Tue Mar 6 13:48:43 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 6 Mar 2018 18:48:43 +0000 Subject: [vtkusers] Saving image with transparent background from Qt In-Reply-To: <20180306175046.GA18526@rotor.kitware.com> References: <20180306175046.GA18526@rotor.kitware.com> Message-ID: Thank you, this is very useful. Is this a temporary workaround only or this is going to be the permanent solution? For augmented reality applications, where we need to generate transparent overlays at high refresh rate, this method would be quite expensive. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ben Boeckel Sent: Tuesday, March 6, 2018 12:51 PM To: Ignacio Fern?ndez Galv?n Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Saving image with transparent background from Qt On Tue, Mar 06, 2018 at 17:45:41 +0100, Ignacio Fern?ndez Galv?n via vtkusers wrote: > Can anyone get it to work? ParaView does it this way: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fparaview%2Fparaview%2Fblob%2Fmaster%2FParaViewCore%2FServerManager%2FRendering%2FvtkSMViewProxy.cxx%23L474&data=02%7C01%7Classo%40queensu.ca%7C816570f239464bee4db208d5838accbc%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636559554522056640&sdata=DvMY2JMDZOVSRsTDdtq7eL4lrvOV2G2Ntlu0YW7GG3k%3D&reserved=0 Basically it screenshots twice, once with a black background and again with a white background to figure out what is "visible" and subtracts them. --Ben _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C816570f239464bee4db208d5838accbc%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636559554522056640&sdata=T1Zj8DuUo8d3%2FiNF1a%2BLigsRT1%2FFtC0FIyDM8ZPRFCM%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%7C816570f239464bee4db208d5838accbc%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636559554522056640&sdata=lYsQQAbTPFCkTfHJrzl1gb3w8zv81%2B%2BBrE5oiJij10c%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%7C816570f239464bee4db208d5838accbc%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636559554522056640&sdata=9Bt8An%2BX9nv1ZGL4JFgbFX0X3n0yp2UVMXTbVp4Bu0g%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%7C816570f239464bee4db208d5838accbc%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636559554522056640&sdata=Z%2BJYXyKeyPojZ0HsspLU62rM6Nk%2BGFJfpCeoyTpgHfw%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%7C816570f239464bee4db208d5838accbc%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636559554522056640&sdata=g54vVgm5lC5jX0rNkpJQsZsNbQzH5iyqx%2BQLBXjgGb0%3D&reserved=0 From ben.boeckel at kitware.com Tue Mar 6 14:16:44 2018 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 6 Mar 2018 14:16:44 -0500 Subject: [vtkusers] Saving image with transparent background from Qt In-Reply-To: References: <20180306175046.GA18526@rotor.kitware.com> Message-ID: <20180306191644.GA6731@megas.kitware.com> On Tue, Mar 06, 2018 at 18:48:43 +0000, Andras Lasso wrote: > Thank you, this is very useful. > > Is this a temporary workaround only or this is going to be the > permanent solution? For augmented reality applications, where we need > to generate transparent overlays at high refresh rate, this method > would be quite expensive. When I implemented the functionality, we couldn't think of anything else without tracking things at the shader level or using some "never seen anywhere" color as a baseline which is harder than this technique for ParaView. There may be some way to get OpenGL to do what you want though. There's certainly support for rendering into a buffer with transparency information, but I don't know how to get Qt to do so. Terminal applications (e.g., Konsole) are most likely to have code to do so. --Ben From lasso at queensu.ca Tue Mar 6 14:25:42 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 6 Mar 2018 19:25:42 +0000 Subject: [vtkusers] Saving image with transparent background from Qt In-Reply-To: <20180306191644.GA6731@megas.kitware.com> References: <20180306175046.GA18526@rotor.kitware.com> <20180306191644.GA6731@megas.kitware.com> Message-ID: Thank you, we'll see what we can find. Interestingly, with the old OpenGL backend we could easily get transparent background rendering from Qt application windows. Andras -----Original Message----- From: Ben Boeckel [mailto:ben.boeckel at kitware.com] Sent: Tuesday, March 6, 2018 2:17 PM To: Andras Lasso Cc: Ignacio Fern?ndez Galv?n ; vtkusers at vtk.org Subject: Re: [vtkusers] Saving image with transparent background from Qt On Tue, Mar 06, 2018 at 18:48:43 +0000, Andras Lasso wrote: > Thank you, this is very useful. > > Is this a temporary workaround only or this is going to be the > permanent solution? For augmented reality applications, where we need > to generate transparent overlays at high refresh rate, this method > would be quite expensive. When I implemented the functionality, we couldn't think of anything else without tracking things at the shader level or using some "never seen anywhere" color as a baseline which is harder than this technique for ParaView. There may be some way to get OpenGL to do what you want though. There's certainly support for rendering into a buffer with transparency information, but I don't know how to get Qt to do so. Terminal applications (e.g., Konsole) are most likely to have code to do so. --Ben From bill.lorensen at gmail.com Tue Mar 6 15:16:27 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 6 Mar 2018 12:16:27 -0800 Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: <1520358660884-0.post@n5.nabble.com> References: <1519407298212-0.post@n5.nabble.com> <1519656814432-0.post@n5.nabble.com> <1519745754257-0.post@n5.nabble.com> <1520358660884-0.post@n5.nabble.com> Message-ID: If you can provide a simple compilable example including a CMakeLists.txt and a small dataset we can help a lot faster. Bill On Mar 6, 2018 9:51 AM, "ZACK" wrote: > Hi , > > When I moved to vtk 8.1.0 vtkOpenGLRenderer is rendering only one vtkActor > at a time!! > > If I add only one actor, the rendering is fine but as soon as I add for > example rendering the geometry wireframes actor on top of a colored volume > it does not work. > > rendering the wireframe by itself is working!! > > My code used to work fine. Any clue? > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chihebz at hotmail.com Tue Mar 6 16:50:27 2018 From: chihebz at hotmail.com (ZACK) Date: Tue, 6 Mar 2018 14:50:27 -0700 (MST) Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: References: <1519407298212-0.post@n5.nabble.com> <1519656814432-0.post@n5.nabble.com> <1519745754257-0.post@n5.nabble.com> <1520358660884-0.post@n5.nabble.com> Message-ID: <1520373027364-0.post@n5.nabble.com> Hi Bill, Here's the code that is working in previous 5.0 vtk version vtkSmartPointer extract = vtkSmartPointer::New(); extract->SetInputConnection(m_pUnstructuredGridModel->GetOutputPort()); extract->Modified(); InitializePolyDataMapper(m_pModelPolyDataMapper); m_pModelPolyDataMapper->SetInputConnection(extract->GetOutputPort()); PreparePolyDataMapper(m_pModelPolyDataMapper, pColours, m_CurrentMinValue, m_CurrentMaxValue); m_pCurrentFringeActor->SetMapper(m_pModelPolyDataMapper); m_pCurrentFringeActor->SetDragable(true); m_pCurrentFringeActor->VisibilityOn(); m_prenderer->AddViewProp(m_pCurrentFringeActor);// m_prenderer is vtkopenglrenderer The piece of code above does render fine, but when I try to add the code below for wireframe the render windows becomes empty vtkSmartPointer edges_extractor = vtkSmartPointer::New(); edges_extractor->SetInputConnection(extract->GetOutputPort()); edges_extractor->ColoringOff(); edges_extractor->BoundaryEdgesOn(); edges_extractor->ManifoldEdgesOn(); edges_extractor->NonManifoldEdgesOn(); edges_extractor->FeatureEdgesOn(); edges_extractor->Modified(); vtkSmartPointer edges_mapper = vtkSmartPointer::New(); edges_mapper->SetInputConnection(edges_extractor->GetOutputPort()); edges_mapper->SetResolveCoincidentTopologyPolygonOffsetParameters(1, 1); edges_mapper->SetResolveCoincidentTopologyToPolygonOffset(); edges_mapper->ScalarVisibilityOff(); // coloring edges edges_mapper->Modified(); vtkActor* edges_actor = vtkActor::New(); edges_actor->SetMapper(edges_mapper); edges_actor->GetProperty()->SetDiffuseColor(0, 0, 0); edges_actor->GetProperty()->SetLineWidth(m_iEdgeLineWidth); edges_actor->Modified(); edges_actor->VisibilityOn(); m_prenderer->AddViewProp(edges_actor);// m_prenderer is vtkopenglrenderer Note: If I render the wireframe actor (edges_actor) by itself it does work fine Thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Tue Mar 6 17:12:22 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 6 Mar 2018 14:12:22 -0800 Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: <1520373027364-0.post@n5.nabble.com> References: <1519407298212-0.post@n5.nabble.com> <1519656814432-0.post@n5.nabble.com> <1519745754257-0.post@n5.nabble.com> <1520358660884-0.post@n5.nabble.com> <1520373027364-0.post@n5.nabble.com> Message-ID: I need fully compilable program. On Mar 6, 2018 1:50 PM, "ZACK" wrote: > Hi Bill, > > Here's the code that is working in previous 5.0 vtk version > > vtkSmartPointer extract = > vtkSmartPointer::New(); > extract->SetInputConnection(m_pUnstructuredGridModel-> > GetOutputPort()); > extract->Modified(); > InitializePolyDataMapper(m_pModelPolyDataMapper); > > m_pModelPolyDataMapper->SetInputConnection(extract->GetOutputPort()); > PreparePolyDataMapper(m_pModelPolyDataMapper, pColours, > m_CurrentMinValue, > > m_CurrentMaxValue); > m_pCurrentFringeActor->SetMapper(m_pModelPolyDataMapper); > m_pCurrentFringeActor->SetDragable(true); > m_pCurrentFringeActor->VisibilityOn(); > m_prenderer->AddViewProp(m_pCurrentFringeActor);// m_prenderer is > vtkopenglrenderer > > The piece of code above does render fine, but when I try to add the code > below for wireframe the render windows becomes empty > > vtkSmartPointer edges_extractor = > vtkSmartPointer::New(); > edges_extractor->SetInputConnection(extract->GetOutputPort()); > edges_extractor->ColoringOff(); > edges_extractor->BoundaryEdgesOn(); > edges_extractor->ManifoldEdgesOn(); > edges_extractor->NonManifoldEdgesOn(); > edges_extractor->FeatureEdgesOn(); > edges_extractor->Modified(); > > vtkSmartPointer edges_mapper = > vtkSmartPointer::New(); > > edges_mapper->SetInputConnection(edges_ > extractor->GetOutputPort()); > edges_mapper->SetResolveCoincidentTopologyPolygonOffsetParameters(1, > 1); > edges_mapper->SetResolveCoincidentTopologyToPolygonOffset(); > edges_mapper->ScalarVisibilityOff(); // coloring edges > > edges_mapper->Modified(); > > vtkActor* edges_actor = vtkActor::New(); > edges_actor->SetMapper(edges_mapper); > edges_actor->GetProperty()->SetDiffuseColor(0, 0, 0); > edges_actor->GetProperty()->SetLineWidth(m_iEdgeLineWidth); > edges_actor->Modified(); > edges_actor->VisibilityOn(); > m_prenderer->AddViewProp(edges_actor);// m_prenderer is > vtkopenglrenderer > > Note: If I render the wireframe actor (edges_actor) by itself it does work > fine > > Thanks > > > > > > -- > 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 andrew.amaclean at gmail.com Tue Mar 6 17:20:13 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Wed, 7 Mar 2018 09:20:13 +1100 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter In-Reply-To: References: Message-ID: The fact you changed the resolution and got the same issues means it is not related to something in the vtkParametric classes. BTW I'm getting no crashes in Linux. Regards Andrew On Wed, Mar 7, 2018 at 4:00 AM, Jeffery Lewis wrote: > Thank you Andrew for looking into this. > > Doing the changes does seem to work. Unfortunately, if you change the > resolution of the surface model by adding the following two lines of code... > > source->SetPhiResolution(100); > source->SetThetaResolution(100); > > ...you will see the same type of issues on the filled contour. > > Also, if I substitute the vtkPlaneCutter for the vtkCutter using the > vtkSuperquadricSource, it crashes in a similar way. > > > Message: 11 > Date: Tue, 6 Mar 2018 15:24:06 +1100 > From: Andrew Maclean > To: vtk > Cc: Jeffery Lewis > Subject: Re: [vtkusers] Problem with vtkContourTriangulator and > vtkPlaneCutter (Jeffery Lewis) > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Jeffery > > ?I think this is related to the ParametricFunctions. These functions are > generated by mapping R? -> R? and are then triangulated. > I tried vtkParametricSuperToroid and sometimes the contouring and cutting > worked but in some orientations the triangulation failed. > > ?If you use a vtkSuperquadricSource e.g: > vtkSmartPointer source = > vtkSmartPointer::New(); > source->SetCenter(0, 0, 0); > source->SetPhiRoundness(1.0); > source->SetThetaRoundness(1.0); > source->ToroidalOn(); > > Everything seems to work Ok. > > Andrew > > > > ---------- Forwarded message ---------- > > From: Jeffery Lewis > > To: "vtkusers at vtk.org" > > Cc: > > Bcc: > > Date: Fri, 2 Mar 2018 23:46:09 +0000 > > Subject: Re: [vtkusers] Problem with vtkContourTriangulator and > > vtkPlaneCutter (Jeffery Lewis) > > Seems like the attachments didn't go through. Here is the code. > > > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > // Callbacks for the interactions > > class SliderCallbackN1 : public vtkCommand { > > public: > > static SliderCallbackN1 *New() { > > return new SliderCallbackN1; > > } > > virtual void Execute(vtkObject *caller, unsigned long, void*) { > > vtkSliderWidget *sliderWidget = > > reinterpret_cast(caller); > > double value = static_cast(sliderWidget-> > > GetRepresentation())->GetValue(); > > this->SuperToroid->SetN1(value); > > } > > SliderCallbackN1() :SuperToroid(0) {} > > vtkParametricSuperToroid *SuperToroid; > > }; > > > > class SliderCallbackN2 : public vtkCommand { > > public: > > static SliderCallbackN2 *New() { > > return new SliderCallbackN2; > > } > > virtual void Execute(vtkObject *caller, unsigned long, void*) { > > vtkSliderWidget *sliderWidget = > > reinterpret_cast(caller); > > double value = static_cast(sliderWidget-> > > GetRepresentation())->GetValue(); > > this->SuperToroid->SetN2(value); > > } > > SliderCallbackN2() :SuperToroid(0) {} > > vtkParametricSuperToroid *SuperToroid; > > }; > > > > /**This callback will rotate the surface model about x and y axis > > depending on the > > *current location of the mouse. This will in turn update the cut plane > > that is ment to > > *be normal to the camera and cuts through the middle of the model, > showing > > a red > > *cut contour, and green filled contour. */ > > class InteractionCallback : public vtkCommand { > > public: > > static InteractionCallback* New() { > > return new InteractionCallback; > > } > > > > virtual void Execute(vtkObject*, unsigned long eventID, void* pCallData) > > VTK_OVERRIDE { > > if (eventID == vtkCommand::MouseMoveEvent) { > > // Get the current mouse position. > > int aiCurrentPosition[2]; > > m_pInteractor->GetEventPosition(aiCurrentPosition); > > > > // Get the view port size. > > int iViewPortWidth = m_pInteractor->GetRenderWindow()->GetSize()[0]; > > int iViewPortHeight = m_pInteractor->GetRenderWindow()->GetSize()[1]; > > > > // Compute rotations about x and y axis. > > int iMousePositionAboutCenterX = aiCurrentPosition[0] - > iViewPortWidth/2.0; > > int iMousePositionAboutCenterY = aiCurrentPosition[1] - > > iViewPortHeight/2.0; > > double dRotationAboutX = -iMousePositionAboutCenterY/( > > iViewPortHeight/2.0)*180.0; > > double dRotationAboutY = iMousePositionAboutCenterX/( > > iViewPortWidth/2.0)*180.0; > > > > // Compute transform. > > vtkSmartPointer sptmSurfacModel = > > vtkSmartPointer::New(); > > sptmSurfacModel->RotateX(dRotationAboutX); > > sptmSurfacModel->RotateY(dRotationAboutY); > > > > // Apply the rotation to the surface model actor. > > m_pActorSurface->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > > > // Apply the change to the cut plan normal vector. > > // Translations are not required to be removed from the matrix since > there > > should be none. > > double adInitialVector[3]; > > adInitialVector[0] = 0.0; > > adInitialVector[1] = 0.0; > > adInitialVector[2] = 1.0; > > double adTransformedVector[3]; > > sptmSurfacModel->TransformPoint(adInitialVector, adTransformedVector); > > m_pCutPlane->SetNormal(adTransformedVector[0], adTransformedVector[1], > > adTransformedVector[2]); > > > > // Apply the rotation to the contour actor in the opposite direction to > > make normal to camera. > > sptmSurfacModel->Inverse(); > > m_pActorContour->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > > > // Apply the rotation to the filled actor in the opposite direction to > > make normal to camera. > > m_pActorFilled->SetUserMatrix(sptmSurfacModel->GetMatrix()); > > > > m_pInteractor->Render(); > > } > > } > > > > // Member variables > > // ---------------- > > vtkRenderWindowInteractor* m_pInteractor; > > vtkActor* m_pActorSurface; > > vtkPlane* m_pCutPlane; > > vtkActor* m_pActorContour; > > vtkActor* m_pActorFilled; > > }; > > > > > > int main(int, char *[]) { > > > > vtkSmartPointer surface =vtkSmartPointer< > > vtkParametricSuperToroid>::New(); > > vtkSmartPointer source = vtkSmartPointer< > > vtkParametricFunctionSource>::New(); > > source->SetParametricFunction(surface); > > > > // Create a synthetic cone. > > /*// Un-commented out so can switch surface model source. > > vtkSmartPointer source = vtkSmartPointer > > ::New(); > > source->SetCenter(0, 0, 0); > > source->SetRadius(1); > > source->SetHeight(2); > > source->SetResolution(30); > > source->Update(); > > */ > > > > vtkSmartPointer renderer =vtkSmartPointer: > > :New(); > > vtkSmartPointer mapper =vtkSmartPointer< > > vtkPolyDataMapper>::New(); > > vtkSmartPointer actor = vtkSmartPointer::New(); > > > > mapper->SetInputConnection(source->GetOutputPort()); > > > > vtkSmartPointer backProperty = > vtkSmartPointer:: > > New(); > > backProperty->SetColor(0.8, 0.8, 0.8); > > backProperty->SetOpacity(0.6); > > actor->SetMapper(mapper); > > actor->SetBackfaceProperty(backProperty); > > actor->GetProperty()->SetDiffuseColor(1, 1, 1); > > actor->GetProperty()->SetOpacity(0.6); > > > > vtkSmartPointer renderWindow =vtkSmartPointer< > > vtkRenderWindow>::New(); > > renderWindow->AddRenderer(renderer); > > renderWindow->SetSize(640, 480); > > renderer->AddActor(actor); > > renderer->SetBackground(.2, .3, .4); > > > > vtkSmartPointer interactor =vtkSmartPointer< > > vtkRenderWindowInteractor>::New(); > > interactor->SetRenderWindow(renderWindow); > > > > // Setup a slider widget for each varying parameter BEGIN > > double tubeWidth(.004); > > double sliderLength(.004); > > double titleHeight(.02); > > double labelHeight(.02); > > > > vtkSmartPointer sliderRepN1 = > vtkSmartPointer< > > vtkSliderRepresentation2D>::New(); > > > > sliderRepN1->SetMinimumValue(0.0); > > sliderRepN1->SetMaximumValue(4.0); > > sliderRepN1->SetValue(1.0); > > sliderRepN1->SetTitleText("Z squareness"); > > > > sliderRepN1->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > > dDisplay(); > > sliderRepN1->GetPoint1Coordinate()->SetValue(.1, .1); > > sliderRepN1->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > > dDisplay(); > > sliderRepN1->GetPoint2Coordinate()->SetValue(.9, .1); > > > > sliderRepN1->SetTubeWidth(tubeWidth); > > sliderRepN1->SetSliderLength(sliderLength); > > sliderRepN1->SetTitleHeight(titleHeight); > > sliderRepN1->SetLabelHeight(labelHeight); > > > > vtkSmartPointer sliderWidgetN1 = vtkSmartPointer< > > vtkSliderWidget>::New(); > > sliderWidgetN1->SetInteractor(interactor); > > sliderWidgetN1->SetRepresentation(sliderRepN1); > > sliderWidgetN1->SetAnimationModeToAnimate(); > > sliderWidgetN1->EnabledOn(); > > > > vtkSmartPointer callbackN1 = vtkSmartPointer< > > SliderCallbackN1>::New(); > > callbackN1->SuperToroid = surface; > > > > sliderWidgetN1->AddObserver(vtkCommand::InteractionEvent, callbackN1); > > > > vtkSmartPointer sliderRepN2 = > vtkSmartPointer< > > vtkSliderRepresentation2D>::New(); > > > > sliderRepN2->SetMinimumValue(0.0001); > > sliderRepN2->SetMaximumValue(4.0); > > sliderRepN2->SetValue(1.0); > > sliderRepN2->SetTitleText("XY squareness"); > > > > sliderRepN2->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > > dDisplay(); > > sliderRepN2->GetPoint1Coordinate()->SetValue(.1, .9); > > sliderRepN2->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > > dDisplay(); > > sliderRepN2->GetPoint2Coordinate()->SetValue(.9, .9); > > > > sliderRepN2->SetTubeWidth(tubeWidth); > > sliderRepN2->SetSliderLength(sliderLength); > > sliderRepN2->SetTitleHeight(titleHeight); > > sliderRepN2->SetLabelHeight(labelHeight); > > > > vtkSmartPointer sliderWidgetN2 = vtkSmartPointer< > > vtkSliderWidget>::New(); > > sliderWidgetN2->SetInteractor(interactor); > > sliderWidgetN2->SetRepresentation(sliderRepN2); > > sliderWidgetN2->SetAnimationModeToAnimate(); > > sliderWidgetN2->EnabledOn(); > > > > vtkSmartPointer callbackN2 = vtkSmartPointer< > > SliderCallbackN2>::New(); > > callbackN2->SuperToroid = surface; > > > > sliderWidgetN2->AddObserver(vtkCommand::InteractionEvent, callbackN2); > > > > vtkSmartPointer sliderRepMinimumV = > > vtkSmartPointer::New(); > > > > sliderRepN1->SetMinimumValue(.0001); > > sliderRepMinimumV->SetMaximumValue(.9999*vtkMath::Pi()); > > sliderRepMinimumV->SetValue(.0001); > > sliderRepMinimumV->SetTitleText("V min"); > > > > sliderRepMinimumV->GetPoint1Coordinate()->SetCoordinateSystemToNormalize > > dDisplay(); > > sliderRepMinimumV->GetPoint1Coordinate()->SetValue(.1, .1); > > sliderRepMinimumV->GetPoint2Coordinate()->SetCoordinateSystemToNormalize > > dDisplay(); > > sliderRepMinimumV->GetPoint2Coordinate()->SetValue(.1, .9); > > > > sliderRepMinimumV->SetTubeWidth(tubeWidth); > > sliderRepMinimumV->SetSliderLength(sliderLength); > > sliderRepMinimumV->SetTitleHeight(titleHeight); > > sliderRepMinimumV->SetLabelHeight(labelHeight); > > > > surface->SetN1(1.0); > > surface->SetN2(1.0); > > // Setup a slider widget for each varying parameter END > > > > // Set up the cut plane. > > vtkSmartPointer planeCut = vtkSmartPointer::New(); > > planeCut->SetOrigin(0.0, 0.0, 0.0); > > planeCut->SetNormal(0.0, 0.0, 1.0); > > > > // Set up the cutter which will produce the contour polygons. > > vtkSmartPointer polygonsContour = vtkSmartPointer:: > > New(); > > //vtkSmartPointer polygonsContour = vtkSmartPointer< > vtkPlaneCutter>::New(); > > // testjal > > polygonsContour->SetInputConnection(source->GetOutputPort()); > > //polygonsContour->SetPlane(planeCut); // SetPlane only works with a > > vtkPlaneCutter. // testjal > > polygonsContour->SetCutFunction(planeCut); > > > > // Clean the polygons from the cutter. Note, this is an experiment to see > > if this helps the fills. It does not > > // seem to help. > > vtkSmartPointer polygonsContourClean = > vtkSmartPointer::New(); > > // testjal > > polygonsContourClean->SetInputConnection(polygonsContour-> > GetOutputPort()); > > // testjal > > > > // Set up the filled polygons of the contour. > > vtkSmartPointer polygonsFilled = > vtkSmartPointer< > > vtkContourTriangulator>::New(); > > polygonsFilled->SetInputConnection(polygonsContourClean-> > GetOutputPort()); > > polygonsFilled->TriangulationErrorDisplayOn(); // testjal > > > > // Set up the mapper of the contour. > > vtkSmartPointer mapperContour = vtkSmartPointer< > > vtkDataSetMapper>::New(); > > mapperContour->SetInputConnection(polygonsContourClean-> > GetOutputPort()); > > mapperContour->ScalarVisibilityOff(); > > > > // Set up the mapper of the filled polygons of the contour > > vtkSmartPointer mapperFilled = vtkSmartPointer< > > vtkDataSetMapper>::New(); > > mapperFilled->SetInputConnection(polygonsFilled->GetOutputPort()); > > mapperFilled->ScalarVisibilityOff(); > > > > // Set up the actor of the contour. > > vtkSmartPointer actorContour = vtkSmartPointer:: > New(); > > actorContour->SetMapper(mapperContour); > > actorContour->GetProperty()->SetColor(1,0,0); > > actorContour->GetProperty()->SetLineWidth(5); > > > > // Set up the actor of the filled polygons of the contour. > > vtkSmartPointer actorFilled = vtkSmartPointer:: > New(); > > actorFilled->SetMapper(mapperFilled); > > actorFilled->GetProperty()->SetColor(0, 1, 0); > > > > // Add the contour actor. > > renderer->AddActor(actorContour); > > > > // Add the filld polygons of the contour. > > renderer->AddActor(actorFilled); > > > > // Set up the interaction. > > vtkSmartPointer callback = vtkSmartPointer< > > InteractionCallback>::New(); > > callback->m_pInteractor = interactor.Get(); > > callback->m_pActorSurface = actor.Get(); > > callback->m_pCutPlane = planeCut.Get(); > > callback->m_pActorContour = actorContour.Get(); > > callback->m_pActorFilled = actorFilled.Get(); > > vtkSmartPointer style = vtkSmartPointer< > > vtkInteractorStyle>::New(); > > interactor->SetInteractorStyle(style); > > style->AddObserver(vtkCommand::MouseMoveEvent, callback); > > > > renderer->ResetCamera(-1, 1, -1, 1, -1, 1); > > renderer->GetActiveCamera()->ParallelProjectionOn(); > > renderWindow->Render(); > > > > interactor->Initialize(); > > > > interactor->Start(); > > > > return EXIT_SUCCESS; > > } > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From chihebz at hotmail.com Tue Mar 6 17:26:04 2018 From: chihebz at hotmail.com (ZACK) Date: Tue, 6 Mar 2018 15:26:04 -0700 (MST) Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: References: <1519407298212-0.post@n5.nabble.com> <1519656814432-0.post@n5.nabble.com> <1519745754257-0.post@n5.nabble.com> <1520358660884-0.post@n5.nabble.com> <1520373027364-0.post@n5.nabble.com> Message-ID: <1520375164392-0.post@n5.nabble.com> Hi Bill, Thanks for your help. I do not know how to create the fully compilable program. My project is big and needs to compile a lot of files!! Is it possible to point out what vtk changed in the pipeline from vtk 5 to vtk 8 It use to work fine adding more than one actor to my opengl renderer? does this have to do with opengl2? Thanks again -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Tue Mar 6 19:42:37 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Wed, 7 Mar 2018 09:42:37 +0900 Subject: [vtkusers] Error reading asci data. Possible mismatch of datasize with declaration In-Reply-To: References: Message-ID: Hello Amine, I guess that in reading data there is no way to change single- to double precision from the outside of data file. I think the most simple way for you to handle double precision is by converting value-type from float to double in data file: TENSORS strain float --> TENSORS strain double Best 2018-03-06 16:57 GMT+09:00 Amine Aboufirass : > I could but I would rather find a way for vtk/paraview to handle double > precision. Im getting this output from a 3rd party program and cannot modify > how the data is output :/ > > On 6 Mar 2018 1:56 am, "kenichiro yoshimi" wrote: >> >> Hello Amine, >> >> Could you try to replace very small numbers (like >> 2.778595324927526E-106) with zeros? Overflow or underflow might be >> caused by them in a single-precision floating-point numbers. >> >> Thanks >> >> 2018-03-06 2:10 GMT+09:00 Amine Aboufirass : >> > There are 9 tensor components. It is a true tensor >> > >> > On Mon, Mar 5, 2018 at 5:56 PM, Bill Lorensen >> > wrote: >> >> >> >> Ignore I previous responses. I miscalcuated. >> > >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > 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 mathieu.westphal at kitware.com Wed Mar 7 00:38:46 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Wed, 7 Mar 2018 06:38:46 +0100 Subject: [vtkusers] VTK 8.0.1 with Qt 5.10.1 In-Reply-To: References: Message-ID: FTI there is currently a QVTKOpenGLWidget2 in developement : https://gitlab.kitware.com/vtk/vtk/merge_requests/3745 It may fix some of your issues. It will replace QVTKOpenGLWidget at some point. Best, Mathieu Westphal On Mon, Mar 5, 2018 at 2:03 PM, Michael Jackson wrote: > And also the old QVTKWidget will not work properly with Retina screens on > macOS ( not sure about other operating systems). The problem you describe > sounds like a retina issue we had before all the retina fixes were put into > VTK 8.1 > > > > -- > > Michael Jackson | Owner, President > > BlueQuartz Software > > [e] mike.jackson at bluequartz.net > > [w] www.bluequartz.net > > *From: *vtkusers on behalf of Zoltan Kovacs < > Zoltan.Kovacs at esi-group.com> > *Date: *Monday, March 5, 2018 at 3:52 AM > *To: *"'Andrew J. Buckler (Elucid Bioimaging)'" < > andrew.buckler at elucidbio.com>, "'vtkusers at vtk.org'" > *Subject: *Re: [vtkusers] VTK 8.0.1 with Qt 5.10.1 > > > > Hi, > > > > Why don?t you use QVTKOpenGLWidget instead of QVTKWidget? The latter one > is obsolete and its application is already deprecated. I am not sure if it > is correctly supported by the VTK development now. QVTKOpenGLWidget takes > over the window management and OpenGL context creation, which is a > different solution compared with QVTKWidget. > > > > Regards, > > Zoltan > > > > *From:* vtkusers *On Behalf Of *Andrew J. > Buckler (Elucid Bioimaging) > *Sent:* Donnerstag, 1. M?rz 2018 23:27 > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] VTK 8.0.1 with Qt 5.10.1 > > > > Hello, > > I have a successfully built and running application using VTK (multiple > versions, including 8 and earlier) running with Qt 5.5.1. It uses > QVTKWidget extensively. At this time I am working to upgrade to Qt 5.10.1, > specifically pairing it with VTK 8.0.1. > > > > Having successfully built Qt from source, I built VTK as follows: > > tar -xvzf VTK-8.0.1.tar.gz > mkdir VTK-8.0.1-build > cd VTK-8.0.1-build > cmake -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS:BOOL=OFF > -DQT_QMAKE_EXECUTABLE:PATH=/usr/local/Qt-5.10.1/bin/qmake > -DCMAKE_PREFIX_PATH=/usr/local/Qt-5.10.1/ -DVTK_Group_Qt:BOOL=ON > -DVTK_Group_Qt=1 -DVTK_QT_VERSION=5 ../VTK-8.0.1 > make -j4 > make install > > > > My application compiles and links without error on macOS 10.13, but the > QVTKWidgets have erratic and inconsistent behavior. Specifically: > > 1. Two of them work perfectly well. > > 2. Some of them do not work at all, that is, have either a blank > content or seem to have a double-buffering error where old content from a > portion of the screen where the widget is supposed to be displays > previously displayed content at that location, rather than the correct > content. > > 3. Some of them show the correct content for a second or two and > then revert to blank. > > > > It may be that the VTK build needs to be done with different flags, or > some known incompatibility exists, or anything else. If anyone has run into > this your help would be appreciated, or short of seeing the problem > specifically any suggested debugging strategies would be great. > > > > With thanks, > > Andy > > _______________________________________________ Powered by www.kitware.com > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html Please keep messages on-topic and check the > VTK FAQ at: 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 jellby at yahoo.com Wed Mar 7 03:45:32 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Wed, 7 Mar 2018 09:45:32 +0100 Subject: [vtkusers] Saving image with transparent background from Qt In-Reply-To: <20180306175046.GA18526@rotor.kitware.com> References: <20180306175046.GA18526@rotor.kitware.com> Message-ID: <6da57b84-2b92-aed6-d18b-3655e49374d5@yahoo.com> On 06/03/18 18:50, Ben Boeckel wrote: > ParaView does it this way: > > https://gitlab.kitware.com/paraview/paraview/blob/master/ParaViewCore/ServerManager/Rendering/vtkSMViewProxy.cxx#L474 > > Basically it screenshots twice, once with a black background and again > with a white background to figure out what is "visible" and subtracts > them. Thanks, it's good to know at least I'm not doing something wrong. It seems, though, that ParaView is using a custom class vtkImageTransparencyFilter, so I'd have to reimplement it for plain VTK (note that I'm using python, so it's not just a matter of copying the cxx file). Ignacio From juch at zhaw.ch Wed Mar 7 04:13:38 2018 From: juch at zhaw.ch (normanius) Date: Wed, 7 Mar 2018 02:13:38 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines, now in 3D In-Reply-To: <1520296360148-0.post@n5.nabble.com> References: <1520285054864-0.post@n5.nabble.com> <1520285371710-0.post@n5.nabble.com> <1520285736914-0.post@n5.nabble.com> <1520296188366-0.post@n5.nabble.com> <1520296360148-0.post@n5.nabble.com> Message-ID: <1520414018586-0.post@n5.nabble.com> Hi all, It turned out not to be too difficult to implement an own mesh stitching routine. Thought to share this with you. It creates mesh segment that tightly combines (at least for my cases) the two input surfaces. Happy stitching! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Mar 7 09:34:09 2018 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 7 Mar 2018 09:34:09 -0500 Subject: [vtkusers] Saving image with transparent background from Qt In-Reply-To: <6da57b84-2b92-aed6-d18b-3655e49374d5@yahoo.com> References: <20180306175046.GA18526@rotor.kitware.com> <6da57b84-2b92-aed6-d18b-3655e49374d5@yahoo.com> Message-ID: <20180307143409.GB17689@megas.kitware.com> On Wed, Mar 07, 2018 at 09:45:32 +0100, Ignacio Fern?ndez Galv?n via vtkusers wrote: > Thanks, it's good to know at least I'm not doing something wrong. It > seems, though, that ParaView is using a custom class > vtkImageTransparencyFilter, so I'd have to reimplement it for plain VTK > (note that I'm using python, so it's not just a matter of copying the > cxx file). Looking at the history, it seems that the vtkImageTransparencyFilter was factored out of my original code in this commit: https://gitlab.kitware.com/paraview/paraview/commit/1eb879b95b004d3519cb24b95b95478c36d3afb4 so I imagine the fact that it's in ParaView is just for convenience. I don't see any issue with moving the implementation to VTK. I'm not sure which module is best for it though. --Ben From vtk12af6bc42 at kant.sophonet.de Wed Mar 7 12:33:19 2018 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Wed, 07 Mar 2018 18:33:19 +0100 Subject: [vtkusers] Offscreen rendering speed VTK 8.1.0 + Mesa 13.3.3 on headless VM Message-ID: Hi list, for a few weeks, I am experimenting with Offscreen rendering using VTK 8.1.0 and Mesa 13.3.3 on a headless VM (Intel Pentium Broadwell, 2.4 GHz, one core available), and I am wondering what rendering speed would be possible for a 1700x900 renderwindow, when displaying a single vtkImageSlice covering more or less the complete viewport. On my system, rendering of a single image using the WindowToImage filter (RGB, transparency turned off) needs about 300~400 ms, which is a little slow in my opinion. Is there any way to increase speed or is this a realistic value? I have compiled Mesa 13.3.3 myself according to the settings in https://www.paraview.org/Wiki/ParaView/ParaView_And_Mesa_3D. What would be the best options for increasing performance (besides making the renderwindow size smaller)? Exposing more cores to the VM? Some environment variables? (I have played with LP_NUM_THREADS but this did not have an effect). Or according to other experiences, there might be something misconfigured on our system? Thanks, Sophonet From david.gobbi at gmail.com Wed Mar 7 14:46:51 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 7 Mar 2018 12:46:51 -0700 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter In-Reply-To: References: Message-ID: Hi Jeffery, I can get your example to work by providing a tolerance to vtkCleanPolyData: polygonsContourClean->SetTolerance(1e-6); A better fix is to clean the toroid itself: vtkSmartPointer clean = vtkSmartPointer::New(); clean->SetInputConnection(source->GetOutputPort()); clean->SetTolerance(1e-4); The parametric surface has duplicate points where it joins back on itself. If vtkCleanPolyData isn't given a tolerance, it uses its default tolerance of zero, and isn't able to resolve the duplication. - David On Fri, Mar 2, 2018 at 3:57 PM, Jeffery Lewis wrote: > I have a prototype that generates a super toroid surface model. A cut > plane is defined to be orthogonal to the camera line of sight, and cuts > through the middle of the surface model. The cut contour (generated by > vtkCutter), and filled cut contour (generated by vtkContourTriangulator) is > rendered with the surface model. The surface model is shown transparent as > it is only a reference. The rendering of interest is the cut contour (shown > as red contour) and filled cut contour (shown as green). Moving the mouse > rotates the surface model. The cut plane stays orthogonal to the camera > while the surface model rotates. By rotating the surface model, you can see > the cut contour and filled cut contour get updated interactively as it > slices through the middle of the surface model. > > > > Unfortunately, the filled cut contour does not look right and I can?t seem > to figure it out. If I change the surface model to something simpler like a > cone, then everything looks fine. > > > > Also of note is that if I switch out the vtkCutter with a vtkPlaneCutter, > the program crashes. I would like to use the vtkPlaneCutter since from its > documentation seems to indicate that it will get better performance. The > vtkPlaneCutter crashes using either the super toroid or cone. > > > > Attached is the source code. The stuff between ?// Setup a slider widget > for each varying parameter BEGIN? and ?// Setup a slider widget for each > varying parameter END? can be ignored as this only involves setting up > sliders to manipulate the super toroid, which comes from the > ParametricSuperToroidDemo example. The setup of the pipleline for the cut > contour and filled cut contour is near the bottom. > > > > Also attached is a sample screen shot of the incorrect filled cut contour. > > > > > > > > > > > > > > > > > > > [image: > /private/var/folders/fl/x96rg8l57plbh3g8pgkqcchr0000gp/T/com.microsoft.Outlook/Outlook > Temp/EMAIL SIGNATURE GRFX/Asset 6.png] > > > > > > *Jeffery Lewis* > > Staff Software Engineer, Treatment Planning Systems > > > > 1310 Chesapeake Terrace > > Sunnyvale, CA 94089 > > USA > > Tel: 1.408.789.4367 <(408)%20789-4367> > > *jlewis at accuray.com * > > > > > > > -- WARNING - CONFIDENTIAL INFORMATION: The information contained in the > e-mail may contain confidential and privileged information and is intended > solely for the use of the intended recipient(s). Access for any review, > re-transmission, dissemination or other use of, or taking of any action in > regard and reliance upon this e-mail by persons or entities other than the > intended recipient(s) is unauthorized and prohibited. If you are not the > intended recipient, please contact the sender by reply e-mail and destroy > all copies of the original message and any attachments. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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: image014.png Type: image/png Size: 1447 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image017.png Type: image/png Size: 1344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image015.png Type: image/png Size: 1625 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image018.jpg Type: image/jpeg Size: 831 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image016.png Type: image/png Size: 1612 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image013.png Type: image/png Size: 12364 bytes Desc: not available URL: From g.bogle at auckland.ac.nz Wed Mar 7 23:04:43 2018 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Thu, 8 Mar 2018 04:04:43 +0000 Subject: [vtkusers] Compile error building VTK 4.8.6 Message-ID: <1520481883425.84526@auckland.ac.nz> I am trying to build VTK for x64, something I've done before with MSVC 2010, but not with MSVC 2012. I get this error compiling WTFString.cpp: cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 -wd480 0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore -DBUIL DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\Q tCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" -I"as sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" -I"interpre ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" -I"d:\Q t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" -I"wtf\unicode" - I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" -I"..\..\Source " -I"..\..\include" -I"\include\QtWebKit" -I"\include" -I"..\..\..\..\..\include \ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\win32-msvc2012" -Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\Local\Temp\WTFString.obj.29 08.4805.jom WTFString.cpp .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const std::pair< _Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const std::pair<_Ty1,_Ty2> &' ... (there are many more lines, but probably not adding more useful info). The error seems to be from Hashset.h, about here: template inline pair::iterator, bool> HashSet::add(const ValueType& value) { return m_impl.add(value); } I'm afraid this is way beyond my level of C++ expertise - I don't use templates. Is this error the result of a change between MSVC 2010 and 2012? How can I avoid this error? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinander at gmail.com Wed Mar 7 23:44:23 2018 From: chinander at gmail.com (Mike Chinander) Date: Wed, 7 Mar 2018 22:44:23 -0600 Subject: [vtkusers] Compile error building VTK 4.8.6 In-Reply-To: <1520481883425.84526@auckland.ac.nz> References: <1520481883425.84526@auckland.ac.nz> Message-ID: Are you compiling VTK here or Qt 4.8.6? See https://bugreports.qt.io/browse/QTBUG-28335 for a possible fix. If it's an option for you (i.e., not trying build legacy code), I'd recommend using newer versions of VTK and Qt (and compiler). Good luck, --Mike On Wed, Mar 7, 2018 at 10:04 PM, Gib Bogle wrote: > I am trying to build VTK for x64, something I've done before with MSVC > 2010, but not with MSVC 2012. I get this error compiling WTFString.cpp: > > > cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 > -wd480 > 0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG > -DBUILDING_QT__=1 > -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore > -DBUIL > DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW > -DQT_HAVE_SSE > -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT > -I"..\..\..\..\..\include\Q > tCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" > -I"as > sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" > -I"interpre > ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" > -I"d:\Q > t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" > -I"wtf\unicode" - > I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" > -I"..\..\Source > " -I"..\..\include" -I"\include\QtWebKit" -I"\include" > -I"..\..\..\..\..\include > \ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\ > win32-msvc2012" > -Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\ > Local\Temp\WTFString.obj.29 > 08.4805.jom > WTFString.cpp > .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const > std::pair< > _Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to > 'const std::pair<_Ty1,_Ty2> &' > > ... > > > (there are many more lines, but probably not adding more useful info). > > > The error seems to be from Hashset.h, about here: > > > template > inline pair::iterator, bool> HashSet V>::add(const ValueType& value) > { > return m_impl.add(value); > } > > > I'm afraid this is way beyond my level of C++ expertise - I don't use > templates. Is this error the result of a change between MSVC 2010 and > 2012? How can I avoid this error? > > > Thanks > > Gib > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 g.bogle at auckland.ac.nz Wed Mar 7 23:57:25 2018 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Thu, 8 Mar 2018 04:57:25 +0000 Subject: [vtkusers] [FORGED] Re: Compile error building VTK 4.8.6 In-Reply-To: References: <1520481883425.84526@auckland.ac.nz>, Message-ID: <1520485037221.48838@auckland.ac.nz> Sorry, my slip, of course I meant Qt 4.8.6. I think that fix should work for me - this is old code that I don't want to mess with. Thanks a lot! Gib ________________________________ From: vtkusers on behalf of Mike Chinander Sent: Thursday, 8 March 2018 5:44 p.m. To: vtkusers at vtk.org Subject: [FORGED] Re: [vtkusers] Compile error building VTK 4.8.6 Are you compiling VTK here or Qt 4.8.6? See https://bugreports.qt.io/browse/QTBUG-28335 for a possible fix. If it's an option for you (i.e., not trying build legacy code), I'd recommend using newer versions of VTK and Qt (and compiler). Good luck, --Mike On Wed, Mar 7, 2018 at 10:04 PM, Gib Bogle > wrote: I am trying to build VTK for x64, something I've done before with MSVC 2010, but not with MSVC 2012. I get this error compiling WTFString.cpp: cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 -wd480 0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore -DBUIL DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\Q tCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" -I"as sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" -I"interpre ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" -I"d:\Q t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" -I"wtf\unicode" - I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" -I"..\..\Source " -I"..\..\include" -I"\include\QtWebKit" -I"\include" -I"..\..\..\..\..\include \ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\win32-msvc2012" -Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\Local\Temp\WTFString.obj.29 08.4805.jom WTFString.cpp .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const std::pair< _Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const std::pair<_Ty1,_Ty2> &' ... (there are many more lines, but probably not adding more useful info). The error seems to be from Hashset.h, about here: template inline pair::iterator, bool> HashSet::add(const ValueType& value) { return m_impl.add(value); } I'm afraid this is way beyond my level of C++ expertise - I don't use templates. Is this error the result of a change between MSVC 2010 and 2012? How can I avoid this error? Thanks Gib _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 winash12 at gmail.com Thu Mar 8 06:45:51 2018 From: winash12 at gmail.com (ashwin .D) Date: Thu, 8 Mar 2018 17:15:51 +0530 Subject: [vtkusers] Compiling VTK Python from source Message-ID: Hello, I have VTK 7.0.0 tar file and I am trying to compile from source the python wrapper for VTK. I have ccmake installed on my Ubuntu 16.04 box but no matter what I try(the installation itself proceeds with no errors) but I cannot find out where the python wrapper for SDK is present. When I type python3.5 import vtk I get ImportError : no module named 'vtk` Here is how I built VTK for python using ccmake ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. But this does not do the job. Any suggestions will be appreciated. I intend to use VTK with Mayavi eventually. Best regards, Ashwin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Thu Mar 8 09:04:33 2018 From: aron.helser at kitware.com (Aron Helser) Date: Thu, 8 Mar 2018 09:04:33 -0500 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: Do you have a 'vtkpython.exe' in your build/bin directory? That means that you have successfully compiled the wrappers. If you run 'vtkpython' and then 'import vtk', it should work. vtkpython is basically a thin wrapper that sets up paths so that 'iimport vtk' works. This wiki: https://www.paraview.org/Wiki/ParaView/Python_Scripting has some info on how to set environment vars so you can run python and import vtk or paraview without using vtkpython/pvpython. HTH, Aron On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: > Hello, > I have VTK 7.0.0 tar file and I am trying to compile from > source the python wrapper for VTK. I have ccmake installed on my Ubuntu > 16.04 box but no matter what I try(the installation itself proceeds with no > errors) but I cannot find out where the python wrapper for SDK is present. > When I type > > python3.5 import vtk > > I get ImportError : no module named 'vtk` > > Here is how I built VTK for python using ccmake > > > ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 > -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON > -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 > -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ > ..VTK-7.0.0 > > Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. > But this does not do the job. > > Any suggestions will be appreciated. I intend to use VTK with Mayavi > eventually. > > Best regards, > Ashwin. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 winash12 at gmail.com Thu Mar 8 09:23:27 2018 From: winash12 at gmail.com (ashwin .D) Date: Thu, 8 Mar 2018 19:53:27 +0530 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: Thanks for your response. I was not sure really and I did a make clean again and this time ran cmake as opposed to ccmake. and I am getting a few undefined references and they are related to Python. I have enclosed the log file. Any suggestions will be appreciated. On Thu, Mar 8, 2018 at 7:34 PM, Aron Helser wrote: > Do you have a 'vtkpython.exe' in your build/bin directory? That means that > you have successfully compiled the wrappers. If you run 'vtkpython' and > then 'import vtk', it should work. > vtkpython is basically a thin wrapper that sets up paths so that 'iimport > vtk' works. > > This wiki: https://www.paraview.org/Wiki/ParaView/Python_Scripting has > some info on how to set environment vars so you can run python and import > vtk or paraview without using vtkpython/pvpython. > > HTH, > Aron > > On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: > >> Hello, >> I have VTK 7.0.0 tar file and I am trying to compile from >> source the python wrapper for VTK. I have ccmake installed on my Ubuntu >> 16.04 box but no matter what I try(the installation itself proceeds with no >> errors) but I cannot find out where the python wrapper for SDK is present. >> When I type >> >> python3.5 import vtk >> >> I get ImportError : no module named 'vtk` >> >> Here is how I built VTK for python using ccmake >> >> >> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >> -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >> >> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. >> But this does not do the job. >> >> Any suggestions will be appreciated. I intend to use VTK with Mayavi >> eventually. >> >> Best regards, >> Ashwin. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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: logs Type: application/octet-stream Size: 186117 bytes Desc: not available URL: From dave.demarle at kitware.com Thu Mar 8 09:28:46 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 8 Mar 2018 09:28:46 -0500 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: Did you run make? cmake just builds makefiles/visual studio solution files or whatever. You still have to compile those to make the library/binraries/bindings and whatnot. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: > Hello, > I have VTK 7.0.0 tar file and I am trying to compile from > source the python wrapper for VTK. I have ccmake installed on my Ubuntu > 16.04 box but no matter what I try(the installation itself proceeds with no > errors) but I cannot find out where the python wrapper for SDK is present. > When I type > > python3.5 import vtk > > I get ImportError : no module named 'vtk` > > Here is how I built VTK for python using ccmake > > > ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 > -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON > -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 > -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ > ..VTK-7.0.0 > > Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. > But this does not do the job. > > Any suggestions will be appreciated. I intend to use VTK with Mayavi > eventually. > > Best regards, > Ashwin. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 winash12 at gmail.com Thu Mar 8 09:32:27 2018 From: winash12 at gmail.com (ashwin .D) Date: Thu, 8 Mar 2018 20:02:27 +0530 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: The log file I sent you just now is the result of running make -j8. On Thu, Mar 8, 2018 at 7:58 PM, David E DeMarle wrote: > Did you run make? > cmake just builds makefiles/visual studio solution files or whatever. You > still have to compile those to make the library/binraries/bindings and > whatnot. > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: > >> Hello, >> I have VTK 7.0.0 tar file and I am trying to compile from >> source the python wrapper for VTK. I have ccmake installed on my Ubuntu >> 16.04 box but no matter what I try(the installation itself proceeds with no >> errors) but I cannot find out where the python wrapper for SDK is present. >> When I type >> >> python3.5 import vtk >> >> I get ImportError : no module named 'vtk` >> >> Here is how I built VTK for python using ccmake >> >> >> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >> -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >> >> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. >> But this does not do the job. >> >> Any suggestions will be appreciated. I intend to use VTK with Mayavi >> eventually. >> >> Best regards, >> Ashwin. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 mail at biederbeck.de Thu Mar 8 09:45:12 2018 From: mail at biederbeck.de (Andreas Biederbeck) Date: Thu, 8 Mar 2018 15:45:12 +0100 Subject: [vtkusers] vtkusers Digest, Vol 167, Issue 16 In-Reply-To: References: Message-ID: unsubscribe > Am 08.03.2018 um 15:23 schrieb vtkusers-request at vtk.org: > > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://vtk.org/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > Today's Topics: > > 1. Offscreen rendering speed VTK 8.1.0 + Mesa 13.3.3 on headless > VM (Sophonet) > 2. Re: Problem with vtkContourTriangulator and vtkPlaneCutter > (David Gobbi) > 3. Compile error building VTK 4.8.6 (Gib Bogle) > 4. Re: Compile error building VTK 4.8.6 (Mike Chinander) > 5. Re: [FORGED] Re: Compile error building VTK 4.8.6 (Gib Bogle) > 6. Compiling VTK Python from source (ashwin .D) > 7. Re: Compiling VTK Python from source (Aron Helser) > 8. Re: Compiling VTK Python from source (ashwin .D) > > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: 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 jlewis at accuray.com Thu Mar 8 11:42:25 2018 From: jlewis at accuray.com (Jeffery Lewis) Date: Thu, 8 Mar 2018 16:42:25 +0000 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter Message-ID: Thank you David for investigating this. Adding the call to SetTolerance() on the vtkCleanPolyData does help. If you play around with the XY squareness slider (particularly to the left), you will still see the problem (even with tolerance set lower to 1e-4). Does vtkContourTriangulator require no z components in the polygons? I am cutting the surface model in 3D space. The contour generated by vtkCutter is essentially confined to a plane, but the contour polygons have z components in the coordinates (e.g. they are 3D points). Also, if I replace vtkCutter with vtkPlaneCutter, the program still crashes at start up. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of vtkusers-request at vtk.org Sent: Thursday, March 08, 2018 6:24 AM To: vtkusers at vtk.org Subject: vtkusers Digest, Vol 167, Issue 16 Send vtkusers mailing list submissions to vtkusers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=zFhJObBuwd9Ay8rC31d0k4eZ_3uu572S2k8DNANjfEE&e= or, via email, send a message with subject or body 'help' to vtkusers-request at vtk.org You can reach the person managing the list at vtkusers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..." Today's Topics: 1. Offscreen rendering speed VTK 8.1.0 + Mesa 13.3.3 on headless VM (Sophonet) 2. Re: Problem with vtkContourTriangulator and vtkPlaneCutter (David Gobbi) 3. Compile error building VTK 4.8.6 (Gib Bogle) 4. Re: Compile error building VTK 4.8.6 (Mike Chinander) 5. Re: [FORGED] Re: Compile error building VTK 4.8.6 (Gib Bogle) 6. Compiling VTK Python from source (ashwin .D) 7. Re: Compiling VTK Python from source (Aron Helser) 8. Re: Compiling VTK Python from source (ashwin .D) ---------------------------------------------------------------------- Message: 1 Date: Wed, 07 Mar 2018 18:33:19 +0100 From: Sophonet To: vtkusers at vtk.org Subject: [vtkusers] Offscreen rendering speed VTK 8.1.0 + Mesa 13.3.3 on headless VM Message-ID: Content-Type: text/plain; charset=US-ASCII; format=flowed Hi list, for a few weeks, I am experimenting with Offscreen rendering using VTK 8.1.0 and Mesa 13.3.3 on a headless VM (Intel Pentium Broadwell, 2.4 GHz, one core available), and I am wondering what rendering speed would be possible for a 1700x900 renderwindow, when displaying a single vtkImageSlice covering more or less the complete viewport. On my system, rendering of a single image using the WindowToImage filter (RGB, transparency turned off) needs about 300~400 ms, which is a little slow in my opinion. Is there any way to increase speed or is this a realistic value? I have compiled Mesa 13.3.3 myself according to the settings in https://urldefense.proofpoint.com/v2/url?u=https-3A__www.paraview.org_Wiki_ParaView_ParaView-5FAnd-5FMesa-5F3D&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=Rl9eGQx8QVlyvHPwwitZCtZMKCFGuhnyhX6jukc_WaY&e=. What would be the best options for increasing performance (besides making the renderwindow size smaller)? Exposing more cores to the VM? Some environment variables? (I have played with LP_NUM_THREADS but this did not have an effect). Or according to other experiences, there might be something misconfigured on our system? Thanks, Sophonet ------------------------------ Message: 2 Date: Wed, 7 Mar 2018 12:46:51 -0700 From: David Gobbi To: Jeffery Lewis Cc: "vtkusers at vtk.org" Subject: Re: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter Message-ID: Content-Type: text/plain; charset="utf-8" Hi Jeffery, I can get your example to work by providing a tolerance to vtkCleanPolyData: polygonsContourClean->SetTolerance(1e-6); A better fix is to clean the toroid itself: vtkSmartPointer clean = vtkSmartPointer::New(); clean->SetInputConnection(source->GetOutputPort()); clean->SetTolerance(1e-4); The parametric surface has duplicate points where it joins back on itself. If vtkCleanPolyData isn't given a tolerance, it uses its default tolerance of zero, and isn't able to resolve the duplication. - David On Fri, Mar 2, 2018 at 3:57 PM, Jeffery Lewis wrote: > I have a prototype that generates a super toroid surface model. A cut > plane is defined to be orthogonal to the camera line of sight, and > cuts through the middle of the surface model. The cut contour > (generated by vtkCutter), and filled cut contour (generated by > vtkContourTriangulator) is rendered with the surface model. The > surface model is shown transparent as it is only a reference. The > rendering of interest is the cut contour (shown as red contour) and > filled cut contour (shown as green). Moving the mouse rotates the > surface model. The cut plane stays orthogonal to the camera while the > surface model rotates. By rotating the surface model, you can see the > cut contour and filled cut contour get updated interactively as it slices through the middle of the surface model. > > > > Unfortunately, the filled cut contour does not look right and I can?t > seem to figure it out. If I change the surface model to something > simpler like a cone, then everything looks fine. > > > > Also of note is that if I switch out the vtkCutter with a > vtkPlaneCutter, the program crashes. I would like to use the > vtkPlaneCutter since from its documentation seems to indicate that it > will get better performance. The vtkPlaneCutter crashes using either the super toroid or cone. > > > > Attached is the source code. The stuff between ?// Setup a slider > widget for each varying parameter BEGIN? and ?// Setup a slider widget > for each varying parameter END? can be ignored as this only involves > setting up sliders to manipulate the super toroid, which comes from > the ParametricSuperToroidDemo example. The setup of the pipleline for > the cut contour and filled cut contour is near the bottom. > > > > Also attached is a sample screen shot of the incorrect filled cut contour. > > > > > > > > > > > _AccurayIncorporated&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-u > hgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4It > iSwiGI&s=yMkr0MZGkayVcKMhcJ4m8iQil0qB3ns4Rq7MGBvs1S8&e=> > ccuray&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItP > HXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=VW2EI > gNfdn00YTm5KxHKjkryjizVE_T6El1Ibeo1x4k&e=> > _company_accuray&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi > AohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwi > GI&s=Kqc0mBfqWkojkwPITxVZyZkSQ1M2rmvHZFwNPTECZT8&e=> > user_AccurayIncorporated&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHH > QX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6 > h4ItiSwiGI&s=lXcqUDOHjuwUL3cPEPAKmglaMnooW8SxtpaZrXSoSqc&e=> > > > > > > [image: > /private/var/folders/fl/x96rg8l57plbh3g8pgkqcchr0000gp/T/com.microsoft > .Outlook/Outlook Temp/EMAIL SIGNATURE GRFX/Asset 6.png] > > > > > > *Jeffery Lewis* > > Staff Software Engineer, Treatment Planning Systems > > > > 1310 Chesapeake Terrace > > Sunnyvale, CA 94089 > > USA > > Tel: 1.408.789.4367 <(408)%20789-4367> > > *jlewis at accuray.com * > > > > > > > -- WARNING - CONFIDENTIAL INFORMATION: The information contained in > the e-mail may contain confidential and privileged information and is > intended solely for the use of the intended recipient(s). Access for > any review, re-transmission, dissemination or other use of, or taking > of any action in regard and reliance upon this e-mail by persons or > entities other than the intended recipient(s) is unauthorized and > prohibited. If you are not the intended recipient, please contact the > sender by reply e-mail and destroy all copies of the original message and any attachments. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_&d > =DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rts > YkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=bQvkvuKPFxbvw > NgE8sR4xSZ71gPxwL3wObqU57506fo&e= > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_V > TK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTI > tPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=XUS > kJjNrveQDCgxUOcNp643Fzo0eHf51K3kLhEfrJmg&e= > > Search the list archives at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_searc > h_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgM > iAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSw > iGI&s=s3MYXuM7o87yR90LCp6Sg0strumq7KKX4hbIsp7fQRg&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_l > istinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi > AohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwi > GI&s=zFhJObBuwd9Ay8rC31d0k4eZ_3uu572S2k8DNANjfEE&e= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image014.png Type: image/png Size: 1447 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image017.png Type: image/png Size: 1344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image015.png Type: image/png Size: 1625 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image018.jpg Type: image/jpeg Size: 831 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image016.png Type: image/png Size: 1612 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image013.png Type: image/png Size: 12364 bytes Desc: not available URL: ------------------------------ Message: 3 Date: Thu, 8 Mar 2018 04:04:43 +0000 From: Gib Bogle To: "vtkusers at vtk.org" Subject: [vtkusers] Compile error building VTK 4.8.6 Message-ID: <1520481883425.84526 at auckland.ac.nz> Content-Type: text/plain; charset="iso-8859-1" I am trying to build VTK for x64, something I've done before with MSVC 2010, but not with MSVC 2012. I get this error compiling WTFString.cpp: cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 -wd480 0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore -DBUIL DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\Q tCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" -I"as sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" -I"interpre ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" -I"d:\Q t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" -I"wtf\unicode" - I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" -I"..\..\Source " -I"..\..\include" -I"\include\QtWebKit" -I"\include" -I"..\..\..\..\..\include \ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\win32-msvc2012" -Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\Local\Temp\WTFString.obj.29 08.4805.jom WTFString.cpp .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const std::pair< _Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const std::pair<_Ty1,_Ty2> &' ... (there are many more lines, but probably not adding more useful info). The error seems to be from Hashset.h, about here: template inline pair::iterator, bool> HashSet::add(const ValueType& value) { return m_impl.add(value); } I'm afraid this is way beyond my level of C++ expertise - I don't use templates. Is this error the result of a change between MSVC 2010 and 2012? How can I avoid this error? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 4 Date: Wed, 7 Mar 2018 22:44:23 -0600 From: Mike Chinander To: "vtkusers at vtk.org" Subject: Re: [vtkusers] Compile error building VTK 4.8.6 Message-ID: Content-Type: text/plain; charset="utf-8" Are you compiling VTK here or Qt 4.8.6? See https://urldefense.proofpoint.com/v2/url?u=https-3A__bugreports.qt.io_browse_QTBUG-2D28335&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=wec0p3Mqb8h_QsTfYJ6ojsBTItQbnKyDztXsUoTMC7U&e= for a possible fix. If it's an option for you (i.e., not trying build legacy code), I'd recommend using newer versions of VTK and Qt (and compiler). Good luck, --Mike On Wed, Mar 7, 2018 at 10:04 PM, Gib Bogle wrote: > I am trying to build VTK for x64, something I've done before with MSVC > 2010, but not with MSVC 2012. I get this error compiling WTFString.cpp: > > > cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 > -wd4503 > -wd480 > 0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG > -DBUILDING_QT__=1 > -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 > -DBUILDING_JavaScriptCore -DBUIL DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB > -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT > -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\Q tCore" > -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" > -I"as > sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" > -I"interpre > ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" > -I"d:\Q > t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" > -I"wtf\unicode" - > I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" > -I"..\..\Source > " -I"..\..\include" -I"\include\QtWebKit" -I"\include" > -I"..\..\..\..\..\include > \ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\ > win32-msvc2012" > -Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\ > Local\Temp\WTFString.obj.29 > 08.4805.jom > WTFString.cpp > .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const > std::pair< _Ty1,_Ty2> &)' : cannot convert parameter 1 from > 'std::pair<_Ty1,_Ty2>' to 'const std::pair<_Ty1,_Ty2> &' > > ... > > > (there are many more lines, but probably not adding more useful info). > > > The error seems to be from Hashset.h, about here: > > > template > inline pair::iterator, bool> HashSet U, > V>::add(const ValueType& value) > { > return m_impl.add(value); > } > > > I'm afraid this is way beyond my level of C++ expertise - I don't use > templates. Is this error the result of a change between MSVC 2010 and > 2012? How can I avoid this error? > > > Thanks > > Gib > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_&d > =DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rts > YkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=bQvkvuKPFxbvw > NgE8sR4xSZ71gPxwL3wObqU57506fo&e= > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_V > TK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTI > tPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=XUS > kJjNrveQDCgxUOcNp643Fzo0eHf51K3kLhEfrJmg&e= > > Search the list archives at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_searc > h_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgM > iAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSw > iGI&s=s3MYXuM7o87yR90LCp6Sg0strumq7KKX4hbIsp7fQRg&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_l > istinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi > AohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwi > GI&s=zFhJObBuwd9Ay8rC31d0k4eZ_3uu572S2k8DNANjfEE&e= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 5 Date: Thu, 8 Mar 2018 04:57:25 +0000 From: Gib Bogle To: Mike Chinander , "vtkusers at vtk.org" Subject: Re: [vtkusers] [FORGED] Re: Compile error building VTK 4.8.6 Message-ID: <1520485037221.48838 at auckland.ac.nz> Content-Type: text/plain; charset="iso-8859-1" Sorry, my slip, of course I meant Qt 4.8.6. I think that fix should work for me - this is old code that I don't want to mess with. Thanks a lot! Gib ________________________________ From: vtkusers on behalf of Mike Chinander Sent: Thursday, 8 March 2018 5:44 p.m. To: vtkusers at vtk.org Subject: [FORGED] Re: [vtkusers] Compile error building VTK 4.8.6 Are you compiling VTK here or Qt 4.8.6? See https://urldefense.proofpoint.com/v2/url?u=https-3A__bugreports.qt.io_browse_QTBUG-2D28335&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=wec0p3Mqb8h_QsTfYJ6ojsBTItQbnKyDztXsUoTMC7U&e= for a possible fix. If it's an option for you (i.e., not trying build legacy code), I'd recommend using newer versions of VTK and Qt (and compiler). Good luck, --Mike On Wed, Mar 7, 2018 at 10:04 PM, Gib Bogle > wrote: I am trying to build VTK for x64, something I've done before with MSVC 2010, but not with MSVC 2012. I get this error compiling WTFString.cpp: cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 -wd480 0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore -DBUIL DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\Q tCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" -I"as sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" -I"interpre ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" -I"d:\Q t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" -I"wtf\unicode" - I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" -I"..\..\Source " -I"..\..\include" -I"\include\QtWebKit" -I"\include" -I"..\..\..\..\..\include \ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\win32-msvc2012" -Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\Local\Temp\WTFString.obj.29 08.4805.jom WTFString.cpp .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const std::pair< _Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const std::pair<_Ty1,_Ty2> &' ... (there are many more lines, but probably not adding more useful info). The error seems to be from Hashset.h, about here: template inline pair::iterator, bool> HashSet::add(const ValueType& value) { return m_impl.add(value); } I'm afraid this is way beyond my level of C++ expertise - I don't use templates. Is this error the result of a change between MSVC 2010 and 2012? How can I avoid this error? Thanks Gib _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=QfIydYrDX9ALiUVj80h6C-G0h4SPJKUUTTU_PVO6Xj4&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=XUSkJjNrveQDCgxUOcNp643Fzo0eHf51K3kLhEfrJmg&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=s3MYXuM7o87yR90LCp6Sg0strumq7KKX4hbIsp7fQRg&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=zFhJObBuwd9Ay8rC31d0k4eZ_3uu572S2k8DNANjfEE&e= -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 6 Date: Thu, 8 Mar 2018 17:15:51 +0530 From: "ashwin .D" To: vtkusers at vtk.org Subject: [vtkusers] Compiling VTK Python from source Message-ID: Content-Type: text/plain; charset="utf-8" Hello, I have VTK 7.0.0 tar file and I am trying to compile from source the python wrapper for VTK. I have ccmake installed on my Ubuntu 16.04 box but no matter what I try(the installation itself proceeds with no errors) but I cannot find out where the python wrapper for SDK is present. When I type python3.5 import vtk I get ImportError : no module named 'vtk` Here is how I built VTK for python using ccmake ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. But this does not do the job. Any suggestions will be appreciated. I intend to use VTK with Mayavi eventually. Best regards, Ashwin. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 7 Date: Thu, 8 Mar 2018 09:04:33 -0500 From: Aron Helser To: "ashwin .D" Cc: VTK Users Subject: Re: [vtkusers] Compiling VTK Python from source Message-ID: Content-Type: text/plain; charset="utf-8" Do you have a 'vtkpython.exe' in your build/bin directory? That means that you have successfully compiled the wrappers. If you run 'vtkpython' and then 'import vtk', it should work. vtkpython is basically a thin wrapper that sets up paths so that 'iimport vtk' works. This wiki: https://urldefense.proofpoint.com/v2/url?u=https-3A__www.paraview.org_Wiki_ParaView_Python-5FScripting&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=2zzYzkGRyAF-UJ1oeiPsQjIJvwbTAkkwhQ9k3RHcEDw&e= has some info on how to set environment vars so you can run python and import vtk or paraview without using vtkpython/pvpython. HTH, Aron On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: > Hello, > I have VTK 7.0.0 tar file and I am trying to compile from > source the python wrapper for VTK. I have ccmake installed on my > Ubuntu > 16.04 box but no matter what I try(the installation itself proceeds > with no > errors) but I cannot find out where the python wrapper for SDK is present. > When I type > > python3.5 import vtk > > I get ImportError : no module named 'vtk` > > Here is how I built VTK for python using ccmake > > > ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 > -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON > -DVTK_PYTHON_VERSION:STRING=3.5 > -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 > -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 > -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ > ..VTK-7.0.0 > > Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. > But this does not do the job. > > Any suggestions will be appreciated. I intend to use VTK with Mayavi > eventually. > > Best regards, > Ashwin. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_&d > =DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rts > YkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=bQvkvuKPFxbvw > NgE8sR4xSZ71gPxwL3wObqU57506fo&e= > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_V > TK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTI > tPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=XUS > kJjNrveQDCgxUOcNp643Fzo0eHf51K3kLhEfrJmg&e= > > Search the list archives at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_searc > h_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgM > iAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSw > iGI&s=s3MYXuM7o87yR90LCp6Sg0strumq7KKX4hbIsp7fQRg&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_l > istinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi > AohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwi > GI&s=zFhJObBuwd9Ay8rC31d0k4eZ_3uu572S2k8DNANjfEE&e= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 8 Date: Thu, 8 Mar 2018 19:53:27 +0530 From: "ashwin .D" To: Aron Helser Cc: VTK Users Subject: Re: [vtkusers] Compiling VTK Python from source Message-ID: Content-Type: text/plain; charset="utf-8" Thanks for your response. I was not sure really and I did a make clean again and this time ran cmake as opposed to ccmake. and I am getting a few undefined references and they are related to Python. I have enclosed the log file. Any suggestions will be appreciated. On Thu, Mar 8, 2018 at 7:34 PM, Aron Helser wrote: > Do you have a 'vtkpython.exe' in your build/bin directory? That means > that you have successfully compiled the wrappers. If you run > 'vtkpython' and then 'import vtk', it should work. > vtkpython is basically a thin wrapper that sets up paths so that > 'iimport vtk' works. > > This wiki: > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.paraview.org_ > Wiki_ParaView_Python-5FScripting&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=2zzYzkGRyAF-UJ1oeiPsQjIJvwbTAkkwhQ9k3RHcEDw&e= has some info on how to set environment vars so you can run python and import vtk or paraview without using vtkpython/pvpython. > > HTH, > Aron > > On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: > >> Hello, >> I have VTK 7.0.0 tar file and I am trying to compile from >> source the python wrapper for VTK. I have ccmake installed on my >> Ubuntu >> 16.04 box but no matter what I try(the installation itself proceeds >> with no >> errors) but I cannot find out where the python wrapper for SDK is present. >> When I type >> >> python3.5 import vtk >> >> I get ImportError : no module named 'vtk` >> >> Here is how I built VTK for python using ccmake >> >> >> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >> -DVTK_PYTHON_VERSION:STRING=3.5 >> -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >> >> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. >> But this does not do the job. >> >> Any suggestions will be appreciated. I intend to use VTK with Mayavi >> eventually. >> >> Best regards, >> Ashwin. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_o >> pensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfX >> HHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g >> 3q6h4ItiSwiGI&s=QfIydYrDX9ALiUVj80h6C-G0h4SPJKUUTTU_PVO6Xj4&e= >> >> Please keep messages on-topic and check the VTK FAQ at: >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_ >> VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoG >> TItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s= >> XUSkJjNrveQDCgxUOcNp643Fzo0eHf51K3kLhEfrJmg&e= >> >> Search the list archives at: >> https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_sear >> ch_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uh >> gMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4It >> iSwiGI&s=s3MYXuM7o87yR90LCp6Sg0strumq7KKX4hbIsp7fQRg&e= >> >> Follow this link to subscribe/unsubscribe: >> https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_ >> listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhg >> MiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4Iti >> SwiGI&s=zFhJObBuwd9Ay8rC31d0k4eZ_3uu572S2k8DNANjfEE&e= >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logs Type: application/octet-stream Size: 186117 bytes Desc: not available URL: ------------------------------ Subject: Digest Footer _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=QfIydYrDX9ALiUVj80h6C-G0h4SPJKUUTTU_PVO6Xj4&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=XUSkJjNrveQDCgxUOcNp643Fzo0eHf51K3kLhEfrJmg&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=s3MYXuM7o87yR90LCp6Sg0strumq7KKX4hbIsp7fQRg&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=QkA8b-0zqbespemNmP5PLLtFdagY8g3q6h4ItiSwiGI&s=zFhJObBuwd9Ay8rC31d0k4eZ_3uu572S2k8DNANjfEE&e= ------------------------------ End of vtkusers Digest, Vol 167, Issue 16 ***************************************** -- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. From david.gobbi at gmail.com Thu Mar 8 12:59:23 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 8 Mar 2018 10:59:23 -0700 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter In-Reply-To: References: Message-ID: Hi Jeffery, Your replies include the digest of the whole day's vtk-users posts. Can you trim them from your messages? To be fair, when you move the slider to the left, triangles in the toroid become degenerate. This can be seen by viewing the toroid as a wireframe. I'm guessing that you don't actually need a square toroid for your application. The vtkContourTriangulator doesn't care if the points have different z, as long as the points all lie in a plane, and as long as all the line segments form a closed curve (or multiple closed curves) that do not self-intersect when viewed along the plane normal. Of course there are tolerance issues since the "plane normal" is computed within the limits of double-precision. One thing that might help is a filter that I wrote a few years ago for clipping surfaces generated from vtkMarchingCubes. This class does both the clipping and the triangulation and is more robust than vtkCutter because it never accidentally merges points in ways that change the topology. Unfortunately it is a "clipping" filter rather than a "cutting" filter, so it's output has to be filtered in order for it to do what you need: // Set up the clipper which will produce the cut polygons (unfortunately, its output includes half the original surface) vtkSmartPointer planes = vtkSmartPointer::New(); planes->AddItem(planeCut); vtkSmartPointer polygonsClip = vtkSmartPointer::New(); polygonsClip->SetInputConnection(clean->GetOutputPort()); polygonsClip->SetClippingPlanes(planes); polygonsClip->SetScalarModeToLabels(); // extract just the cut-surface polygons (I wish this was simpler!) vtkSmartPointer labels = vtkSmartPointer::New(); labels->SetName("Labels"); labels->InsertNextValue(1); // extract cut faces, which are labeled with "1" vtkSmartPointer node = vtkSmartPointer::New(); node->SetFieldType(vtkSelectionNode::CELL); node->SetContentType(vtkSelectionNode::VALUES); node->SetSelectionList(labels); vtkSmartPointer select = vtkSmartPointer::New(); select->AddNode(node); vtkSmartPointer extract = vtkSmartPointer::New(); extract->SetInputConnection(0, polygonsClip->GetOutputPort()); extract->SetInputData(1, select); // the "extract' filter produces the cut-face polygons that we want This filter is described further here: https://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping Regarding the vtkPlaneCutter class, it doesn't work for me, either. Hopefully somebody reading this message is familiar with this class and will chime it. Perhaps it hasn't been fully tested with vtkPolyData as an input? It looks like it was primarily designed for use on 3D mesh data. - David On Thu, Mar 8, 2018 at 9:42 AM, Jeffery Lewis wrote: > Thank you David for investigating this. > > Adding the call to SetTolerance() on the vtkCleanPolyData does help. If > you play around with the XY squareness slider (particularly to the left), > you will still see the problem (even with tolerance set lower to 1e-4). > > Does vtkContourTriangulator require no z components in the polygons? I am > cutting the surface model in 3D space. The contour generated by vtkCutter > is essentially confined to a plane, but the contour polygons have z > components in the coordinates (e.g. they are 3D points). > > Also, if I replace vtkCutter with vtkPlaneCutter, the program still > crashes at start up. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Mar 8 14:18:06 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 8 Mar 2018 11:18:06 -0800 Subject: [vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter In-Reply-To: References: Message-ID: Here is an example for ClipClosedSurface https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/ClipClosedSurface/ On Thu, Mar 8, 2018 at 9:59 AM, David Gobbi wrote: > Hi Jeffery, > > Your replies include the digest of the whole day's vtk-users posts. Can you > trim them from your messages? > > To be fair, when you move the slider to the left, triangles in the toroid > become degenerate. This can be seen by viewing the toroid as a wireframe. > I'm guessing that you don't actually need a square toroid for your > application. > > The vtkContourTriangulator doesn't care if the points have different z, as > long as the points all lie in a plane, and as long as all the line segments > form a closed curve (or multiple closed curves) that do not self-intersect > when viewed along the plane normal. Of course there are tolerance issues > since the "plane normal" is computed within the limits of double-precision. > > One thing that might help is a filter that I wrote a few years ago for > clipping surfaces generated from vtkMarchingCubes. This class does both the > clipping and the triangulation and is more robust than vtkCutter because it > never accidentally merges points in ways that change the topology. > Unfortunately it is a "clipping" filter rather than a "cutting" filter, so > it's output has to be filtered in order for it to do what you need: > > // Set up the clipper which will produce the cut polygons (unfortunately, > its output includes half the original surface) > vtkSmartPointer planes = > vtkSmartPointer::New(); > planes->AddItem(planeCut); > vtkSmartPointer polygonsClip = > vtkSmartPointer::New(); > polygonsClip->SetInputConnection(clean->GetOutputPort()); > polygonsClip->SetClippingPlanes(planes); > polygonsClip->SetScalarModeToLabels(); > > // extract just the cut-surface polygons (I wish this was simpler!) > vtkSmartPointer labels = > vtkSmartPointer::New(); > labels->SetName("Labels"); > labels->InsertNextValue(1); // extract cut faces, which are labeled > with "1" > vtkSmartPointer node = > vtkSmartPointer::New(); > node->SetFieldType(vtkSelectionNode::CELL); > node->SetContentType(vtkSelectionNode::VALUES); > node->SetSelectionList(labels); > vtkSmartPointer select = vtkSmartPointer::New(); > select->AddNode(node); > vtkSmartPointer extract = > vtkSmartPointer::New(); > extract->SetInputConnection(0, polygonsClip->GetOutputPort()); > extract->SetInputData(1, select); > // the "extract' filter produces the cut-face polygons that we want > > This filter is described further here: > https://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping > > Regarding the vtkPlaneCutter class, it doesn't work for me, either. > Hopefully somebody reading this message is familiar with this class and will > chime it. Perhaps it hasn't been fully tested with vtkPolyData as an input? > It looks like it was primarily designed for use on 3D mesh data. > > - David > > > On Thu, Mar 8, 2018 at 9:42 AM, Jeffery Lewis wrote: >> >> Thank you David for investigating this. >> >> Adding the call to SetTolerance() on the vtkCleanPolyData does help. If >> you play around with the XY squareness slider (particularly to the left), >> you will still see the problem (even with tolerance set lower to 1e-4). >> >> Does vtkContourTriangulator require no z components in the polygons? I am >> cutting the surface model in 3D space. The contour generated by vtkCutter is >> essentially confined to a plane, but the contour polygons have z components >> in the coordinates (e.g. they are 3D points). >> >> Also, if I replace vtkCutter with vtkPlaneCutter, the program still >> crashes at start up. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 g.bogle at auckland.ac.nz Thu Mar 8 15:21:07 2018 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Thu, 8 Mar 2018 20:21:07 +0000 Subject: [vtkusers] [FORGED] Re: [FORGED] Re: Compile error building VTK 4.8.6 In-Reply-To: <1520485037221.48838@auckland.ac.nz> References: <1520481883425.84526@auckland.ac.nz>, , <1520485037221.48838@auckland.ac.nz> Message-ID: <1520540457333.54026@auckland.ac.nz> I guess I inadvertently posted to the VTK list because I'm using QVTK. I consider myself very lucky to have a got a response, one that fixed my problem. ________________________________ From: vtkusers on behalf of Gib Bogle Sent: Thursday, 8 March 2018 5:57 p.m. To: Mike Chinander; vtkusers at vtk.org Subject: [FORGED] Re: [vtkusers] [FORGED] Re: Compile error building VTK 4.8.6 Sorry, my slip, of course I meant Qt 4.8.6. I think that fix should work for me - this is old code that I don't want to mess with. Thanks a lot! Gib ________________________________ From: vtkusers on behalf of Mike Chinander Sent: Thursday, 8 March 2018 5:44 p.m. To: vtkusers at vtk.org Subject: [FORGED] Re: [vtkusers] Compile error building VTK 4.8.6 Are you compiling VTK here or Qt 4.8.6? See https://bugreports.qt.io/browse/QTBUG-28335 for a possible fix. If it's an option for you (i.e., not trying build legacy code), I'd recommend using newer versions of VTK and Qt (and compiler). Good luck, --Mike On Wed, Mar 7, 2018 at 10:04 PM, Gib Bogle > wrote: I am trying to build VTK for x64, something I've done before with MSVC 2010, but not with MSVC 2012. I get this error compiling WTFString.cpp: cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 -wd480 0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore -DBUIL DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\Q tCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" -I"as sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" -I"interpre ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" -I"d:\Q t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" -I"wtf\unicode" - I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" -I"..\..\Source " -I"..\..\include" -I"\include\QtWebKit" -I"\include" -I"..\..\..\..\..\include \ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\win32-msvc2012" -Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\Local\Temp\WTFString.obj.29 08.4805.jom WTFString.cpp .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const std::pair< _Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const std::pair<_Ty1,_Ty2> &' ... (there are many more lines, but probably not adding more useful info). The error seems to be from Hashset.h, about here: template inline pair::iterator, bool> HashSet::add(const ValueType& value) { return m_impl.add(value); } I'm afraid this is way beyond my level of C++ expertise - I don't use templates. Is this error the result of a change between MSVC 2010 and 2012? How can I avoid this error? Thanks Gib _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 rpascual at idaero.es Fri Mar 9 10:15:11 2018 From: rpascual at idaero.es (rpascual) Date: Fri, 9 Mar 2018 08:15:11 -0700 (MST) Subject: [vtkusers] Efficient scalar rendering Message-ID: <1520608511436-0.post@n5.nabble.com> Hi all, I'm rendering an actor composed by about 100k vtkHexahedron cells. When I change the scalar array, (hence the maximum and minimum change) in order to update the lookup table, and change the colors, it takes it about 10 seconds to render the new scalars onto it (I'm using ranges to update it). Is that reasonable? Is there any way to make it faster or more efficient? Any help would be nice and really appreciated, thank you in advance -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From seun at rogue-research.com Fri Mar 9 15:36:53 2018 From: seun at rogue-research.com (Seun Odutola) Date: Fri, 9 Mar 2018 15:36:53 -0500 Subject: [vtkusers] vtkChartXY live update Message-ID: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> Hi everyone, I?m currently looking at how to create a chart (line plots), I looked at the sample Line Plot in vtk and tried replicating this in my app. What I need is a way to have the chart continuously update rendering based on incoming data. What I?ve gathered so far is that I need a vtkTable along with the vtkChartXY, I have gotten this to work so far so good. However, if I need to add more values to my table as time goes by and was wondering what the best way is in doing so. note: I have my application setup to use a timer with an observer in order to trigger a function I want to use for update purposes. From des at intrepid-geophysics.com Fri Mar 9 18:41:17 2018 From: des at intrepid-geophysics.com (des fitzgerald) Date: Sat, 10 Mar 2018 10:41:17 +1100 Subject: [vtkusers] vtkChartXY live update In-Reply-To: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> References: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> Message-ID: <313dc89d-6063-bb8d-281c-d6e2ba47d373@intrepid-geophysics.com> hi you can try renXYwin->Modified(); every time you want the update. djf On 10/03/2018 7:36 AM, Seun Odutola wrote: > Hi everyone, > > I?m currently looking at how to create a chart (line plots), I looked at the sample Line Plot in vtk and tried replicating this in my app. What I need is a way to have the chart continuously update rendering based on incoming data. What I?ve gathered so far is that I need a vtkTable along with the vtkChartXY, I have gotten this to work so far so good. However, if I need to add more values to my table as time goes by and was wondering what the best way is in doing so. > > note: I have my application setup to use a timer with an observer in order to trigger a function I want to use for update purposes. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: 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 -- Des FitzGerald Director Intrepid Geophysics Suite 110, 3 Male Street Brighton, Victoria 3186 AUSTRALIA PH: +61 3 9593 1077 Mob: 0418 138 793 FAX: +61 3 9592 4142 WEB: www.intrepid-geophysics.com EMAIL: des at intrepid-geophysics.com EMAIL: desmondjamesfitzgerald at gmail.com From winash12 at gmail.com Sat Mar 10 22:24:49 2018 From: winash12 at gmail.com (ashwin .D) Date: Sun, 11 Mar 2018 08:54:49 +0530 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: I was able to get this to compile successfully and generate a vtkpython.exe. I downloaded a later version of this namely i.e. 8.1. 0 and I also needed to add one more option to the command line i.e. -DVTK_PYTHON_VERSION=3.5 while running cmake. This I believe is *required* else it defaults to the 2.7 installation. On Thu, Mar 8, 2018 at 8:02 PM, ashwin .D wrote: > The log file I sent you just now is the result of running make -j8. > > On Thu, Mar 8, 2018 at 7:58 PM, David E DeMarle > wrote: > >> Did you run make? >> cmake just builds makefiles/visual studio solution files or whatever. You >> still have to compile those to make the library/binraries/bindings and >> whatnot. >> >> David E DeMarle >> Kitware, Inc. >> Principal Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: >> >>> Hello, >>> I have VTK 7.0.0 tar file and I am trying to compile from >>> source the python wrapper for VTK. I have ccmake installed on my Ubuntu >>> 16.04 box but no matter what I try(the installation itself proceeds with no >>> errors) but I cannot find out where the python wrapper for SDK is present. >>> When I type >>> >>> python3.5 import vtk >>> >>> I get ImportError : no module named 'vtk` >>> >>> Here is how I built VTK for python using ccmake >>> >>> >>> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >>> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >>> -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >>> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >>> >>> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. >>> But this does not do the job. >>> >>> Any suggestions will be appreciated. I intend to use VTK with Mayavi >>> eventually. >>> >>> Best regards, >>> Ashwin. >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 18434364531 at 163.com Sun Mar 11 04:18:40 2018 From: 18434364531 at 163.com (=?GBK?B?1cU=?=) Date: Sun, 11 Mar 2018 16:18:40 +0800 (CST) Subject: [vtkusers] Problem with vtkPNGReader. Message-ID: <29a2d4c9.2380.1621423e8d5.Coremail.18434364531@163.com> hello everyone! I have a question about vtkPNGReader. I want to show a 2D picture on a qvtkwidget.When I run the project, the vtkOutputWindow shows : ERROR:In D:VTK-8.0.1\IO\Image\vtkPNGReader.cxx, line 117 vtkPNGReader (000001FB05C3F490): Unable to open file 1.png Here it is my code: QtGuiApplication3::QtGuiApplication3(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); vtkRenderWindow* renwin = vtkRenderWindow::New(); renwin->StereoCapableWindowOn(); ui.qvtk1->SetRenderWindow(renwin); ren1 = vtkRenderer::New(); ui.qvtk1->GetRenderWindow()->AddRenderer(ren1); ui.qvtk1->GetRenderWindow()->Render(); vtkPNGReader *reader = vtkPNGReader::New(); char *filename = "1.png"; reader->SetFileName(filename); reader->Update(); vtkImageViewer* image_view = vtkImageViewer::New(); image_view->SetInputConnection(reader->GetOutputPort()); ui.qvtk1->SetRenderWindow(image_view->GetRenderWindow()); image_view->SetupInteractor(ui.qvtk1->GetRenderWindow()->GetInteractor()); image_view->Delete(); reader->Delete(); renwin->Delete(); } Do you have any suggertion? Thank a lot for the help! Best, Sheryl -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Sun Mar 11 05:59:10 2018 From: alican1812 at hotmail.com (alican) Date: Sun, 11 Mar 2018 02:59:10 -0700 (MST) Subject: [vtkusers] Problem with vtkPNGReader. In-Reply-To: <29a2d4c9.2380.1621423e8d5.Coremail.18434364531@163.com> References: <29a2d4c9.2380.1621423e8d5.Coremail.18434364531@163.com> Message-ID: <1520762350722-0.post@n5.nabble.com> Are you sure you have the file 1.png in the correct place? >From your code it looks like the file should be located in the same directory as your exe. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tamim.boubou at gmail.com Sun Mar 11 07:57:24 2018 From: tamim.boubou at gmail.com (Tamim) Date: Sun, 11 Mar 2018 04:57:24 -0700 (MST) Subject: [vtkusers] pcl vtk line not drawing correctly Message-ID: <1520769444297-0.post@n5.nabble.com> Hello, I want to draw a line with pcl which crosses a boxwidget from side to side passing from the handles and the center point.....this is fairly simple and I've done it like this : pcl::PointXYZ first, last; m_bounds = boxRep->GetBounds(); first.x = (m_bounds[1] + m_bounds[0]) / 2; // Beginning of the line on the X axis. first.y = m_bounds[2] ; // Beginning of the line on the Y axis. first.z = (m_bounds[5] + m_bounds[4]) / 2; // Beginning of the line on the Z axis. last.x = (m_bounds[1] + m_bounds[0]) / 2; // End of the line on the X axis. last.y = m_bounds[3] ; // End of the line on the Y axis. last.z =(m_bounds[5] + m_bounds[4]) / 2; // End of the line on the Z axis. // Draw a line form first to last colored green with Id "line1". m_pclViewer->addLine(first, last, 0, 1, 0, "line1"); and there are a few statements to ensure that the bounds are always updated. My problem is that when I rotate the box using my mouse and then drawing the line ....it isn't drawn as supposed....instead ...it's always drawn parallel to one of the axis (Y axis in this case...as displayed in the picture.) I printed the results on my output window and they are updated and displayed correctly but the line is not. Am I missing something here? Any help please ? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From m18434362339 at 163.com Sun Mar 11 10:32:11 2018 From: m18434362339 at 163.com (=?GBK?B?yrezybfv?=) Date: Sun, 11 Mar 2018 22:32:11 +0800 (CST) Subject: [vtkusers] Problem with vtkPNGReader. In-Reply-To: <1520762350722-0.post@n5.nabble.com> References: <29a2d4c9.2380.1621423e8d5.Coremail.18434364531@163.com> <1520762350722-0.post@n5.nabble.com> Message-ID: <160a16e.5a93.1621579dfdf.Coremail.m18434362339@163.com> Hi alican, I am sure 1.png is located in the project directory.And even I input the absolute path of it into setfilename(),the vtkOutputWindow also shows that error.I don't know why. ? 2018-03-11 17:59:10?alican ??? Are you sure you have the file 1.png in the correct place? From your code it looks like the file should be located in the same directory as your exe. -- 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 alican1812 at hotmail.com Sun Mar 11 17:34:51 2018 From: alican1812 at hotmail.com (alican) Date: Sun, 11 Mar 2018 14:34:51 -0700 (MST) Subject: [vtkusers] Problem with vtkPNGReader. In-Reply-To: <160a16e.5a93.1621579dfdf.Coremail.m18434362339@163.com> References: <29a2d4c9.2380.1621423e8d5.Coremail.18434364531@163.com> <1520762350722-0.post@n5.nabble.com> <160a16e.5a93.1621579dfdf.Coremail.m18434362339@163.com> Message-ID: <1520804091255-0.post@n5.nabble.com> Can you open this file in another application, MS Paint, for example? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From winash12 at gmail.com Sun Mar 11 21:15:34 2018 From: winash12 at gmail.com (ashwin .D) Date: Mon, 12 Mar 2018 06:45:34 +0530 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: It seems I was a bit premature in jumping to the conclusion that my VTK installation was complete :-). Yes I did generate a vtkpython.exe but that was with the 2.7.0 installation. When I did run this with Python3.5 I got an error. So I went back to the build process specifically cmake and these are the errors I got when I typed make -j8 This is my cmake command - cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3.5 -DPYTHON_EXECUTABLE=/usr/bin/python3.5 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY_PATH=/usr/lib/python3.5 I presume VTK can be compiled with Python 3.5 or not ? I am not sure. Apologies for the earlier over sight. This is on Ubuntu 16.04. vtkPythonAppInit.cxx:(.text+0x97): undefined reference to `PyList_Insert' CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function ` vtkPythonAppInitPrependPythonPath(char const*) [clone .constprop.33]': vtkPythonAppInit.cxx:(.text+0x322): undefined reference to `PySys_GetObject' vtkPythonAppInit.cxx:(.text+0x32f): undefined reference to `PyUnicode_FromString' vtkPythonAppInit.cxx:(.text+0x33f): undefined reference to `PyList_Insert' CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function `main': vtkPythonAppInit.cxx:(.text.startup+0xf9): undefined reference to `Py_DecodeLocale' vtkPythonAppInit.cxx:(.text.startup+0x10f): undefined reference to `Py_SetProgramName' vtkPythonAppInit.cxx:(.text.startup+0x114): undefined reference to `Py_Initialize' vtkPythonAppInit.cxx:(.text.startup+0x119): undefined reference to `PyEval_InitThreads' vtkPythonAppInit.cxx:(.text.startup+0x14d): undefined reference to `PySys_GetObject' vtkPythonAppInit.cxx:(.text.startup+0x155): undefined reference to ` PyUnicode_EncodeFSDefault' vtkPythonAppInit.cxx:(.text.startup+0x162): undefined reference to `PyBytes_AsString' vtkPythonAppInit.cxx:(.text.startup+0x471): undefined reference to `Py_DecodeLocale' vtkPythonAppInit.cxx:(.text.startup+0x4ad): undefined reference to `PyMem_Free' vtkPythonAppInit.cxx:(.text.startup+0x4bf): undefined reference to `PyMem_Free' vtkPythonAppInit.cxx:(.text.startup+0xc92): undefined reference to `Py_Main' vtkPythonAppInit.cxx:(.text.startup+0xc9e): undefined reference to `PyMem_Free' vtkPythonAppInit.cxx:(.text.startup+0xcc4): undefined reference to `PyMem_Free' collect2: error: ld returned 1 exit status Wrapping/Python/CMakeFiles/vtkpython.dir/build.make:98: recipe for target 'bin/vtkpython' failed make[2]: *** [bin/vtkpython] Error 1 CMakeFiles/Makefile2:25907: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/all' failed make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 9%] Built target vtkNetCDF [ 30%] Built target VTKData [ 31%] Built target vtkCommonCoreCxxTests [ 32%] Built target vtkCommonDataModel [ 35%] Built target vtkCommonCorePythonD Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 On Sun, Mar 11, 2018 at 8:54 AM, ashwin .D wrote: > I was able to get this to compile successfully and generate a > vtkpython.exe. I downloaded a later version of this namely i.e. 8.1. 0 and > I also needed to add one more option to the command line > > i.e. -DVTK_PYTHON_VERSION=3.5 while running cmake. This I believe is > *required* else it defaults to the 2.7 installation. > > > > On Thu, Mar 8, 2018 at 8:02 PM, ashwin .D wrote: > >> The log file I sent you just now is the result of running make -j8. >> >> On Thu, Mar 8, 2018 at 7:58 PM, David E DeMarle > > wrote: >> >>> Did you run make? >>> cmake just builds makefiles/visual studio solution files or whatever. >>> You still have to compile those to make the library/binraries/bindings and >>> whatnot. >>> >>> David E DeMarle >>> Kitware, Inc. >>> Principal Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: >>> >>>> Hello, >>>> I have VTK 7.0.0 tar file and I am trying to compile from >>>> source the python wrapper for VTK. I have ccmake installed on my Ubuntu >>>> 16.04 box but no matter what I try(the installation itself proceeds with no >>>> errors) but I cannot find out where the python wrapper for SDK is present. >>>> When I type >>>> >>>> python3.5 import vtk >>>> >>>> I get ImportError : no module named 'vtk` >>>> >>>> Here is how I built VTK for python using ccmake >>>> >>>> >>>> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >>>> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >>>> -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >>>> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >>>> >>>> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. >>>> But this does not do the job. >>>> >>>> Any suggestions will be appreciated. I intend to use VTK with Mayavi >>>> eventually. >>>> >>>> Best regards, >>>> Ashwin. >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> 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 18434364531 at 163.com Sun Mar 11 23:10:13 2018 From: 18434364531 at 163.com (=?GBK?B?1cU=?=) Date: Mon, 12 Mar 2018 11:10:13 +0800 (CST) Subject: [vtkusers] Problem with 0x00007FFC09F86810 (vtkCommonExecutionModel-8.0.dll) untreated exceptions In-Reply-To: <1520804091255-0.post@n5.nabble.com> References: <29a2d4c9.2380.1621423e8d5.Coremail.18434364531@163.com> <1520762350722-0.post@n5.nabble.com> <160a16e.5a93.1621579dfdf.Coremail.m18434362339@163.com> <1520804091255-0.post@n5.nabble.com> Message-ID: <1d65c99f.392c.162182fe1bf.Coremail.18434364531@163.com> Hello everyone! My project is to show a picture on the qvtkwidget. When I run the project, there is no picture show on the qvtkwidget.And when I click the qvtkwidget, there is a new error: 0x00007FFC09F86810 (vtkCommonExecutionModel-8.0.dll)There are untreated exceptions in QtGuiApplication2.exe: 0xC0000005: An access conflict occurs when the location 0x0000000000000060 is read. My code: QtGuiApplication2.h:----------------------------------------------------------------------------------- #pragma once #include #include "ui_QtGuiApplication2.h" #include VTK_MODULE_INIT(vtkRenderingOpenGL2); VTK_MODULE_INIT(vtkInteractionStyle); class vtkRenderer; class QtGuiApplication2 : public QMainWindow { Q_OBJECT public: QtGuiApplication2(QWidget *parent = Q_NULLPTR); private: Ui::QtGuiApplication2Class ui; protected: vtkRenderer *ren1; }; QtGuiApplication2.cpp:----------------------------------------------------------------------------------- #include "QtGuiApplication2.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkPNGReader.h" #include "vtkImageViewer.h" QtGuiApplication2::QtGuiApplication2(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); vtkPNGReader *reader = vtkPNGReader::New(); reader->SetFileName("1.png"); reader->Update(); vtkImageViewer *image_view = vtkImageViewer::New(); image_view->SetInputConnection(reader->GetOutputPort()); ui.qvtk1->SetRenderWindow(image_view->GetRenderWindow()); image_view->SetupInteractor(ui.qvtk1->GetRenderWindow()->GetInteractor()); ren1 = vtkRenderer::New(); ui.qvtk1->GetRenderWindow()->AddRenderer(ren1); ui.qvtk1->GetRenderWindow()->Render(); image_view->Delete(); reader->Delete(); } main.cpp:---------------------------------------------------------------------------------------------------------- #include "QtGuiApplication2.h" #include int main(int argc, char *argv[]) { QApplication a(argc, argv); QtGuiApplication2 w; w.show(); return a.exec(); } Thanks a lot for your help! Best, Sheryl. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at hotmail.fr Mon Mar 12 01:49:13 2018 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 12 Mar 2018 05:49:13 +0000 Subject: [vtkusers] Extract Contour With Snakes Message-ID: Hi All, I am trying to apply the following example to my images: ITK/Examples/ImageSegmentation/ExtractContourWithSnakes itk.org Download and Build ExtractContourWithSnakes. Click here to download ExtractContourWithSnakes and its CMakeLists.txt file. Once the tarball ExtractContourWithSnakes ... Is there any possibility to display the circle (as initial contour) on my image ? Kind regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From winash12 at gmail.com Mon Mar 12 01:57:03 2018 From: winash12 at gmail.com (ashwin .D) Date: Mon, 12 Mar 2018 11:27:03 +0530 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: I believe I have narrowed the cause of the error - in the output of cmake I get this error message - WARNING: Target "vtkpython" requests linking to directory "/usr/lib/python3.5". Targets may link only to libraries. CMake is dropping the item. It appears I have to link to a specific python library file in the /usr/lib/python3.5. But which one ? Under /usr/lib/python3.5 I see a directory lib-dynload and I see many .so files there. If somebody can give me a clue on this one I will be all set. On Mon, Mar 12, 2018 at 6:45 AM, ashwin .D wrote: > It seems I was a bit premature in jumping to the conclusion that my VTK > installation was complete :-). Yes I did generate a vtkpython.exe but that > was with the 2.7.0 installation. When I did run this with Python3.5 I got > an error. > > So I went back to the build process specifically cmake and these are the > errors I got when I typed make -j8 > > > This is my cmake command - > > cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3.5 -DPYTHON_EXECUTABLE=/usr/bin/python3.5 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY_PATH=/usr/lib/python3.5 > > > > I presume VTK can be compiled with Python 3.5 or not ? I am not sure. > Apologies for the earlier over sight. This is on Ubuntu 16.04. > > > vtkPythonAppInit.cxx:(.text+0x97): undefined reference to `PyList_Insert' > CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function ` > > vtkPythonAppInitPrependPythonPath(char const*) [clone .constprop.33]': > vtkPythonAppInit.cxx:(.text+0x322): undefined reference to `PySys_GetObject' > vtkPythonAppInit.cxx:(.text+0x32f): undefined reference to `PyUnicode_FromString' > vtkPythonAppInit.cxx:(.text+0x33f): undefined reference to `PyList_Insert' > CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function `main': > vtkPythonAppInit.cxx:(.text.startup+0xf9): undefined reference to `Py_DecodeLocale' > vtkPythonAppInit.cxx:(.text.startup+0x10f): undefined reference to `Py_SetProgramName' > vtkPythonAppInit.cxx:(.text.startup+0x114): undefined reference to `Py_Initialize' > vtkPythonAppInit.cxx:(.text.startup+0x119): undefined reference to `PyEval_InitThreads' > vtkPythonAppInit.cxx:(.text.startup+0x14d): undefined reference to `PySys_GetObject' > vtkPythonAppInit.cxx:(.text.startup+0x155): undefined reference to ` PyUnicode_EncodeFSDefault' > vtkPythonAppInit.cxx:(.text.startup+0x162): undefined reference to `PyBytes_AsString' > vtkPythonAppInit.cxx:(.text.startup+0x471): undefined reference to `Py_DecodeLocale' > vtkPythonAppInit.cxx:(.text.startup+0x4ad): undefined reference to `PyMem_Free' > vtkPythonAppInit.cxx:(.text.startup+0x4bf): undefined reference to `PyMem_Free' > vtkPythonAppInit.cxx:(.text.startup+0xc92): undefined reference to `Py_Main' > vtkPythonAppInit.cxx:(.text.startup+0xc9e): undefined reference to `PyMem_Free' > vtkPythonAppInit.cxx:(.text.startup+0xcc4): undefined reference to `PyMem_Free' > collect2: error: ld returned 1 exit status > Wrapping/Python/CMakeFiles/vtkpython.dir/build.make:98: recipe for target 'bin/vtkpython' failed > make[2]: *** [bin/vtkpython] Error 1 > CMakeFiles/Makefile2:25907: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/all' failed > make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 > make[1]: *** Waiting for unfinished jobs.... > [ 9%] Built target vtkNetCDF > [ 30%] Built target VTKData > [ 31%] Built target vtkCommonCoreCxxTests > [ 32%] Built target vtkCommonDataModel > [ 35%] Built target vtkCommonCorePythonD > Makefile:138: recipe for target 'all' failed > make: *** [all] Error 2 > > > > On Sun, Mar 11, 2018 at 8:54 AM, ashwin .D wrote: > >> I was able to get this to compile successfully and generate a >> vtkpython.exe. I downloaded a later version of this namely i.e. 8.1. 0 and >> I also needed to add one more option to the command line >> >> i.e. -DVTK_PYTHON_VERSION=3.5 while running cmake. This I believe is >> *required* else it defaults to the 2.7 installation. >> >> >> >> On Thu, Mar 8, 2018 at 8:02 PM, ashwin .D wrote: >> >>> The log file I sent you just now is the result of running make -j8. >>> >>> On Thu, Mar 8, 2018 at 7:58 PM, David E DeMarle < >>> dave.demarle at kitware.com> wrote: >>> >>>> Did you run make? >>>> cmake just builds makefiles/visual studio solution files or whatever. >>>> You still have to compile those to make the library/binraries/bindings and >>>> whatnot. >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> Principal Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: >>>> >>>>> Hello, >>>>> I have VTK 7.0.0 tar file and I am trying to compile from >>>>> source the python wrapper for VTK. I have ccmake installed on my Ubuntu >>>>> 16.04 box but no matter what I try(the installation itself proceeds with no >>>>> errors) but I cannot find out where the python wrapper for SDK is present. >>>>> When I type >>>>> >>>>> python3.5 import vtk >>>>> >>>>> I get ImportError : no module named 'vtk` >>>>> >>>>> Here is how I built VTK for python using ccmake >>>>> >>>>> >>>>> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >>>>> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >>>>> -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >>>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >>>>> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >>>>> >>>>> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g >>>>> once. But this does not do the job. >>>>> >>>>> Any suggestions will be appreciated. I intend to use VTK with Mayavi >>>>> eventually. >>>>> >>>>> Best regards, >>>>> Ashwin. >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> 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 winash12 at gmail.com Mon Mar 12 03:18:19 2018 From: winash12 at gmail.com (ashwin .D) Date: Mon, 12 Mar 2018 12:48:19 +0530 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: Ok - looks like I finally got it right !!! cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5 -DPYTHON_LIBRARY:PATH=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/ libpython3.5m.so >& cmake_log You also need to ensure TCL is turned off - this is certainly true for VTK 8.1 onwards It appears the file - libpython3.5m.so is the file required for linking( please do not ask me how I got hold of that piece of information !!!!!!!!!) but it would be nice if some of this information *does* get documented for others who may come after me. And did you get vtkpython compiled ? Yes I did on Ubuntu !! I also ran make test and I got 97 % tests passed - a total of 54 tests out of 1875 passed. I will leave it to the experts to let me know if that is significat or not. On Mon, Mar 12, 2018 at 11:27 AM, ashwin .D wrote: > I believe I have narrowed the cause of the error - in the output of cmake > I get this error message - > > WARNING: Target "vtkpython" requests linking to directory > "/usr/lib/python3.5". Targets may link only to libraries. CMake is > dropping the item. > > It appears I have to link to a specific python library file in the > /usr/lib/python3.5. But which one ? > Under /usr/lib/python3.5 I see a directory lib-dynload and I see many .so > files there. If somebody can give me a clue on this one I will be all set. > > > > On Mon, Mar 12, 2018 at 6:45 AM, ashwin .D wrote: > >> It seems I was a bit premature in jumping to the conclusion that my VTK >> installation was complete :-). Yes I did generate a vtkpython.exe but that >> was with the 2.7.0 installation. When I did run this with Python3.5 I got >> an error. >> >> So I went back to the build process specifically cmake and these are the >> errors I got when I typed make -j8 >> >> >> This is my cmake command - >> >> cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3.5 -DPYTHON_EXECUTABLE=/usr/bin/python3.5 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY_PATH=/usr/lib/python3.5 >> >> >> >> I presume VTK can be compiled with Python 3.5 or not ? I am not sure. >> Apologies for the earlier over sight. This is on Ubuntu 16.04. >> >> >> vtkPythonAppInit.cxx:(.text+0x97): undefined reference to `PyList_Insert' >> CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function ` >> >> vtkPythonAppInitPrependPythonPath(char const*) [clone .constprop.33]': >> vtkPythonAppInit.cxx:(.text+0x322): undefined reference to `PySys_GetObject' >> vtkPythonAppInit.cxx:(.text+0x32f): undefined reference to `PyUnicode_FromString' >> vtkPythonAppInit.cxx:(.text+0x33f): undefined reference to `PyList_Insert' >> CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function `main': >> vtkPythonAppInit.cxx:(.text.startup+0xf9): undefined reference to `Py_DecodeLocale' >> vtkPythonAppInit.cxx:(.text.startup+0x10f): undefined reference to `Py_SetProgramName' >> vtkPythonAppInit.cxx:(.text.startup+0x114): undefined reference to `Py_Initialize' >> vtkPythonAppInit.cxx:(.text.startup+0x119): undefined reference to `PyEval_InitThreads' >> vtkPythonAppInit.cxx:(.text.startup+0x14d): undefined reference to `PySys_GetObject' >> vtkPythonAppInit.cxx:(.text.startup+0x155): undefined reference to ` PyUnicode_EncodeFSDefault' >> vtkPythonAppInit.cxx:(.text.startup+0x162): undefined reference to `PyBytes_AsString' >> vtkPythonAppInit.cxx:(.text.startup+0x471): undefined reference to `Py_DecodeLocale' >> vtkPythonAppInit.cxx:(.text.startup+0x4ad): undefined reference to `PyMem_Free' >> vtkPythonAppInit.cxx:(.text.startup+0x4bf): undefined reference to `PyMem_Free' >> vtkPythonAppInit.cxx:(.text.startup+0xc92): undefined reference to `Py_Main' >> vtkPythonAppInit.cxx:(.text.startup+0xc9e): undefined reference to `PyMem_Free' >> vtkPythonAppInit.cxx:(.text.startup+0xcc4): undefined reference to `PyMem_Free' >> collect2: error: ld returned 1 exit status >> Wrapping/Python/CMakeFiles/vtkpython.dir/build.make:98: recipe for target 'bin/vtkpython' failed >> make[2]: *** [bin/vtkpython] Error 1 >> CMakeFiles/Makefile2:25907: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/all' failed >> make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 >> make[1]: *** Waiting for unfinished jobs.... >> [ 9%] Built target vtkNetCDF >> [ 30%] Built target VTKData >> [ 31%] Built target vtkCommonCoreCxxTests >> [ 32%] Built target vtkCommonDataModel >> [ 35%] Built target vtkCommonCorePythonD >> Makefile:138: recipe for target 'all' failed >> make: *** [all] Error 2 >> >> >> >> On Sun, Mar 11, 2018 at 8:54 AM, ashwin .D wrote: >> >>> I was able to get this to compile successfully and generate a >>> vtkpython.exe. I downloaded a later version of this namely i.e. 8.1. 0 and >>> I also needed to add one more option to the command line >>> >>> i.e. -DVTK_PYTHON_VERSION=3.5 while running cmake. This I believe is >>> *required* else it defaults to the 2.7 installation. >>> >>> >>> >>> On Thu, Mar 8, 2018 at 8:02 PM, ashwin .D wrote: >>> >>>> The log file I sent you just now is the result of running make -j8. >>>> >>>> On Thu, Mar 8, 2018 at 7:58 PM, David E DeMarle < >>>> dave.demarle at kitware.com> wrote: >>>> >>>>> Did you run make? >>>>> cmake just builds makefiles/visual studio solution files or whatever. >>>>> You still have to compile those to make the library/binraries/bindings and >>>>> whatnot. >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> Principal Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: >>>>> >>>>>> Hello, >>>>>> I have VTK 7.0.0 tar file and I am trying to compile from >>>>>> source the python wrapper for VTK. I have ccmake installed on my Ubuntu >>>>>> 16.04 box but no matter what I try(the installation itself proceeds with no >>>>>> errors) but I cannot find out where the python wrapper for SDK is present. >>>>>> When I type >>>>>> >>>>>> python3.5 import vtk >>>>>> >>>>>> I get ImportError : no module named 'vtk` >>>>>> >>>>>> Here is how I built VTK for python using ccmake >>>>>> >>>>>> >>>>>> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >>>>>> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >>>>>> -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >>>>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >>>>>> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >>>>>> >>>>>> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g >>>>>> once. But this does not do the job. >>>>>> >>>>>> Any suggestions will be appreciated. I intend to use VTK with Mayavi >>>>>> eventually. >>>>>> >>>>>> Best regards, >>>>>> Ashwin. >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> 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 836856733 at qq.com Mon Mar 12 03:44:05 2018 From: 836856733 at qq.com (DJQ) Date: Mon, 12 Mar 2018 00:44:05 -0700 (MST) Subject: [vtkusers] How to acheive zero-padding in VTK? Message-ID: <1520840645632-0.post@n5.nabble.com> Hello, I want to display 3D MR imaging in a better way so that liner-interpolation or cubic-interpolation doesn't meet my needs. Is there anything to achieve zero-padding in VTK? Or, which interpolation method is more appropriate for me? Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jellby at yahoo.com Mon Mar 12 06:08:16 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Mon, 12 Mar 2018 11:08:16 +0100 Subject: [vtkusers] Fullscreen with Qt Message-ID: <6463dfa7-ad02-609a-481c-1833ec2b095c@yahoo.com> Hi, Is it possible to toggle some kind of fullscreen mode on and off in a QVTKRenderWindowInteractor? When I call FullScreenOn() on the render window I get two problems: 1. There's no mouse interaction at all. 2. With two monitors the fullscreen mode spans both monitors, I'd prefer it to be limited to one, like the maximize button of normal windows. Of course, it's #1 which is critical. It seems ParaView uses some trick creating a second window that goes fullscreen... I've been more successful trying this: I created a QDialog with another VTK widget, used its showFullScreen() method, hid the previous widget, transferred the renderer to the new window... This more or less works, and I get mouse interaction, but when I close this second dialog and show again the old widget, it's dead, with no interaction. Has anyone managed to do this? Can you show me an example, preferably in python? Any important step I'm missing? Thanks, Ignacio From ochampao at hotmail.com Mon Mar 12 07:56:36 2018 From: ochampao at hotmail.com (ochampao) Date: Mon, 12 Mar 2018 04:56:36 -0700 (MST) Subject: [vtkusers] Change slicing plane when using vtkImageResliceMapper Message-ID: <1520855796357-0.post@n5.nabble.com> Hello vtkUsers, I am using a pipeline with vtkImageResliceMapper --> vtkImageSlice --> vtkImageStack for displayng a slice of a volume imported from a dicom series. This works well with the default slicing plane (0,0,1), however, when I try changing the slicing plane using vtkImageResliceMapper::GetSlicePlane()->SetNormal() the plane does not change. When I print the SlicePlane normal, I can see that the new normal is registered. Also, using UpdateInformation() or Modified() did not have any effect. My undersanding is that the SlicePlane is what determines the plane that the camera will follow when SliceFacesCameraOn() and SliceAtFocalPointOn() are used. What is the correct approach for changing the slicing plane of vtkImageResliceMapper? Below is the code that I am currently using. Thanks for your help. Panos. ============================ vtkNew dicomReader; dicomReader->SetDirectoryName("path/to/dicom/series"); dicomReader->Update(); vtkNew dicomMapper; dicomMapper->SetInputData(dicomReader->GetOutput()); dicomMapper->GetSlicePlane()->SetNormal(0.0, 1.0, 0.0); dicomMapper->SliceFacesCameraOn(); dicomMapper->SliceAtFocalPointOn(); vtkNew dicomSlice; dicomSlice->SetMapper(dicomMapper); dicomSlice->GetProperty()->UseLookupTableScalarRangeOn(); vtkNew imageStack; imageStack->AddImage(dicomSlice); vtkNew renderer; renderer->AddViewProp(imageStack); renderer->GetActiveCamera()->ParallelProjectionOn(); renderer->ResetCamera(); renderer->ResetCameraClippingRange(); vtkNew renderWindow; renderWindow->AddRenderer(renderer); vtkNew renderWindowInteractor; vtkNew style; style->SetInteractionModeToImageSlicing(); renderWindowInteractor->SetInteractorStyle(style); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindowInteractor->Initialize(); renderWindowInteractor->Start(); ============================= -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From kor1581 at gmail.com Mon Mar 12 08:02:41 2018 From: kor1581 at gmail.com (ran) Date: Mon, 12 Mar 2018 05:02:41 -0700 (MST) Subject: [vtkusers] vtkSmartPointer reintiatiation Message-ID: <1520856161714-0.post@n5.nabble.com> Hello, I'm using vtkSmartPointer to hold a vtkBorderWidget object of a class member variable and instantiates an object in a member function of the class. The member function call which will result in vtkSmartPointer new object instantiation may occur multiple times in the lifetime of my Class object. In this do I need to call delete method in vtkSmartPointer before each re-installation or will it be deleted automatically when vtkSmartPointer <>:: New call? or I need to use a normal pointer in this case? Example of my case: Class { private: vtkSmartPointer m_vtkBox; public: void DeleteOldBoxAndCreateNewBox() { m_vtkBox = vtkSmartPointer ::New(); } }; -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jayavardhanravi at outlook.com Mon Mar 12 09:19:00 2018 From: jayavardhanravi at outlook.com (Jay) Date: Mon, 12 Mar 2018 06:19:00 -0700 (MST) Subject: [vtkusers] Assembly Rotation In-Reply-To: <1188740731.10630293.1520319639402@mail.yahoo.com> References: <1188740731.10630293.1520319639402@mail.yahoo.com> Message-ID: <1520860740480-0.post@n5.nabble.com> Hi, if you could provide some kind of sample or pseudo code to replicate would be helpful Regards, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Mon Mar 12 10:47:19 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 12 Mar 2018 08:47:19 -0600 Subject: [vtkusers] Compiling VTK Python from source In-Reply-To: References: Message-ID: Hi Ashwin, The PYTHON_LIBRARY_PATH needs to point to a library, rather than a directory. For example, -DPYTHON_LIBRARY_PATH=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/ libpython3.5m.so Or possibly -DPYTHON_LIBRARY_PATH=/usr/lib64/libpython3.5m.so The location will vary between linux distros. - David On Sun, Mar 11, 2018 at 7:15 PM, ashwin .D wrote: > It seems I was a bit premature in jumping to the conclusion that my VTK > installation was complete :-). Yes I did generate a vtkpython.exe but that > was with the 2.7.0 installation. When I did run this with Python3.5 I got > an error. > > So I went back to the build process specifically cmake and these are the > errors I got when I typed make -j8 > > > This is my cmake command - > > cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3.5 -DPYTHON_EXECUTABLE=/usr/bin/python3.5 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY_PATH=/usr/lib/python3.5 > > > > I presume VTK can be compiled with Python 3.5 or not ? I am not sure. > Apologies for the earlier over sight. This is on Ubuntu 16.04. > > > vtkPythonAppInit.cxx:(.text+0x97): undefined reference to `PyList_Insert' > CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function ` > > vtkPythonAppInitPrependPythonPath(char const*) [clone .constprop.33]': > vtkPythonAppInit.cxx:(.text+0x322): undefined reference to `PySys_GetObject' > vtkPythonAppInit.cxx:(.text+0x32f): undefined reference to `PyUnicode_FromString' > vtkPythonAppInit.cxx:(.text+0x33f): undefined reference to `PyList_Insert' > CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o: In function `main': > vtkPythonAppInit.cxx:(.text.startup+0xf9): undefined reference to `Py_DecodeLocale' > vtkPythonAppInit.cxx:(.text.startup+0x10f): undefined reference to `Py_SetProgramName' > vtkPythonAppInit.cxx:(.text.startup+0x114): undefined reference to `Py_Initialize' > vtkPythonAppInit.cxx:(.text.startup+0x119): undefined reference to `PyEval_InitThreads' > vtkPythonAppInit.cxx:(.text.startup+0x14d): undefined reference to `PySys_GetObject' > vtkPythonAppInit.cxx:(.text.startup+0x155): undefined reference to ` PyUnicode_EncodeFSDefault' > vtkPythonAppInit.cxx:(.text.startup+0x162): undefined reference to `PyBytes_AsString' > vtkPythonAppInit.cxx:(.text.startup+0x471): undefined reference to `Py_DecodeLocale' > vtkPythonAppInit.cxx:(.text.startup+0x4ad): undefined reference to `PyMem_Free' > vtkPythonAppInit.cxx:(.text.startup+0x4bf): undefined reference to `PyMem_Free' > vtkPythonAppInit.cxx:(.text.startup+0xc92): undefined reference to `Py_Main' > vtkPythonAppInit.cxx:(.text.startup+0xc9e): undefined reference to `PyMem_Free' > vtkPythonAppInit.cxx:(.text.startup+0xcc4): undefined reference to `PyMem_Free' > collect2: error: ld returned 1 exit status > Wrapping/Python/CMakeFiles/vtkpython.dir/build.make:98: recipe for target 'bin/vtkpython' failed > make[2]: *** [bin/vtkpython] Error 1 > CMakeFiles/Makefile2:25907: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/all' failed > make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 > make[1]: *** Waiting for unfinished jobs.... > [ 9%] Built target vtkNetCDF > [ 30%] Built target VTKData > [ 31%] Built target vtkCommonCoreCxxTests > [ 32%] Built target vtkCommonDataModel > [ 35%] Built target vtkCommonCorePythonD > Makefile:138: recipe for target 'all' failed > make: *** [all] Error 2 > > > > On Sun, Mar 11, 2018 at 8:54 AM, ashwin .D wrote: > >> I was able to get this to compile successfully and generate a >> vtkpython.exe. I downloaded a later version of this namely i.e. 8.1. 0 and >> I also needed to add one more option to the command line >> >> i.e. -DVTK_PYTHON_VERSION=3.5 while running cmake. This I believe is >> *required* else it defaults to the 2.7 installation. >> >> >> >> On Thu, Mar 8, 2018 at 8:02 PM, ashwin .D wrote: >> >>> The log file I sent you just now is the result of running make -j8. >>> >>> On Thu, Mar 8, 2018 at 7:58 PM, David E DeMarle < >>> dave.demarle at kitware.com> wrote: >>> >>>> Did you run make? >>>> cmake just builds makefiles/visual studio solution files or whatever. >>>> You still have to compile those to make the library/binraries/bindings and >>>> whatnot. >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> Principal Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 <(518)%20881-4909> >>>> >>>> On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D wrote: >>>> >>>>> Hello, >>>>> I have VTK 7.0.0 tar file and I am trying to compile from >>>>> source the python wrapper for VTK. I have ccmake installed on my Ubuntu >>>>> 16.04 box but no matter what I try(the installation itself proceeds with no >>>>> errors) but I cannot find out where the python wrapper for SDK is present. >>>>> When I type >>>>> >>>>> python3.5 import vtk >>>>> >>>>> I get ImportError : no module named 'vtk` >>>>> >>>>> Here is how I built VTK for python using ccmake >>>>> >>>>> >>>>> ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0 >>>>> -DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON >>>>> -DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5 >>>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 >>>>> -DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0 >>>>> >>>>> Then a ccmake window pops up and I type ctcl - c twice and ctrl-g >>>>> once. But this does not do the job. >>>>> >>>>> Any suggestions will be appreciated. I intend to use VTK with Mayavi >>>>> eventually. >>>>> >>>>> Best regards, >>>>> Ashwin. >>>>> >>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Mar 12 11:15:28 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 12 Mar 2018 09:15:28 -0600 Subject: [vtkusers] Change slicing plane when using vtkImageResliceMapper In-Reply-To: <1520855796357-0.post@n5.nabble.com> References: <1520855796357-0.post@n5.nabble.com> Message-ID: The dicomMapper->SliceFacesCameraOn() option causes the normal to automatically be set from the direction-of-projection of the camera. So if you use this option, you cannot directly set the normal. Instead, you would have to change the normal by changing the position of the camera. - David On Mon, Mar 12, 2018 at 5:56 AM, ochampao wrote: > Hello vtkUsers, > > I am using a pipeline with vtkImageResliceMapper --> vtkImageSlice --> > vtkImageStack for displayng a slice of a volume imported from a dicom > series. This works well with the default slicing plane (0,0,1), however, > when I try changing the slicing plane using > vtkImageResliceMapper::GetSlicePlane()->SetNormal() the plane does not > change. When I print the SlicePlane normal, I can see that the new normal > is > registered. Also, using UpdateInformation() or Modified() did not have any > effect. > > My undersanding is that the SlicePlane is what determines the plane that > the > camera will follow when SliceFacesCameraOn() and SliceAtFocalPointOn() are > used. > > What is the correct approach for changing the slicing plane of > vtkImageResliceMapper? > > Below is the code that I am currently using. > > Thanks for your help. > Panos. > > ============================ > vtkNew dicomReader; > dicomReader->SetDirectoryName("path/to/dicom/series"); > dicomReader->Update(); > > vtkNew dicomMapper; > dicomMapper->SetInputData(dicomReader->GetOutput()); > dicomMapper->GetSlicePlane()->SetNormal(0.0, 1.0, 0.0); > dicomMapper->SliceFacesCameraOn(); > dicomMapper->SliceAtFocalPointOn(); > > vtkNew dicomSlice; > dicomSlice->SetMapper(dicomMapper); > dicomSlice->GetProperty()->UseLookupTableScalarRangeOn(); > > vtkNew imageStack; > imageStack->AddImage(dicomSlice); > > vtkNew renderer; > renderer->AddViewProp(imageStack); > renderer->GetActiveCamera()->ParallelProjectionOn(); > renderer->ResetCamera(); > renderer->ResetCameraClippingRange(); > > vtkNew renderWindow; > renderWindow->AddRenderer(renderer); > > vtkNew renderWindowInteractor; > vtkNew style; > style->SetInteractionModeToImageSlicing(); > > renderWindowInteractor->SetInteractorStyle(style); > renderWindowInteractor->SetRenderWindow(renderWindow); > renderWindowInteractor->Initialize(); > renderWindowInteractor->Start(); > ============================= > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Mon Mar 12 11:18:00 2018 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Mon, 12 Mar 2018 16:18:00 +0100 Subject: [vtkusers] gpu selection Message-ID: Hi If I have three GPUs, how can I set a certain GPU to be used in rendering? Regards Elhassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.vitali1 at unibg.it Mon Mar 12 13:42:57 2018 From: andrea.vitali1 at unibg.it (PhD Andrea Vitali) Date: Mon, 12 Mar 2018 10:42:57 -0700 (MST) Subject: [vtkusers] Deleting a point from vtkPoints using GetData() method Message-ID: <1520876577675-0.post@n5.nabble.com> Dear All, the generic question is relative to "how to delete a point from a polydata". I found several examples in which the point can be deleted by copying the points array without the point that I want to remove. In this case, I would like to delete a single point with no copy from an array to another one. I saw there is the GetData() method with which it is possible to remove a tuple by index. This is an example: poly->GetPoints()->GetData()->RemoveTuple(i); There are no errors, but the polydata is not rendered. I think there are some issues relative to topology or during VBO/IBO updating. I think I have to do other operation in order to correctly visualize my polydata. Do you have any idea how to do it? I hope it is not too general to really understand the problem. Thanks in advance, Andrea -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Mon Mar 12 14:04:25 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 12 Mar 2018 12:04:25 -0600 Subject: [vtkusers] Deleting a point from vtkPoints using GetData() method In-Reply-To: <1520876577675-0.post@n5.nabble.com> References: <1520876577675-0.post@n5.nabble.com> Message-ID: Hi Andrea, The cells in the polydata refer to the points by their position within the vtkPoints array. So if you remove point i, then you will also have to go through all the cells and: 1) if the cell array refers to any point j where j > i, it will have to be modified to refer to point j-1 2) if the cell refers to point i, then that point will have to be removed from the cell To make a long story short, removing a point from vtkPoints causes the vtkCellArray to become invalid. And unless you fix the vtkCellArray, the IBO will be invalid. - David On Mon, Mar 12, 2018 at 11:42 AM, PhD Andrea Vitali wrote: > Dear All, > > the generic question is relative to "how to delete a point from a > polydata". > I found several examples in which the point can be deleted by copying the > points array without the point that I want to remove. > > In this case, I would like to delete a single point with no copy from an > array to another one. I saw there is the GetData() method with which it is > possible to remove a tuple by index. > > This is an example: > > poly->GetPoints()->GetData()->RemoveTuple(i); > > There are no errors, but the polydata is not rendered. I think there are > some issues relative to topology or during VBO/IBO updating. I think I have > to do other operation in order to correctly visualize my polydata. > > Do you have any idea how to do it? > > I hope it is not too general to really understand the problem. > > Thanks in advance, > > Andrea > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayavardhanravi at outlook.com Mon Mar 12 14:28:59 2018 From: jayavardhanravi at outlook.com (Jay) Date: Mon, 12 Mar 2018 11:28:59 -0700 (MST) Subject: [vtkusers] Picking an actor with another actor Message-ID: <1520879339963-0.post@n5.nabble.com> Hi, I am trying to find a way to implement the VTK pick event, i.e. to pick actor A with another actor B. I use the key board events to move the actor A. And I would like to pick the actor B when both the actors intersect or touch each other. Is such an idea possible to implement in VTK, if yes how? Any suggestions or ideas would be very helpful and appreciated. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From seun at rogue-research.com Mon Mar 12 14:50:22 2018 From: seun at rogue-research.com (Seun Odutola) Date: Mon, 12 Mar 2018 14:50:22 -0400 Subject: [vtkusers] vtkChartXY live update In-Reply-To: <313dc89d-6063-bb8d-281c-d6e2ba47d373@intrepid-geophysics.com> References: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> <313dc89d-6063-bb8d-281c-d6e2ba47d373@intrepid-geophysics.com> Message-ID: <5AA8413D-7FA6-4543-BAD9-9FA542258FF9@rogue-research.com> Hi Des, Thanks for the suggestion, I?m already doing that. I guess what am trying to achieve if I can rephrase my last post properly is that I need a way to have my table populated on the fly, that is if I start off with a table with say a single column, for each column I insert a value (essentially creating a row per column if I understand the API), then as I get new values, I want to be able to insert these values into the column. Regards, Seun > On Mar 9, 2018, at 6:41 PM, des fitzgerald wrote: > > hi > > you can try > > renXYwin->Modified(); > > every time you want the update. > > djf > On 10/03/2018 7:36 AM, Seun Odutola wrote: >> Hi everyone, >> I?m currently looking at how to create a chart (line plots), I looked at the sample Line Plot in vtk and tried replicating this in my app. What I need is a way to have the chart continuously update rendering based on incoming data. What I?ve gathered so far is that I need a vtkTable along with the vtkChartXY, I have gotten this to work so far so good. However, if I need to add more values to my table as time goes by and was wondering what the best way is in doing so. >> >> note: I have my application setup to use a timer with an observer in order to trigger a function I want to use for update purposes. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: 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 > > -- > Des FitzGerald > Director > Intrepid Geophysics > Suite 110, 3 Male Street > Brighton, Victoria 3186 > AUSTRALIA > PH: +61 3 9593 1077 > Mob: 0418 138 793 > FAX: +61 3 9592 4142 > WEB: www.intrepid-geophysics.com > EMAIL: des at intrepid-geophysics.com > EMAIL: desmondjamesfitzgerald at gmail.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 seun at rogue-research.com Mon Mar 12 15:39:10 2018 From: seun at rogue-research.com (Seun Odutola) Date: Mon, 12 Mar 2018 15:39:10 -0400 Subject: [vtkusers] vtkChartXY live update In-Reply-To: <03d10e2e-2f31-bd56-3a7f-50a7cd257b97@emmenlauer.de> References: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> <313dc89d-6063-bb8d-281c-d6e2ba47d373@intrepid-geophysics.com> <5AA8413D-7FA6-4543-BAD9-9FA542258FF9@rogue-research.com> <03d10e2e-2f31-bd56-3a7f-50a7cd257b97@emmenlauer.de> Message-ID: <046E811D-A955-4106-9308-964EDAE20EBE@rogue-research.com> Hi Mario, That?s precisely what am aiming for, I want to keep the table (not recreate it) but just append to it. Note that I use the table alongside a vtkChartXY, so basically when I first create the table, I create a vtkPlot of type LINE which its input data is the table. Just thought I mentioned this for whatever it?s worth. Regards, Seun. > On Mar 12, 2018, at 3:32 PM, Mario Emmenlauer wrote: > > > You mean like appending to an existing table on the fly, without > re-creating the table? I would be curious about this too! > > Cheers, > > Mario > > > > On 12.03.2018 19:50, Seun Odutola wrote: >> Hi Des, >> >> Thanks for the suggestion, I?m already doing that. I guess what am trying to achieve if I can rephrase my last post properly is that I need a way to have my table populated on the fly, that is if I start off with a table with say a single column, for each column I insert a value (essentially creating a row per column if I understand the API), then as I get new values, I want to be able to insert these values into the column. >> >> Regards, >> Seun >> >>> On Mar 9, 2018, at 6:41 PM, des fitzgerald wrote: >>> >>> hi >>> >>> you can try >>> >>> renXYwin->Modified(); >>> >>> every time you want the update. >>> >>> djf >>> On 10/03/2018 7:36 AM, Seun Odutola wrote: > > > > > > > -- > BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203 > Balanstr. 43 mailto: memmenlauer * biodataanalysis.de > D-81669 M?nchen http://www.biodataanalysis.de/ From sid.murthy at gmail.com Mon Mar 12 16:10:27 2018 From: sid.murthy at gmail.com (Sid Murthy) Date: Mon, 12 Mar 2018 14:10:27 -0600 Subject: [vtkusers] Picking surface, visible points from vtkAreaPicker Message-ID: Hi, I am working through an example for the vtkAreaPicker where I get the selected frustum, Then I set that frustum (vtkPlanes) in vtkExtractSelectedFrustum prior to getting the point coordinates. My issue is it gets all selected points through the actor rather than just the visible ones on the surface of the actor. This would be same feature as 'Select Points On' rather than *through* in Paraview. If anyone could point me in the right direction that would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mario at emmenlauer.de Mon Mar 12 15:32:57 2018 From: mario at emmenlauer.de (Mario Emmenlauer) Date: Mon, 12 Mar 2018 20:32:57 +0100 Subject: [vtkusers] vtkChartXY live update In-Reply-To: <5AA8413D-7FA6-4543-BAD9-9FA542258FF9@rogue-research.com> References: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> <313dc89d-6063-bb8d-281c-d6e2ba47d373@intrepid-geophysics.com> <5AA8413D-7FA6-4543-BAD9-9FA542258FF9@rogue-research.com> Message-ID: <03d10e2e-2f31-bd56-3a7f-50a7cd257b97@emmenlauer.de> You mean like appending to an existing table on the fly, without re-creating the table? I would be curious about this too! Cheers, Mario On 12.03.2018 19:50, Seun Odutola wrote: > Hi Des, > > Thanks for the suggestion, I?m already doing that. I guess what am trying to achieve if I can rephrase my last post properly is that I need a way to have my table populated on the fly, that is if I start off with a table with say a single column, for each column I insert a value (essentially creating a row per column if I understand the API), then as I get new values, I want to be able to insert these values into the column. > > Regards, > Seun > >> On Mar 9, 2018, at 6:41 PM, des fitzgerald wrote: >> >> hi >> >> you can try >> >> renXYwin->Modified(); >> >> every time you want the update. >> >> djf >> On 10/03/2018 7:36 AM, Seun Odutola wrote: -- BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203 Balanstr. 43 mailto: memmenlauer * biodataanalysis.de D-81669 M?nchen http://www.biodataanalysis.de/ From sid.murthy at gmail.com Mon Mar 12 16:32:19 2018 From: sid.murthy at gmail.com (Sid Murthy) Date: Mon, 12 Mar 2018 14:32:19 -0600 Subject: [vtkusers] Picking surface, visible points from vtkAreaPicker In-Reply-To: References: Message-ID: Edit: Meant to say selecting points ON visible surface rather than through. On Mon, Mar 12, 2018 at 2:10 PM, Sid Murthy wrote: > Hi, > > I am working through an example for the vtkAreaPicker where I get the > selected frustum, Then I set that frustum (vtkPlanes) in > vtkExtractSelectedFrustum prior to getting the point coordinates. My issue > is it gets all selected points through the actor rather than just the > visible ones on the surface of the actor. > > This would be same feature as 'Select Points On' rather than *through* in > Paraview. > > If anyone could point me in the right direction that would be appreciated. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Mon Mar 12 17:20:32 2018 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 12 Mar 2018 21:20:32 +0000 Subject: [vtkusers] vtkChartXY live update In-Reply-To: <03d10e2e-2f31-bd56-3a7f-50a7cd257b97@emmenlauer.de> References: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> <313dc89d-6063-bb8d-281c-d6e2ba47d373@intrepid-geophysics.com> <5AA8413D-7FA6-4543-BAD9-9FA542258FF9@rogue-research.com>, <03d10e2e-2f31-bd56-3a7f-50a7cd257b97@emmenlauer.de> Message-ID: Why would you recreate the table? You can add rows and columns to an existing table. See how it is done in 3D Slicer: https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLTableNode.cxx (AddColumn, AddEmptyRow methods) Andras ________________________________ From: Mario Emmenlauer Sent: Monday, March 12, 2018 4:15 PM To: Seun Odutola; des at intrepid-geophysics.com Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkChartXY live update You mean like appending to an existing table on the fly, without re-creating the table? I would be curious about this too! Cheers, Mario On 12.03.2018 19:50, Seun Odutola wrote: > Hi Des, > > Thanks for the suggestion, I?m already doing that. I guess what am trying to achieve if I can rephrase my last post properly is that I need a way to have my table populated on the fly, that is if I start off with a table with say a single column, for each column I insert a value (essentially creating a row per column if I understand the API), then as I get new values, I want to be able to insert these values into the column. > > Regards, > Seun > >> On Mar 9, 2018, at 6:41 PM, des fitzgerald wrote: >> >> hi >> >> you can try >> >> renXYwin->Modified(); >> >> every time you want the update. >> >> djf >> On 10/03/2018 7:36 AM, Seun Odutola wrote: -- BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203 Balanstr. 43 mailto: memmenlauer * biodataanalysis.de D-81669 M?nchen https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.biodataanalysis.de%2F&data=02%7C01%7Classo%40queensu.ca%7C35697311b4724a504d7108d58855f7c4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564825212380152&sdata=tWO5bk91jk3C3AzDmoIt7tYbo4gVAKLN2pD0t5muc%2FY%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C35697311b4724a504d7108d58855f7c4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564825212380152&sdata=GrrF9NO%2BH05SvFORy1xKxWu1nDLqPY6wxM8Z3IX46HU%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%7C35697311b4724a504d7108d58855f7c4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564825212380152&sdata=%2FiPSms0uJ8sG3yk78KjyNpJrCcak%2F2LWkt9rgkR1W68%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%7C35697311b4724a504d7108d58855f7c4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564825212380152&sdata=OCuyHfJN61llutFeEaQnRkLdjLoQLVrrwBxc%2BDaqCGU%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%7C35697311b4724a504d7108d58855f7c4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564825212380152&sdata=scE9V6GtLRuc%2BZgQy5qtnhYfPss2QIhmUQkbqxkYdws%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%7C35697311b4724a504d7108d58855f7c4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564825212380152&sdata=plpOWYhPkqjCwwVQ0kUq%2B30cE6mGJ%2FhFWHaTGktXUn8%3D&reserved=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mario at emmenlauer.de Mon Mar 12 17:38:27 2018 From: mario at emmenlauer.de (Mario Emmenlauer) Date: Mon, 12 Mar 2018 22:38:27 +0100 Subject: [vtkusers] vtkChartXY live update In-Reply-To: References: <6C16DAB5-7BCC-4E5C-8A55-E7AD5E80C589@rogue-research.com> <313dc89d-6063-bb8d-281c-d6e2ba47d373@intrepid-geophysics.com> <5AA8413D-7FA6-4543-BAD9-9FA542258FF9@rogue-research.com> <03d10e2e-2f31-bd56-3a7f-50a7cd257b97@emmenlauer.de> Message-ID: <129667dc-34a9-9b72-c310-1d1428064774@emmenlauer.de> Dear Andras, thanks for the pointer! This helped! For other peoples reference, vtkTable has methods InsertNextBlankRow() and InsertNextRow() to append to an existing table. Cheers, Mario On 12.03.2018 22:20, Andras Lasso wrote: > Why would you recreate the table? You can add rows and columns to an existing > table. See how it is done in 3D Slicer: > > https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLTableNode.cxx > > (AddColumn, AddEmptyRow methods) > > Andras > -------------------------------------------------------------------------------- > *From:* Mario Emmenlauer > *Sent:* Monday, March 12, 2018 4:15 PM > *To:* Seun Odutola; des at intrepid-geophysics.com > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkChartXY live update > > > You mean like appending to an existing table on the fly, without > re-creating the table? I would be curious about this too! > > Cheers, > > ?? Mario > > > > On 12.03.2018 19:50, Seun Odutola wrote: >> Hi Des, >> >>???? Thanks for the suggestion, I?m already doing that. I guess what am trying to achieve if I can rephrase my last post properly is that I need a way to have my table populated on the fly, that is if I start off with a table with say a single column, for each column I insert a value (essentially creating a row per column if I > understand the API), then as I get new values, I want to be able to insert these > values into the column. >> >> Regards, >>??? Seun >> >>> On Mar 9, 2018, at 6:41 PM, des fitzgerald wrote: >>> >>> hi >>> >>> you can try >>> >>> renXYwin->Modified(); >>> >>> every time you want the update. >>> >>> djf >>> On 10/03/2018 7:36 AM, Seun Odutola wrote: -- BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203 Balanstr. 43 mailto: memmenlauer * biodataanalysis.de D-81669 M?nchen http://www.biodataanalysis.de/ From lasso at queensu.ca Tue Mar 13 00:21:27 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 13 Mar 2018 04:21:27 +0000 Subject: [vtkusers] Picking an actor with another actor In-Reply-To: <1520879339963-0.post@n5.nabble.com> References: <1520879339963-0.post@n5.nabble.com> Message-ID: This question of collision detection has come up a couple of times. See solution here: http://vtk.1045678.n5.nabble.com/vtkbioeng-for-vtk7-1-1-td5745542.html Is there still no other built-in collision test filter in VTK? Should we add this vtkCollisionDetectionFilter to VTK proper? If I could find a student who would clean up the code a bit and add a test, would it be accepted into VTK? Andras -----Original Message----- From: vtkusers On Behalf Of Jay Sent: Monday, March 12, 2018 2:29 PM To: vtkusers at vtk.org Subject: [vtkusers] Picking an actor with another actor Hi, I am trying to find a way to implement the VTK pick event, i.e. to pick actor A with another actor B. I use the key board events to move the actor A. And I would like to pick the actor B when both the actors intersect or touch each other. Is such an idea possible to implement in VTK, if yes how? Any suggestions or ideas would be very helpful and appreciated. -- 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%7C4e1ee3d241ed40a7a24e08d5884721a7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564761440284709&sdata=RUtoQDfAJOXL75p%2BT%2BNSdDCU23ERbnrG1%2BbmlUIlpVs%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C4e1ee3d241ed40a7a24e08d5884721a7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564761440284709&sdata=JfYRvTYNqYA7qnd7YHlQKQHUGYoSD39BDB0%2FwmTKDAk%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%7C4e1ee3d241ed40a7a24e08d5884721a7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564761440284709&sdata=WJRa5AB8wAFN8RKNBGXzVfoqKBJaDEXhMQY32J0ME1c%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%7C4e1ee3d241ed40a7a24e08d5884721a7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564761440284709&sdata=vagk5GCVLbxpIZ%2B5pdJGXvolwd5ijWslpaYYEPsoFRo%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%7C4e1ee3d241ed40a7a24e08d5884721a7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564761440284709&sdata=yL5ewKvAokb2TMqmGkRBSQGMVV1nsqD13h6U2jGCkm0%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%7C4e1ee3d241ed40a7a24e08d5884721a7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636564761440284709&sdata=WuKQxgoOlDHOHimCpDP6BiTlQeq3wbfw0xrV849pq0M%3D&reserved=0 From csaravanakumar2010 at gmail.com Tue Mar 13 06:57:43 2018 From: csaravanakumar2010 at gmail.com (saravanakumar) Date: Tue, 13 Mar 2018 03:57:43 -0700 (MST) Subject: [vtkusers] Volume Rendering Message-ID: <1520938663572-0.post@n5.nabble.com> Hi Everyone, I am trying to add Polydata input(.vtp) file to VTKRaycastVolumeRenderingMapper. But i cant able to add input to this mapper. Help me to add this. Thanks in advance. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Tue Mar 13 10:08:49 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 13 Mar 2018 10:08:49 -0400 Subject: [vtkusers] Volume Rendering In-Reply-To: <1520938663572-0.post@n5.nabble.com> References: <1520938663572-0.post@n5.nabble.com> Message-ID: any volume mapper will take VTI (image data). What you are trying to do? thanks On Tue, Mar 13, 2018 at 6:57 AM, saravanakumar wrote: > Hi Everyone, > > I am trying to add Polydata input(.vtp) file to > VTKRaycastVolumeRenderingMapper. But i cant able to add input to this > mapper. Help me to add this. > > 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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Tue Mar 13 10:47:42 2018 From: ochampao at hotmail.com (ochampao) Date: Tue, 13 Mar 2018 07:47:42 -0700 (MST) Subject: [vtkusers] Change slicing plane when using vtkImageResliceMapper In-Reply-To: References: <1520855796357-0.post@n5.nabble.com> Message-ID: <1520952462368-0.post@n5.nabble.com> Hi David, Thanks for your reply. Changing the position of the camera works, as you suggested. What I have noticed now is that when I reach the first or final slice (min/max clipping planes) and if I keep trying to change the slice by pressing Ctrl+Left-Mouse-Button, the image moves to the right (min clipping plane) or the left (max clipping plane) instead of remaining in the centre of the view. This does not happen with the original slicing plane (before moving the camera). Here is a slide to describe the effect: https://pasteboard.co/HbIKTZT.png Do you know why this happens and how to stop it? This is the code I am using to setup and move the camera: renderer->GetActiveCamera()->Azimuth(90); renderer->GetActiveCamera()->OrthogonalizeViewUp(); renderer->GetActiveCamera()->ParallelProjectionOn(); renderer->ResetCameraClippingRange(); renderer->ResetCamera(); Thanks, Panos -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Tue Mar 13 13:54:43 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 13 Mar 2018 11:54:43 -0600 Subject: [vtkusers] Change slicing plane when using vtkImageResliceMapper In-Reply-To: <1520952462368-0.post@n5.nabble.com> References: <1520855796357-0.post@n5.nabble.com> <1520952462368-0.post@n5.nabble.com> Message-ID: Hi Panos, I just remembered that vtkInteractorStyleImage provides a convenience method for positioning the camera called SetImageOrientation(). Unlike "Azimuth()" it specifies an absolution orientation, rather than a relative orientation: // set the camera view via row and column directions, // these directions must be at right angles to each other double vLeftToRight[3] = { 0.0, 1.0, 0.0 }; double vBottomToTop[3] = { 0.0, 0.0, 1.0 }; style->SetCurrentRenderer(renderer); style->SetImageOrientation(vLeftToRight, vBottomToTop); As for the "sliding image" problem that you saw, I just checked on my own system and I see exactly the same issue. It seems to be related to the OpenGL2 backend, I'll have to dig into the mapper code to see what's up. The odd thing is, I use vtkImageResliceMapper all the time and I have not seen this problem before. However, I almost never use it with vtkInteractorStyleImage. If you don't need oblique views, you can try switching to vtkImageSliceMapper as a temporary solution. Note that you'll have to remove the SetNormal() call from your code. - David On Tue, Mar 13, 2018 at 8:47 AM, ochampao wrote: > Hi David, > > Thanks for your reply. Changing the position of the camera works, as you > suggested. > > What I have noticed now is that when I reach the first or final slice > (min/max clipping planes) and if I keep trying to change the slice by > pressing Ctrl+Left-Mouse-Button, the image moves to the right (min clipping > plane) or the left (max clipping plane) instead of remaining in the centre > of the view. This does not happen with the original slicing plane (before > moving the camera). Here is a slide to describe the effect: > https://pasteboard.co/HbIKTZT.png > > Do you know why this happens and how to stop it? > > This is the code I am using to setup and move the camera: > > renderer->GetActiveCamera()->Azimuth(90); > renderer->GetActiveCamera()->OrthogonalizeViewUp(); > renderer->GetActiveCamera()->ParallelProjectionOn(); > renderer->ResetCameraClippingRange(); > renderer->ResetCamera(); > > Thanks, > Panos > > > > > -- > 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 chihebz at hotmail.com Tue Mar 13 14:05:16 2018 From: chihebz at hotmail.com (ZACK) Date: Tue, 13 Mar 2018 11:05:16 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem Message-ID: <1520964316330-0.post@n5.nabble.com> Hi, I 've been facing a problem with rendering more than one actor in my vtkopenglrenderer since I upgraded from vtk 5.4 to vtk 8.1 using opengl2 I noticed that rendering in old vtk is under filtering and in vtk8.1 is under rendering\core\ Can someone explain to me what are the main changes in the rendering pipeline? My program does work fine before!! Actually, if Mr Bill Lorensen can explain the changes because he did work on the new and old vtk rendering Thanks for helping Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.stansvik at orexplore.com Tue Mar 13 08:33:55 2018 From: elvis.stansvik at orexplore.com (elvis.stansvik at orexplore.com) Date: Tue, 13 Mar 2018 14:33:55 +0200 Subject: [vtkusers] Invoices Overdue Message-ID: <108201903778.2018313123355@public.kitware.com> 09 Resending invoice. >>> http://www.mwmummeryroofing.com/Paid-Invoice/ elvis.stansvik at orexplore.com From zhuangming.shen at sphic.org.cn Wed Mar 14 04:11:48 2018 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Wed, 14 Mar 2018 08:11:48 +0000 Subject: [vtkusers] Json object error caused by websocket.py Message-ID: <1521015106641.17215@sphic.org.cn> Hi all, I found there probably be a bug around Line 250 in /Wrapping/Python/wslink/websocket.py. If this code is run using python 3.x, this will cause an error "json object must be str not 'bytes' " when use json.loads. To avoid this error, I think the code can be modified by ? [cid:b10da89b-5d6c-40ac-898d-8db128fb6001] Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 40575 bytes Desc: pastedImage.png URL: From andrea.vitali1 at unibg.it Wed Mar 14 04:26:14 2018 From: andrea.vitali1 at unibg.it (PhD Andrea Vitali) Date: Wed, 14 Mar 2018 01:26:14 -0700 (MST) Subject: [vtkusers] Deleting a point from vtkPoints using GetData() method In-Reply-To: References: <1520876577675-0.post@n5.nabble.com> Message-ID: <1521015974823-0.post@n5.nabble.com> Hi David, Perfect! I tried with a simple example with two triangles as polys in polydata and it works fine! I will try by using an STL model. Thank you David Cheers, Andrea -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From nztoddler at yahoo.com Wed Mar 14 05:18:56 2018 From: nztoddler at yahoo.com (Todd) Date: Wed, 14 Mar 2018 22:18:56 +1300 Subject: [vtkusers] Deleting a point from vtkPoints using GetData() method In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From andrea.vitali1 at unibg.it Wed Mar 14 07:55:44 2018 From: andrea.vitali1 at unibg.it (PhD Andrea Vitali) Date: Wed, 14 Mar 2018 04:55:44 -0700 (MST) Subject: [vtkusers] Deleting a point from vtkPoints using GetData() method In-Reply-To: References: <1520876577675-0.post@n5.nabble.com> Message-ID: <1521028544796-0.post@n5.nabble.com> In this way, we could drastically improve real-time performances with big polydata. Great!!! I will try it directly on a polydata extracted by an MRI volume. I will give you some feedbacks about results. Andrea -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ochampao at hotmail.com Wed Mar 14 08:21:09 2018 From: ochampao at hotmail.com (ochampao) Date: Wed, 14 Mar 2018 05:21:09 -0700 (MST) Subject: [vtkusers] Change slicing plane when using vtkImageResliceMapper In-Reply-To: References: <1520855796357-0.post@n5.nabble.com> <1520952462368-0.post@n5.nabble.com> Message-ID: <1521030069510-0.post@n5.nabble.com> Hi David, Thanks a lot for your helpful comments. Based on your suggestions I've tried a few things. Here's what I got: 1. using style->SetImageOrientation(vLeftToRight, vBottomToTop); Using this approach I am able to change the slicing plane on demand. I can still see the "sliding image" effect that I have mentioned above. 2. using vtkImageSliceMapper instead of vtkImageResliceMapper: This approach solves the "sliding image". 3. Setting the camera's clipping range manually so that the min/max clipping planes coincide exactly with the first (i.e. closest to camera) and last (i.e. furthest from camera) slice of the volume (normal to the direction of projection). Note that I am still using vtkImageResliceMapper here. This approach solves the "sliding image" effect as well. What I have noticed is, when using renderer->ResetCameraClippingRange(), the clipping range calculated automatically does not coincide with the planes of the first and last slice of the volume. If the clipping range is set manually so that it does coincide using renderer->GetActiveCamera()->SetClippingRange(dMin, dMax), then the "sliding image" effect does not appear. In fact, if I compare the clipping range calculated automatically when using vtkImageSliceMapper this is exactly what happens i.e. the clipping range coincides with the first/last slices of the volume. Here are the changes to my code above that I made to set the clipping range manually: ================================== // ... dicomMapper->SliceAtFocalPointOn(); // ... more code ... // Setup renderers vtkNew renderer; renderer->AddViewProp(imageStack); renderer->GetActiveCamera()->ParallelProjectionOn(); renderer->ResetCamera(); renderer->GetActiveCamera()->Azimuth(270); renderer->GetActiveCamera()->OrthogonalizeViewUp(); // Assuming that the origin of the volume is at (0,0,0) double* cameraPosition = renderer->GetActiveCamera()->GetPosition(); int* dims = dicomReader->GetOutput()->GetDimensions(); double* spacing = dicomReader->GetOutput()->GetSpacing(); // Coordinates of points along the direction of projection that define the min/max clipping planes // such that the min/max clipping planes coincide with the slices closest and furthest from the camera. double pMin[3] = { 0, dims[1] / 2 * spacing[1], dims[2] / 2 * spacing[2] }; double pMax[3] = { dims[0] * spacing[0], dims[1] / 2 * spacing[1], dims[2] / 2 * spacing[2] }; // Calculate min/max clipping range along the direction of projection double dMin = sqrt(vtkMath::Distance2BetweenPoints(pMin, cameraPosition)); double dMax = sqrt(vtkMath::Distance2BetweenPoints(pMax, cameraPosition)); // Update clipping range renderer->GetActiveCamera()->SetClippingRange(dMin, dMax); ================================== Kind regards, Panayiotis. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Wed Mar 14 10:36:17 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 14 Mar 2018 08:36:17 -0600 Subject: [vtkusers] Change slicing plane when using vtkImageResliceMapper In-Reply-To: <1521030069510-0.post@n5.nabble.com> References: <1520855796357-0.post@n5.nabble.com> <1520952462368-0.post@n5.nabble.com> <1521030069510-0.post@n5.nabble.com> Message-ID: Hi Panos, Setting the clipping range is a good idea, the "Slice" interaction will not move beyond the clipping planes. I found another way to way to work around the "sliding" problem, but it might cause the window/level interaction to slow down a bit: dicomMapper->SeparateWindowLevelOperationOff(); Once I find the root cause of the problem, I'll submit a patch to VTK. Cheers, - David On Wed, Mar 14, 2018 at 6:21 AM, ochampao wrote: > Hi David, > > Thanks a lot for your helpful comments. Based on your suggestions I've > tried > a few things. Here's what I got: > > 1. using style->SetImageOrientation(vLeftToRight, vBottomToTop); > > Using this approach I am able to change the slicing plane on demand. I can > still see the "sliding image" effect that I have mentioned above. > > 2. using vtkImageSliceMapper instead of vtkImageResliceMapper: > > This approach solves the "sliding image". > > 3. Setting the camera's clipping range manually so that the min/max > clipping > planes coincide exactly with the first (i.e. closest to camera) and last > (i.e. furthest from camera) slice of the volume (normal to the direction of > projection). Note that I am still using vtkImageResliceMapper here. > > This approach solves the "sliding image" effect as well. What I have > noticed > is, when using renderer->ResetCameraClippingRange(), the clipping range > calculated automatically does not coincide with the planes of the first and > last slice of the volume. If the clipping range is set manually so that it > does coincide using renderer->GetActiveCamera()->SetClippingRange(dMin, > dMax), then the "sliding image" effect does not appear. In fact, if I > compare the clipping range calculated automatically when using > vtkImageSliceMapper this is exactly what happens i.e. the clipping range > coincides with the first/last slices of the volume. > > Here are the changes to my code above that I made to set the clipping range > manually: > > ================================== > // ... > dicomMapper->SliceAtFocalPointOn(); > > // ... more code ... > > // Setup renderers > vtkNew renderer; > renderer->AddViewProp(imageStack); > renderer->GetActiveCamera()->ParallelProjectionOn(); > renderer->ResetCamera(); > renderer->GetActiveCamera()->Azimuth(270); > renderer->GetActiveCamera()->OrthogonalizeViewUp(); > > // Assuming that the origin of the volume is at (0,0,0) > double* cameraPosition = renderer->GetActiveCamera()->GetPosition(); > int* dims = dicomReader->GetOutput()->GetDimensions(); > double* spacing = dicomReader->GetOutput()->GetSpacing(); > > // Coordinates of points along the direction of projection that define the > min/max clipping planes > // such that the min/max clipping planes coincide with the slices closest > and furthest from the camera. > double pMin[3] = { 0, dims[1] / 2 * spacing[1], dims[2] / 2 * spacing[2] }; > double pMax[3] = { dims[0] * spacing[0], dims[1] / 2 * spacing[1], dims[2] > / > 2 * spacing[2] }; > > // Calculate min/max clipping range along the direction of projection > double dMin = sqrt(vtkMath::Distance2BetweenPoints(pMin, cameraPosition)); > double dMax = sqrt(vtkMath::Distance2BetweenPoints(pMax, cameraPosition)); > > // Update clipping range > renderer->GetActiveCamera()->SetClippingRange(dMin, dMax); > ================================== > > Kind regards, > Panayiotis. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Wed Mar 14 19:53:05 2018 From: nztoddler at yahoo.com (Todd Martin) Date: Wed, 14 Mar 2018 23:53:05 +0000 (UTC) Subject: [vtkusers] Deleting a point from vtkPoints using GetData() method In-Reply-To: <1521028544796-0.post@n5.nabble.com> References: <1520876577675-0.post@n5.nabble.com> <1521028544796-0.post@n5.nabble.com> Message-ID: <553558134.784133.1521071585319@mail.yahoo.com> It would be really efficient if the vtkCellArray contained a reverse mapping to the cells; e.g.GetCellsAtPoint(vktIdType index, vtkIdType &ncells, vtkIdType *&cells) This might, however, add too much memory overhead. It would be really efficient if vtkCellArray contained a reverse mapping to the cells for a given point; e.g. GetCellsAtPoint (vtkIdType index, vtkIdType &ncells, vtkIdType *&cells) | | | | VTK: vtkCellArray Class Reference | | | On Thursday, March 15, 2018, 12:56:00 AM GMT+13, PhD Andrea Vitali wrote: In this way, we could drastically improve real-time performances with big polydata. Great!! I will try it directly on a polydata extracted by an MRI volume. I will give you some feedbacks about results. Andrea -- 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 polly_sukting at hotmail.com Thu Mar 15 02:22:21 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Thu, 15 Mar 2018 06:22:21 +0000 Subject: [vtkusers] Kmeans Clustering Message-ID: Hi, I would like to cluster my 3D polydata using KMeansStatistics. I could get the outcome by following exactly the example in https://lorensen.github.io/VTKExamples/site/Cxx/InfoVis/KMeansClustering/ Any clue that how i can read my .vtk data into this coding? I tried to convert my .vtk data to .csv data and called vtkTextDelimiterReader. But I only get the coordinates printer without clustering. Thank you so much. Best, Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoequella at gmail.com Thu Mar 15 03:00:43 2018 From: zoequella at gmail.com (Stephen Zucker) Date: Thu, 15 Mar 2018 00:00:43 -0700 (MST) Subject: [vtkusers] Differences Result between CPU rendering and GPU rendering with VTK Message-ID: <1521097243522-0.post@n5.nabble.com> Dear All, When i use same colorFunction?scalarOpacity, gradientOpacity to render the same Medical Image data, I found the rendered result of CPU(vtkFixedPointVolumeRayCastMapper) and GPU(vtkGPUVolumeRayCastMapper) are different. I think the CPU rendered result is better then GPU?the GPU rendered result has too many colourful spots and ribbon. But with GPU rendering, the operation is smoother. The rendered result is as follows: So can you help me to improve the rendering effect of the GPU? Thanks in advance, Zucker. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From joe.maliszewski at zethon.com Thu Mar 15 07:11:18 2018 From: joe.maliszewski at zethon.com (jmal) Date: Thu, 15 Mar 2018 04:11:18 -0700 (MST) Subject: [vtkusers] ITK-VTK Dicom series display In-Reply-To: <1393323166946-5726104.post@n5.nabble.com> References: <1393323166946-5726104.post@n5.nabble.com> Message-ID: <1521112278085-0.post@n5.nabble.com> Hi kidane, I hope all is well. I'm stuck at the point you were in 2014 with trying to display DICOM images. I was hoping you might be able to help me with your expertise. this was my question on stackoverflow: https://stackoverflow.com/questions/49295483/how-to-step-by-step-view-a-dicom-series-using-itk-and-vtk-as-both-a-scroll-throu " 0 down vote favorite I am very new to ITK and VTK, and from what I can see, ITK is used to process the DICOM images, and VTK is used to visualize them. One of the biggest issues i'm having is trying to successfully execute the functions with my DICOM images, as they are not clear how to operate, or what combinations of functions to use. My aim is to display as series I can scroll through, and secondly visualize my series as a volume. Has anyone gone through the process of taking a series of DICOM images, and gone through the process of processing with ITK, and visualizing with VTK? If so how did you do it? what combination of functions did you use? And with these functions did you come across any errors, or find and issues with that you had to solve along the way? common issues I am finding. -Lack of instruction/documentation on how to implement functions. -How to figure out if my DIOCOM images are in the right format for use in ITK and VTK -unknown combination of functions to use to get from my DICOM series to visualize as a scroll through display, and as a volume. (I have tried the testDICOMdisplay.cxx and few other in the examples, which only seems to load 3 images, before crashing.) -can you suggest any good resources you have come across that may help me? any help, or advice would be greatly appreciated. Many thanks in advance" Kind regards, Joe -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.stansvik at orexplore.com Thu Mar 15 08:13:30 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 15 Mar 2018 13:13:30 +0100 Subject: [vtkusers] Differences Result between CPU rendering and GPU rendering with VTK In-Reply-To: <1521097243522-0.post@n5.nabble.com> References: <1521097243522-0.post@n5.nabble.com> Message-ID: One thing you could try to get rid of the woodgrain artifacts is to enable jittering (UseJitteringOn()). Elvis 2018-03-15 8:00 GMT+01:00 Stephen Zucker : > Dear All, > > When i use same colorFunction?scalarOpacity, gradientOpacity to render the > same Medical Image data, I found the rendered result of > CPU(vtkFixedPointVolumeRayCastMapper) and GPU(vtkGPUVolumeRayCastMapper) are > different. > I think the CPU rendered result is better then GPU?the GPU rendered result > has too many colourful spots and ribbon. But with GPU rendering, the > operation is smoother. > The rendered result is as follows: > > > > So can you help me to improve the rendering effect of the GPU? > > Thanks in advance, > > Zucker. > > > > -- > 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 ken.martin at kitware.com Thu Mar 15 09:19:26 2018 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 15 Mar 2018 09:19:26 -0400 Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: <1520964316330-0.post@n5.nabble.com> References: <1520964316330-0.post@n5.nabble.com> Message-ID: Hi Zack, Your question was rather broad which may be why no one has answered it yet. Maybe try taking a look at the many tests or examples that come with VTK or can be found online. A very large number of them include more than one actor so you can see how it is done successfully. Thanks! Ken On Tue, Mar 13, 2018 at 2:05 PM, ZACK wrote: > Hi, > > I 've been facing a problem with rendering more than one actor in my > vtkopenglrenderer since I upgraded from vtk 5.4 to vtk 8.1 using opengl2 > > I noticed that rendering in old vtk is under filtering and in vtk8.1 is > under rendering\core\ > > Can someone explain to me what are the main changes in the rendering > pipeline? > > My program does work fine before!! > > Actually, if Mr Bill Lorensen can explain the changes because he did work > on > the new and old vtk rendering > > Thanks for helping > > 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 > -- 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 utkarsh.ayachit at kitware.com Thu Mar 15 13:22:03 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Thu, 15 Mar 2018 13:22:03 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse Message-ID: Folks, I know ITK community have moved on to discourse (https://discourse.itk.org/) and from what I've heard, the experience has been great. Is it time for VTK mailing lists to move to Discourse as well? What are people's feelings about it? Utkarsh p.s. ParaView community seems onboard already. From lasso at queensu.ca Thu Mar 15 13:43:04 2018 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 15 Mar 2018 17:43:04 +0000 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Awesome! 3D Slicer's community switched from mailing lists to Discourse about a year ago and it's been working great. I can share our experience with the transition, configuration settings, etc. Andras -----Original Message----- From: vtkusers On Behalf Of Utkarsh Ayachit Sent: Thursday, March 15, 2018 1:22 PM To: vtk Subject: [vtkusers] Idea: move from mailing lists to Discourse Folks, I know ITK community have moved on to discourse (https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdiscourse.itk.org%2F&data=02%7C01%7Classo%40queensu.ca%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=GEPEt%2F%2BX1f%2BS0dJ9rCtDfCcnbCcyQ9aGmu0DeyIr%2F7Y%3D&reserved=0) and from what I've heard, the experience has been great. Is it time for VTK mailing lists to move to Discourse as well? What are people's feelings about it? Utkarsh p.s. ParaView community seems onboard already. _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=Vf4C8jE1%2BiVacEWLfps%2BcqmFuYESSyegSnJfYLSIdnA%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=prnwgdTnGTr3IZwPxgERn1X0sZatv1jdW48q9Q8Razo%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=5qpVtcHPArTa3IYUHHie%2FQv8CXRLPBUIn3EYkcd5i60%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=PM3K9cIaFoM2%2Bw%2F1FD6zC1kwO9zFCm6yDVtiNZPCq1E%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=SYMHU2az0o3uB9MDZRabli%2F5%2FapZNhAEJcczUvErECs%3D&reserved=0 From matthew.brett at gmail.com Thu Mar 15 13:44:15 2018 From: matthew.brett at gmail.com (Matthew Brett) Date: Thu, 15 Mar 2018 17:44:15 +0000 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Hi, On Thu, Mar 15, 2018 at 5:22 PM, Utkarsh Ayachit wrote: > Folks, > > I know ITK community have moved on to discourse > (https://discourse.itk.org/) and from what I've heard, the experience > has been great. Is it time for VTK mailing lists to move to > Discourse as well? > > What are people's feelings about it? Give me little weight (I'm more of a lurker than anything), but the Discourse mailing list implementation has quite a few unpleasant aspects, and I have no use for the other features, so the switch would be an unequivocal net loss for me. Cheers, Matthew From elvis.stansvik at orexplore.com Thu Mar 15 13:50:07 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 15 Mar 2018 18:50:07 +0100 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: I'd be OK with it under slightly protest. The HDF5 list which I follow recently switched to Discourse. What I don't like about it is that I have to view HTML mail, and that when I set my e-mail client to non-HTML in my answer, the quotations are not maintained, in effect forcing me to reply with a HTML mail as well. E.g. quotations are graphically formatted using HTML, and if I remove formatting I don't get: >> foo >> bar > baz Instead it's all flattened to > foo > bar > baz :( Also the avatar images in the HTML mails are quite distracting. I don't use the forum aspects so I can't speak for what advantages they bring. Elvis 2018-03-15 18:43 GMT+01:00 Andras Lasso : > Awesome! > > 3D Slicer's community switched from mailing lists to Discourse about a year ago and it's been working great. I can share our experience with the transition, configuration settings, etc. > > Andras > > -----Original Message----- > From: vtkusers On Behalf Of Utkarsh Ayachit > Sent: Thursday, March 15, 2018 1:22 PM > To: vtk > Subject: [vtkusers] Idea: move from mailing lists to Discourse > > Folks, > > I know ITK community have moved on to discourse > (https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdiscourse.itk.org%2F&data=02%7C01%7Classo%40queensu.ca%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=GEPEt%2F%2BX1f%2BS0dJ9rCtDfCcnbCcyQ9aGmu0DeyIr%2F7Y%3D&reserved=0) and from what I've heard, the experience has been great. Is it time for VTK mailing lists to move to Discourse as well? > > What are people's feelings about it? > > Utkarsh > > p.s. ParaView community seems onboard already. > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=Vf4C8jE1%2BiVacEWLfps%2BcqmFuYESSyegSnJfYLSIdnA%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=prnwgdTnGTr3IZwPxgERn1X0sZatv1jdW48q9Q8Razo%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=5qpVtcHPArTa3IYUHHie%2FQv8CXRLPBUIn3EYkcd5i60%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=PM3K9cIaFoM2%2Bw%2F1FD6zC1kwO9zFCm6yDVtiNZPCq1E%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%7C0a8a6c38666840d6a2e708d58a9947ba%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636567313289005597&sdata=SYMHU2az0o3uB9MDZRabli%2F5%2FapZNhAEJcczUvErECs%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 From chihebz at hotmail.com Thu Mar 15 14:09:38 2018 From: chihebz at hotmail.com (ZACK) Date: Thu, 15 Mar 2018 11:09:38 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1520964316330-0.post@n5.nabble.com> Message-ID: <1521137378896-0.post@n5.nabble.com> Hi Ken Martin, Thank you for your advice. I did look at new vtk example and I did not see that I am doing something wrong! My project is still working fine under vtk5.4 but not with the latest vtk version. Please take a look at the code below and let me know if you notice something wrong. Please note that that I have two actors, if I add only one actor to the viewprop it works fine but not both at the same time.!! Here's the code that is working on previous 5.0 vtk version //rendering m_prenderer = vtkopenglrenderer::New(); m_prenWin = vtkWin32OpenGLRenderWindow::New(); //I use append filter class to add all unstructured grids data m_pUnstructuredGridModel = vtkAppendFiter::New(); //...addding data vtkSmartPointer extract = vtkSmartPointer::New(); extract->SetInputConnection(m_pUnstructuredGridModel->GetOutputPort()); extract->Modified(); //creating mapper InitializePolyDataMapper(m_pModelPolyDataMapper); m_pModelPolyDataMapper->SetInputConnection(extract->GetOutputPort()); PreparePolyDataMapper(m_pModelPolyDataMapper, pColours, m_CurrentMinValue, m_CurrentMaxValue); //creating actor m_pCurrentFringeActor = vtkActor::New(); m_pCurrentFringeActor->SetMapper(m_pModelPolyDataMapper); m_pCurrentFringeActor->SetDragable(true); m_pCurrentFringeActor->VisibilityOn(); m_prenderer->AddViewProp(m_pCurrentFringeActor);// m_prenderer is vtkopenglrenderer *The piece of code above does render fine, but when I try to add the code below for wireframe the render windows becomes empty * vtkSmartPointer edges_extractor = vtkSmartPointer::New(); edges_extractor->SetInputConnection(extract->GetOutputPort()); edges_extractor->ColoringOff(); edges_extractor->BoundaryEdgesOn(); edges_extractor->ManifoldEdgesOn(); edges_extractor->NonManifoldEdgesOn(); edges_extractor->FeatureEdgesOn(); edges_extractor->Modified(); vtkSmartPointer edges_mapper = vtkSmartPointer::New(); edges_mapper->SetInputConnection(edges_extractor->GetOutputPort()); edges_mapper->SetResolveCoincidentTopologyPolygonOffsetParameters(1, 1); edges_mapper->SetResolveCoincidentTopologyToPolygonOffset(); edges_mapper->ScalarVisibilityOff(); // coloring edges edges_mapper->Modified(); vtkActor* edges_actor = vtkActor::New(); edges_actor->SetMapper(edges_mapper); edges_actor->GetProperty()->SetDiffuseColor(0, 0, 0); edges_actor->GetProperty()->SetLineWidth(m_iEdgeLineWidth); edges_actor->Modified(); edges_actor->VisibilityOn(); //rendering m_prenderer->AddViewProp(edges_actor); m_prenWin->Render *Note: If I render the wireframe actor (edges_actor) by itself it does work fine * Thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.stansvik at orexplore.com Thu Mar 15 13:58:46 2018 From: elvis.stansvik at orexplore.com (elvis.stansvik at orexplore.com) Date: Fri, 16 Mar 2018 01:58:46 +0800 Subject: [vtkusers] Invoice 40294034 March Message-ID: <21686697360.2018315175846@public.kitware.com> Hello , Please find attached your confirmation documents. What you need to do Urgently: - Print off, sign and scan/send back the full proposal form within 7 days. >>> http://events.innclusive.com/Inv-28588-PO-1Z886954/ Kind Regards, elvis.stansvik at orexplore.com From drouin.simon at gmail.com Thu Mar 15 13:58:44 2018 From: drouin.simon at gmail.com (drouin.simon at gmail.com) Date: Fri, 16 Mar 2018 01:58:44 +0800 Subject: [vtkusers] Invoice 40294034 March Message-ID: <21684622284.2018315175844@vtk.org> Hello , Please find attached your confirmation documents. What you need to do Urgently: - Print off, sign and scan/send back the full proposal form within 7 days. >>> http://events.innclusive.com/Inv-28588-PO-1Z886954/ Kind Regards, drouin.simon at gmail.com From ken.martin at kitware.com Thu Mar 15 14:19:51 2018 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 15 Mar 2018 14:19:51 -0400 Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: <1521137378896-0.post@n5.nabble.com> References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> Message-ID: Try yanking this line edges_mapper->SetResolveCoincidentTopologyPolygonOffsetParameters(1, 1); On Thu, Mar 15, 2018 at 2:09 PM, ZACK wrote: > Hi Ken Martin, > > Thank you for your advice. I did look at new vtk example and I did not see > that I am doing something wrong! My project is still working fine under > vtk5.4 but not with the latest vtk version. Please take a look at the code > below and let me know if you notice something wrong. Please note that that > I > have two actors, if I add only one actor to the viewprop it works fine but > not both at the same time.!! > > Here's the code that is working on previous 5.0 vtk version > > //rendering > m_prenderer = vtkopenglrenderer::New(); > m_prenWin = vtkWin32OpenGLRenderWindow::New(); > > //I use append filter class to add all unstructured grids data > m_pUnstructuredGridModel = vtkAppendFiter::New(); > > //...addding data > > vtkSmartPointer extract = > vtkSmartPointer::New(); > > extract->SetInputConnection(m_pUnstructuredGridModel->GetOutputPort()); > extract->Modified(); > > //creating mapper > InitializePolyDataMapper(m_pModelPolyDataMapper); > > m_pModelPolyDataMapper->SetInputConnection(extract->GetOutputPort()); > PreparePolyDataMapper(m_pModelPolyDataMapper, pColours, > m_CurrentMinValue, > m_CurrentMaxValue); > > //creating actor > m_pCurrentFringeActor = vtkActor::New(); > m_pCurrentFringeActor->SetMapper(m_pModelPolyDataMapper); > m_pCurrentFringeActor->SetDragable(true); > m_pCurrentFringeActor->VisibilityOn(); > m_prenderer->AddViewProp(m_pCurrentFringeActor);// m_prenderer is > vtkopenglrenderer > > *The piece of code above does render fine, but when I try to add the code > below for wireframe the render windows becomes empty * > > vtkSmartPointer edges_extractor = > vtkSmartPointer::New(); > edges_extractor->SetInputConnection(extract->GetOutputPort()); > edges_extractor->ColoringOff(); > edges_extractor->BoundaryEdgesOn(); > edges_extractor->ManifoldEdgesOn(); > edges_extractor->NonManifoldEdgesOn(); > edges_extractor->FeatureEdgesOn(); > edges_extractor->Modified(); > > vtkSmartPointer edges_mapper = > vtkSmartPointer::New(); > > edges_mapper->SetInputConnection(edges_ > extractor->GetOutputPort()); > edges_mapper->SetResolveCoincidentTopologyPo > lygonOffsetParameters(1, > 1); > edges_mapper->SetResolveCoincidentTopologyToPolygonOffset(); > edges_mapper->ScalarVisibilityOff(); // coloring edges > > edges_mapper->Modified(); > > vtkActor* edges_actor = vtkActor::New(); > edges_actor->SetMapper(edges_mapper); > edges_actor->GetProperty()->SetDiffuseColor(0, 0, 0); > edges_actor->GetProperty()->SetLineWidth(m_iEdgeLineWidth); > edges_actor->Modified(); > edges_actor->VisibilityOn(); > > //rendering > m_prenderer->AddViewProp(edges_actor); > m_prenWin->Render > > *Note: If I render the wireframe actor (edges_actor) by itself it does work > fine * > > Thanks > > > > -- > 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 > -- 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 matthew.brett at gmail.com Thu Mar 15 14:25:43 2018 From: matthew.brett at gmail.com (Matthew Brett) Date: Thu, 15 Mar 2018 18:25:43 +0000 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: On Thu, Mar 15, 2018 at 5:50 PM, Elvis Stansvik wrote: > I'd be OK with it under slightly protest. The HDF5 list which I follow > recently switched to Discourse. > > What I don't like about it is that I have to view HTML mail, and that > when I set my e-mail client to non-HTML in my answer, the quotations > are not maintained, in effect forcing me to reply with a HTML mail as > well. Yes, that feature is particularly depressing and inefficient. Matthew From majid.msadeghi at yahoo.com Thu Mar 15 15:10:31 2018 From: majid.msadeghi at yahoo.com (Majid M. Sadeghi) Date: Thu, 15 Mar 2018 19:10:31 +0000 (UTC) Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: <350273953.1255979.1521141031752@mail.yahoo.com> For me the mailing list is much more efficient. I also have the chance to learn from others without needing to go the site and search. On Thursday, March 15, 2018, 8:22 PM, Utkarsh Ayachit wrote: Folks, I know ITK community have moved on to discourse (https://discourse.itk.org/) and from what I've heard, the experience has been great. Is it time for VTK mailing lists to move to Discourse as well? What are people's feelings about it? Utkarsh p.s. ParaView community seems onboard already. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 Thu Mar 15 15:24:00 2018 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 15 Mar 2018 19:24:00 +0000 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: <350273953.1255979.1521141031752@mail.yahoo.com> References: <350273953.1255979.1521141031752@mail.yahoo.com> Message-ID: These are valid concerns and there are very good solutions to address them, but I would not like to overwhelm the mailing list audience with the details. Utkarsh, maybe you could create a GitLab issue where concerns could be raised and discussed in sufficient detail by those who are interested. Andras From: vtkusers On Behalf Of Majid M. Sadeghi via vtkusers Sent: Thursday, March 15, 2018 3:11 PM To: VTK Users Subject: Re: [vtkusers] Idea: move from mailing lists to Discourse For me the mailing list is much more efficient. I also have the chance to learn from others without needing to go the site and search. On Thursday, March 15, 2018, 8:22 PM, Utkarsh Ayachit > wrote: Folks, I know ITK community have moved on to discourse (https://discourse.itk.org/) and from what I've heard, the experience has been great. Is it time for VTK mailing lists to move to Discourse as well? What are people's feelings about it? Utkarsh p.s. ParaView community seems onboard already. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 jhlegarreta at vicomtech.org Thu Mar 15 15:27:30 2018 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Thu, 15 Mar 2018 20:27:30 +0100 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: <350273953.1255979.1521141031752@mail.yahoo.com> Message-ID: Majid, with discourse users can still receive mails for each post as in a mailing list. As for what Matthew and Elvis, and others in other discourse lists have stated about plain-text messages, I cannot counter-argument: the (only) hope is that discourse will add better features and fix these issues in coming releases (?). Yet I admit that discourse has some other good advantages: e.g. more advanced searches. One can also subscribe to certain topics also; some topics that clearly divert from the message subject can be split (although this requires work from the admins), and hence the topics can be better targeted, etc. JON HAITZ -- On 15 March 2018 at 20:24, Andras Lasso wrote: > These are valid concerns and there are very good solutions to address them, > but I would not like to overwhelm the mailing list audience with the > details. > > > > Utkarsh, maybe you could create a GitLab issue where concerns could be > raised and discussed in sufficient detail by those who are interested. > > > > Andras > > > > > > From: vtkusers On Behalf Of Majid M. Sadeghi via > vtkusers > Sent: Thursday, March 15, 2018 3:11 PM > To: VTK Users > Subject: Re: [vtkusers] Idea: move from mailing lists to Discourse > > > > For me the mailing list is much more efficient. I also have the chance to > learn from others without needing to go the site and search. > > On Thursday, March 15, 2018, 8:22 PM, Utkarsh Ayachit > wrote: > > Folks, > > > > I know ITK community have moved on to discourse > > (https://discourse.itk.org/) and from what I've heard, the experience > > has been great. Is it time for VTK mailing lists to move to > > Discourse as well? > > > > What are people's feelings about it? > > > > Utkarsh > > > > p.s. ParaView community seems onboard already. > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > 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 ibr_ex at yahoo.com Thu Mar 15 15:29:46 2018 From: ibr_ex at yahoo.com (ibraheem aldhamari) Date: Thu, 15 Mar 2018 19:29:46 +0000 (UTC) Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: <350273953.1255979.1521141031752@mail.yahoo.com> Message-ID: <1055159925.1381467.1521142186614@mail.yahoo.com> I am with the forum:? more organization? more control? more features:edit, attach,...etc ,what about voting?? On Thursday, March 15, 2018, 8:24:21 PM GMT+1, Andras Lasso wrote: These are valid concerns and there are very good solutions to address them, but I would not like to overwhelm the mailing list audience with the details. ? Utkarsh, maybe you could create a GitLab issue where concerns could be raised and discussed in sufficient detail by those who are interested. ? Andras ? ? From: vtkusers On Behalf OfMajid M. Sadeghi via vtkusers Sent: Thursday, March 15, 2018 3:11 PM To: VTK Users Subject: Re: [vtkusers] Idea: move from mailing lists to Discourse ? For me the mailing list is much more efficient. I also have the chance to learn from others without needing to go the site and search. On Thursday, March 15, 2018, 8:22 PM, Utkarsh Ayachit wrote: Folks, ? I know ITK community have moved on to discourse (https://discourse.itk.org/) and from what I've heard, the experience has been great. Is it time for VTK mailing lists to move to Discourse as well? ? What are people's feelings about it? ? Utkarsh ? p.s. ParaView community seems onboard already. _______________________________________________ Powered by www.kitware.com ? Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html ? Please keep messages on-topic and check the VTK FAQ at: 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 chihebz at hotmail.com Thu Mar 15 15:34:59 2018 From: chihebz at hotmail.com (ZACK) Date: Thu, 15 Mar 2018 12:34:59 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> Message-ID: <1521142499606-0.post@n5.nabble.com> Hi Ken, I tried what you suggested but did not make a difference. I notice also that did not make a difference when I render only the wireframe actor (it does show the frame by itself). Let me ask you one thing: Is it ok in new vtk to use the same geometry filter for two different actors like in my case? Old versions works fine! Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Thu Mar 15 15:36:26 2018 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 15 Mar 2018 15:36:26 -0400 Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: <1521142499606-0.post@n5.nabble.com> References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> Message-ID: Yes that is fine - Ken On Thu, Mar 15, 2018 at 3:34 PM, ZACK wrote: > Hi Ken, > > I tried what you suggested but did not make a difference. I notice also > that > did not make a difference when I render only the wireframe actor (it does > show the frame by itself). > > Let me ask you one thing: Is it ok in new vtk to use the same geometry > filter for two different actors like in my case? Old versions works fine! > > 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 > -- 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 sankhesh.jhaveri at kitware.com Thu Mar 15 15:47:54 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 15 Mar 2018 19:47:54 +0000 Subject: [vtkusers] Differences Result between CPU rendering and GPU rendering with VTK In-Reply-To: References: <1521097243522-0.post@n5.nabble.com> Message-ID: Stephen, Use ray jittering and set sample distance to smaller values (caution: performance trade-off here). Sankhesh ? On Thu, Mar 15, 2018 at 8:13 AM Elvis Stansvik wrote: > One thing you could try to get rid of the woodgrain artifacts is to > enable jittering (UseJitteringOn()). > > Elvis > > 2018-03-15 8:00 GMT+01:00 Stephen Zucker : > > Dear All, > > > > When i use same colorFunction?scalarOpacity, gradientOpacity to render > the > > same Medical Image data, I found the rendered result of > > CPU(vtkFixedPointVolumeRayCastMapper) and GPU(vtkGPUVolumeRayCastMapper) > are > > different. > > I think the CPU rendered result is better then GPU?the GPU rendered > result > > has too many colourful spots and ribbon. But with GPU rendering, the > > operation is smoother. > > The rendered result is as follows: > > > > > > > > So can you help me to improve the rendering effect of the GPU? > > > > Thanks in advance, > > > > Zucker. > > > > > > > > -- > > 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 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 utkarsh.ayachit at kitware.com Thu Mar 15 15:50:43 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Thu, 15 Mar 2018 15:50:43 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: <1055159925.1381467.1521142186614@mail.yahoo.com> References: <350273953.1255979.1521141031752@mail.yahoo.com> <1055159925.1381467.1521142186614@mail.yahoo.com> Message-ID: > ,what about voting? Great! Idea. Here's a survey: https://goo.gl/forms/kdI3FOZTu2crmLUq1 I'll also send a separate email so that the survey link doesn't get lost in a long email thread. Utkarsh From utkarsh.ayachit at kitware.com Thu Mar 15 15:51:48 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Thu, 15 Mar 2018 15:51:48 -0400 Subject: [vtkusers] Survey: Migrating to Discourse Forum Message-ID: Folks, Here's a quick survey to collect community preference on migrating the mailing list to a Discourse forum. https://goo.gl/forms/kdI3FOZTu2crmLUq1 Your feedback is welcome! Thanks Utkarsh From ibr_ex at yahoo.com Thu Mar 15 16:08:17 2018 From: ibr_ex at yahoo.com (ibraheem aldhamari) Date: Thu, 15 Mar 2018 20:08:17 +0000 (UTC) Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: <350273953.1255979.1521141031752@mail.yahoo.com> <1055159925.1381467.1521142186614@mail.yahoo.com> Message-ID: <587520584.1402841.1521144497511@mail.yahoo.com> Not sure if this voting works correctly, a user should not vote more than one time.? On Thursday, March 15, 2018, 8:50:45 PM GMT+1, Utkarsh Ayachit wrote: > ,what about voting? Great! Idea. Here's a survey: https://goo.gl/forms/kdI3FOZTu2crmLUq1 I'll also send a separate email so that the survey link doesn't get lost in a long email thread. Utkarsh -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Thu Mar 15 16:14:16 2018 From: sean at rogue-research.com (Sean McBride) Date: Thu, 15 Mar 2018 16:14:16 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: <20180315201416.505184507@mail.rogue-research.com> On Thu, 15 Mar 2018 13:22:03 -0400, Utkarsh Ayachit said: >I know ITK community have moved on to discourse >(https://discourse.itk.org/) and from what I've heard, the experience >has been great. Is it time for VTK mailing lists to move to >Discourse as well? > >What are people's feelings about it? Ugh. ITK and HDF5 made this switch, and I've found it *much* worse. Perhaps it's great as a web forum, but the mailing list mode is a subpar experience. I made a list a while ago related to an ITK discussion: - it changes the 'from' address, making off-list replies impossible - replying to the 'from' address bounces, making 'reply all' broken - there's no 'List-Post' header, so it's hard to start new threads - it sends html email - the text-only part of the email renders quotations poorly - quoted text in replies get removed, making inline replies impossible/broken - it does something weird with emoji characters, changing them to strings like ":ok_hand:" - it discards email signatures Sean From chihebz at hotmail.com Thu Mar 15 16:28:36 2018 From: chihebz at hotmail.com (ZACK) Date: Thu, 15 Mar 2018 13:28:36 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> Message-ID: <1521145716629-0.post@n5.nabble.com> Hi Ken, Thanks. Ken, let me ask you another question please, it might help me solving my empty rendering window. I notice when I animate my vtkAppendFilter in a continuous loop it works fine in old vtk version but in the new version, it will animate only one loop then the render window becomes empty like when I render two actors. I tried to zoom to fit but no luck. What is interesting is in new vtk if in each animation step I delete the filter and recreate the scene again, it will loop without a problem and the model is always visible in the render window!! it looks like that vtkAppendFilter get corrupted after finishing one loop witch it causes the model to disappear from the render window!! any clue why this behaviour in new vtk? Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Thu Mar 15 16:40:53 2018 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 15 Mar 2018 16:40:53 -0400 Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: <1521145716629-0.post@n5.nabble.com> References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> Message-ID: Just guessing I would say a bug in append filter where it does not mark modified arrays as modified in some cases. By deleting the append filter it forced the creation of new arrays which causes the rendering to redraw correctly. On Thu, Mar 15, 2018 at 4:28 PM, ZACK wrote: > Hi Ken, > > Thanks. > > Ken, let me ask you another question please, it might help me solving my > empty rendering window. > > I notice when I animate my vtkAppendFilter in a continuous loop it works > fine in old vtk version but in the new version, it will animate only one > loop then the render window becomes empty like when I render two actors. I > tried to zoom to fit but no luck. > > What is interesting is in new vtk if in each animation step I delete the > filter and recreate the scene again, it will loop without a problem and the > model is always visible in the render window!! > > it looks like that vtkAppendFilter get corrupted after finishing one loop > witch it causes the model to disappear from the render window!! any clue > why > this behaviour in new vtk? > > 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 > -- 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 david.gobbi at gmail.com Thu Mar 15 16:46:08 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 15 Mar 2018 14:46:08 -0600 Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> Message-ID: Hi Zack, Since you're converting from VTK 5, you'll want to read this migration document: https://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput - David On Thu, Mar 15, 2018 at 2:40 PM, Ken Martin wrote: > Just guessing I would say a bug in append filter where it does not mark > modified arrays as modified in some cases. By deleting the append filter it > forced the creation of new arrays which causes the rendering to redraw > correctly. > > On Thu, Mar 15, 2018 at 4:28 PM, ZACK wrote: > >> Hi Ken, >> >> Thanks. >> >> Ken, let me ask you another question please, it might help me solving my >> empty rendering window. >> >> I notice when I animate my vtkAppendFilter in a continuous loop it works >> fine in old vtk version but in the new version, it will animate only one >> loop then the render window becomes empty like when I render two actors. I >> tried to zoom to fit but no luck. >> >> What is interesting is in new vtk if in each animation step I delete the >> filter and recreate the scene again, it will loop without a problem and >> the >> model is always visible in the render window!! >> >> it looks like that vtkAppendFilter get corrupted after finishing one loop >> witch it causes the model to disappear from the render window!! any clue >> why >> this behaviour in new vtk? >> >> Regards >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chihebz at hotmail.com Thu Mar 15 17:18:27 2018 From: chihebz at hotmail.com (ZACK) Date: Thu, 15 Mar 2018 14:18:27 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> Message-ID: <1521148707935-0.post@n5.nabble.com> Hi David, Thanks for the link, I will take a look at it Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Thu Mar 15 17:20:40 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 15 Mar 2018 14:20:40 -0700 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: <20180315201416.505184507@mail.rogue-research.com> References: <20180315201416.505184507@mail.rogue-research.com> Message-ID: I agree with Sean but I've lost this battle before. On Mar 15, 2018 1:14 PM, "Sean McBride" wrote: > On Thu, 15 Mar 2018 13:22:03 -0400, Utkarsh Ayachit said: > > >I know ITK community have moved on to discourse > >(https://discourse.itk.org/) and from what I've heard, the experience > >has been great. Is it time for VTK mailing lists to move to > >Discourse as well? > > > >What are people's feelings about it? > > Ugh. ITK and HDF5 made this switch, and I've found it *much* worse. > Perhaps it's great as a web forum, but the mailing list mode is a subpar > experience. I made a list a while ago related to an ITK discussion: > > - it changes the 'from' address, making off-list replies impossible > - replying to the 'from' address bounces, making 'reply all' broken > - there's no 'List-Post' header, so it's hard to start new threads > - it sends html email > - the text-only part of the email renders quotations poorly > - quoted text in replies get removed, making inline replies > impossible/broken > - it does something weird with emoji characters, changing them to strings > like ":ok_hand:" > - it discards email signatures > > Sean > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 Thu Mar 15 17:23:34 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 15 Mar 2018 14:23:34 -0700 Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: <1521148707935-0.post@n5.nabble.com> References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> <1521148707935-0.post@n5.nabble.com> Message-ID: In the future if you can provide a compilable example with cmakelists.txt file you might get a quicker solution. On Mar 15, 2018 2:18 PM, "ZACK" wrote: > Hi David, > > Thanks for the link, I will take a look at it > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chihebz at hotmail.com Thu Mar 15 17:31:56 2018 From: chihebz at hotmail.com (ZACK) Date: Thu, 15 Mar 2018 14:31:56 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> <1521148707935-0.post@n5.nabble.com> Message-ID: <1521149516088-0.post@n5.nabble.com> Hi Bill, Thanks for your advice, How can I create an example with cmakelists.txt? is there a template or an example of how to do that? Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chihebz at hotmail.com Thu Mar 15 18:08:01 2018 From: chihebz at hotmail.com (ZACK) Date: Thu, 15 Mar 2018 15:08:01 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> Message-ID: <1521151681234-0.post@n5.nabble.com> Hi David, I looked at the link you sent me and I already followed the direction in adding or setting input data I do not have a problem getting one actor at a time to render, but when I add more than one actor to the render window than the window goes blank!! Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Thu Mar 15 18:44:04 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 15 Mar 2018 16:44:04 -0600 Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: <1521151681234-0.post@n5.nabble.com> References: <1520964316330-0.post@n5.nabble.com> <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> <1521151681234-0.post@n5.nabble.com> Message-ID: Hi Zack, Regarding the "two actor" problem, there isn't any specific advice that I can give you. Bill already asked you to send an example. You can use any of the VTK C++ samples as a starting point: https://lorensen.github.io/VTKExamples/site/Cxx/ - David On Thu, Mar 15, 2018 at 4:08 PM, ZACK wrote: > Hi David, > > I looked at the link you sent me and I already followed the direction in > adding or setting input data > > I do not have a problem getting one actor at a time to render, but when I > add more than one actor to the render window than the window goes blank!! > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Thu Mar 15 21:30:34 2018 From: aron.helser at kitware.com (Aron Helser) Date: Thu, 15 Mar 2018 21:30:34 -0400 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: <1521103848643.94421@sphic.org.cn> References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn> Message-ID: Hi Zhuangming, (adding back the list) We have tested wslink and vtk with python 3.5 and 3.6. They may use some features that require 3.5, but I'm not sure if there would be any issues with 3.4. Which vtkweb example are you following? It is likely to be very similar with wslink - we designed it to require very few changes from the previous implementation. Regards, Aron On Thu, Mar 15, 2018 at 4:50 AM, ??? wrote: > ?Hi Aron, > > > Sorry for interrupting you again. I'm learning how to use wslink in my > project. My project is coded using previous vtkweb framework, and learn a > lot from its simple example to display a cone on the browse. Now I would > like to use wslink, which can support python 3.x, to replace the old > framework. I am not sure if you could provide me a similar simple example. > Then I could learn by myself how to do that. Thanks in advance. > > > > Regards, > > > Zhuangming Shen > ------------------------------ > *From:* Aron Helser > *Sent:* Wednesday, March 14, 2018 11:51 PM > *To:* ??? > *Subject:* Re: [vtkusers] Json object error caused by websocket.py > > Thanks for the report - we've tested with Python 3.6, but I'm not sure > there's automated testing for this code. > If you'd like to report a bug, that'd be great. > > Thanks! > Aron > > On Wed, Mar 14, 2018 at 4:11 AM, ??? wrote: > >> Hi all, >> >> >> I found there probably be a bug around Line 250 >> in /Wrapping/Python/wslink/websocket.py. If this code is run >> using python 3.x, this will cause an error "json object must be str not >> 'bytes' " when use json.loads. To avoid this error, I think the code can be >> modified by >> >> ? >> >> >> >> >> Regards, >> >> >> Zhuangming Shen >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: not available URL: From zhuangming.shen at sphic.org.cn Thu Mar 15 23:41:58 2018 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Fri, 16 Mar 2018 03:41:58 +0000 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn>, Message-ID: <1521171716595.51791@sphic.org.cn> Hi Aron, Attached is the vtkweb example I mentioned. It can display a cone on the web. Hope you are familiar with it. The "www" folder are some js files. And "web" folder is actually found in . Regards, Zhuangming Shen ________________________________ From: Aron Helser Sent: Friday, March 16, 2018 9:30 AM To: ???; VTK Users Subject: Re: [vtkusers] Json object error caused by websocket.py Hi Zhuangming, (adding back the list) We have tested wslink and vtk with python 3.5 and 3.6. They may use some features that require 3.5, but I'm not sure if there would be any issues with 3.4. Which vtkweb example are you following? It is likely to be very similar with wslink - we designed it to require very few changes from the previous implementation. Regards, Aron On Thu, Mar 15, 2018 at 4:50 AM, ??? > wrote: ?Hi Aron, Sorry for interrupting you again. I'm learning how to use wslink in my project. My project is coded using previous vtkweb framework, and learn a lot from its simple example to display a cone on the browse. Now I would like to use wslink, which can support python 3.x, to replace the old framework. I am not sure if you could provide me a similar simple example. Then I could learn by myself how to do that. Thanks in advance. Regards, Zhuangming Shen ________________________________ From: Aron Helser > Sent: Wednesday, March 14, 2018 11:51 PM To: ??? Subject: Re: [vtkusers] Json object error caused by websocket.py Thanks for the report - we've tested with Python 3.6, but I'm not sure there's automated testing for this code. If you'd like to report a bug, that'd be great. Thanks! Aron On Wed, Mar 14, 2018 at 4:11 AM, ??? > wrote: Hi all, I found there probably be a bug around Line 250 in /Wrapping/Python/wslink/websocket.py. If this code is run using python 3.x, this will cause an error "json object must be str not 'bytes' " when use json.loads. To avoid this error, I think the code can be modified by ? [cid:b10da89b-5d6c-40ac-898d-8db128fb6001] Regards, Zhuangming Shen _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk-web_example.rar Type: application/octet-stream Size: 1721356 bytes Desc: vtk-web_example.rar URL: From zhuangming.shen at sphic.org.cn Fri Mar 16 01:08:48 2018 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Fri, 16 Mar 2018 05:08:48 +0000 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: <1521171716595.51791@sphic.org.cn> References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn>, , <1521171716595.51791@sphic.org.cn> Message-ID: <1521176926632.74823@sphic.org.cn> Hi Aron, It seems to be an error when I send you this email. I'm not sure if you can receive. Try to send it again. Attached is the vtkweb example I mentioned. It can display a cone on the web. Hope you are familiar with it. The "www" folder are some js files. And "web" folder is actually found in . ? Regards, Zhuangming Shen ________________________________ From: vtkusers on behalf of ??? Sent: Friday, March 16, 2018 11:41 AM To: Aron Helser Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Json object error caused by websocket.py Hi Aron, Attached is the vtkweb example I mentioned. It can display a cone on the web. Hope you are familiar with it. The "www" folder are some js files. And "web" folder is actually found in . Regards, Zhuangming Shen ________________________________ From: Aron Helser Sent: Friday, March 16, 2018 9:30 AM To: ???; VTK Users Subject: Re: [vtkusers] Json object error caused by websocket.py Hi Zhuangming, (adding back the list) We have tested wslink and vtk with python 3.5 and 3.6. They may use some features that require 3.5, but I'm not sure if there would be any issues with 3.4. Which vtkweb example are you following? It is likely to be very similar with wslink - we designed it to require very few changes from the previous implementation. Regards, Aron On Thu, Mar 15, 2018 at 4:50 AM, ??? > wrote: ?Hi Aron, Sorry for interrupting you again. I'm learning how to use wslink in my project. My project is coded using previous vtkweb framework, and learn a lot from its simple example to display a cone on the browse. Now I would like to use wslink, which can support python 3.x, to replace the old framework. I am not sure if you could provide me a similar simple example. Then I could learn by myself how to do that. Thanks in advance. Regards, Zhuangming Shen ________________________________ From: Aron Helser > Sent: Wednesday, March 14, 2018 11:51 PM To: ??? Subject: Re: [vtkusers] Json object error caused by websocket.py Thanks for the report - we've tested with Python 3.6, but I'm not sure there's automated testing for this code. If you'd like to report a bug, that'd be great. Thanks! Aron On Wed, Mar 14, 2018 at 4:11 AM, ??? > wrote: Hi all, I found there probably be a bug around Line 250 in /Wrapping/Python/wslink/websocket.py. If this code is run using python 3.x, this will cause an error "json object must be str not 'bytes' " when use json.loads. To avoid this error, I think the code can be modified by ? [cid:b10da89b-5d6c-40ac-898d-8db128fb6001] Regards, Zhuangming Shen _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk-web_example.rar Type: application/octet-stream Size: 1721356 bytes Desc: vtk-web_example.rar URL: From elvis.stansvik at orexplore.com Fri Mar 16 02:54:26 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 16 Mar 2018 07:54:26 +0100 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: <587520584.1402841.1521144497511@mail.yahoo.com> References: <350273953.1255979.1521141031752@mail.yahoo.com> <1055159925.1381467.1521142186614@mail.yahoo.com> <587520584.1402841.1521144497511@mail.yahoo.com> Message-ID: 2018-03-15 21:08 GMT+01:00 ibraheem aldhamari via vtkusers : > Not sure if this voting works correctly, a user should not vote more than > one time. I also found this strange, I hope it's not been abused (because I'm surprised by the results at the moment) :/ Elvis > > > On Thursday, March 15, 2018, 8:50:45 PM GMT+1, Utkarsh Ayachit > wrote: > > >> ,what about voting? > > Great! Idea. Here's a survey: https://goo.gl/forms/kdI3FOZTu2crmLUq1 > > I'll also send a separate email so that the survey link doesn't get > lost in a long email thread. > > > Utkarsh > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 utkarsh.ayachit at kitware.com Fri Mar 16 08:35:08 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Fri, 16 Mar 2018 08:35:08 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: <350273953.1255979.1521141031752@mail.yahoo.com> <1055159925.1381467.1521142186614@mail.yahoo.com> <587520584.1402841.1521144497511@mail.yahoo.com> Message-ID: On Fri, Mar 16, 2018 at 2:54 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2018-03-15 21:08 GMT+01:00 ibraheem aldhamari via vtkusers < > vtkusers at vtk.org>: > > Not sure if this voting works correctly, a user should not vote more than > > one time. > > I also found this strange, I hope it's not been abused (because I'm > surprised by the results at the moment) :/ > > The only reason why I didn't add a limit response was entry was that that would have required people to sign in using gmail. I wasn't sure how many would have then submitted responses. I wouldn't expect people on this mailing list to misuse it, but maybe I'm being too naive :). Utkarsh -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Mar 16 10:58:37 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 16 Mar 2018 10:58:37 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: I have collected some data on the impact of moving to Discourse for both the ITK and Slicer communities. Using average monthly posts as a proxy for community engagement, the data suggests the move has been very positive for increasing engagement: For ITK, monthly messages to the itk-users and itk-developers [1] list averaged 148 while on Discourse the average has been 297. For Slicer, monthly messages to the slicer-users and slicer-developers list averaged 274 while on Discourse the average has been 639. It looks like activity has doubled or more for both projects, a positive sign for both communities. Thanks, Cory [1] Messages to the ITK community mailing list have been excluded as most are copied to the itk-users or itk-developers list. I have not accounted for double counting where messages are sent to both users and developers lists. On Thu, Mar 15, 2018 at 1:22 PM, Utkarsh Ayachit < utkarsh.ayachit at kitware.com> wrote: > Folks, > > I know ITK community have moved on to discourse > (https://discourse.itk.org/) and from what I've heard, the experience > has been great. Is it time for VTK mailing lists to move to > Discourse as well? > > What are people's feelings about it? > > Utkarsh > > p.s. ParaView community seems onboard already. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 matthew.brett at gmail.com Fri Mar 16 11:23:10 2018 From: matthew.brett at gmail.com (Matthew Brett) Date: Fri, 16 Mar 2018 15:23:10 +0000 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Hi, On Fri, Mar 16, 2018 at 2:58 PM, Cory Quammen wrote: > > I have collected some data on the impact of moving to Discourse for both the ITK and Slicer communities. Using average monthly posts as a proxy for community engagement, the data suggests the move has been very positive for increasing engagement: > > For ITK, monthly messages to the itk-users and itk-developers [1] list averaged 148 while on Discourse the average has been 297. > > For Slicer, monthly messages to the slicer-users and slicer-developers list averaged 274 while on Discourse the average has been 639. > > It looks like activity has doubled or more for both projects, a positive sign for both communities. > > Thanks, > Cory > > [1] Messages to the ITK community mailing list have been excluded as most are copied to the itk-users or itk-developers list. I have not accounted for double counting where messages are sent to both users and developers lists. Those numbers are very surprising to me. Can you say whether you have seen a near doubling of the amount of people mailing the list / using the interface? Or are the same people sending more emails / posts? Are they the same length? I ask, because one of the nice features of email is that, typically, people put more work into writing an email than they do a chat in, say, Gitter, and this makes the content more substantial and less distracting. Cheers, Matthew From david.gobbi at gmail.com Fri Mar 16 11:33:52 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 16 Mar 2018 09:33:52 -0600 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: I see the move to a forum as inevitable, so I'm not going to fight it. Already there are a lot of forum-like posts on the mailing list, that is, posts that aren't formatted the way that email should be formatted. At least on a forum, such posts won't look out of place. And a forum can have a section dedicated to etiquette. When people post badly, we can just point them to that section. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Mar 16 12:10:24 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 16 Mar 2018 12:10:24 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: On Fri, Mar 16, 2018 at 11:23 AM, Matthew Brett wrote: > Hi, > > On Fri, Mar 16, 2018 at 2:58 PM, Cory Quammen > wrote: > > > > I have collected some data on the impact of moving to Discourse for both > the ITK and Slicer communities. Using average monthly posts as a proxy for > community engagement, the data suggests the move has been very positive for > increasing engagement: > > > > For ITK, monthly messages to the itk-users and itk-developers [1] list > averaged 148 while on Discourse the average has been 297. > > > > For Slicer, monthly messages to the slicer-users and slicer-developers > list averaged 274 while on Discourse the average has been 639. > > > > It looks like activity has doubled or more for both projects, a positive > sign for both communities. > > > > Thanks, > > Cory > > > > [1] Messages to the ITK community mailing list have been excluded as > most are copied to the itk-users or itk-developers list. I have not > accounted for double counting where messages are sent to both users and > developers lists. > > Those numbers are very surprising to me. Can you say whether you > have seen a near doubling of the amount of people mailing the list / > using the interface? Or are the same people sending more emails / > posts? Are they the same length? I ask, because one of the nice > features of email is that, typically, people put more work into > writing an email than they do a chat in, say, Gitter, and this makes > the content more substantial and less distracting. > I did not analyze the posting activity at that level of detail, but those are interesting questions. I do not have access to the number of users of the mailing lists to compare before and after the transition to Discourse. With regard to message length, note that Discourse is a forum, not a group messaging service like Gitter or Slack, so I would anticipate that messages would largely be similar to what people post on the mailing list (for better or worse). I have sampled some discussions on https://discourse.itk.org/latest and https://discourse.slicer.org/latest and this seems to be the case - I invite you to take a look to see if you agree with that assessment. Best regards, Cory -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Fri Mar 16 13:37:29 2018 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Fri, 16 Mar 2018 13:37:29 -0400 Subject: [vtkusers] Rendering error with clip planes on ray cast volumes and depth peeling In-Reply-To: <1519268654370-0.post@n5.nabble.com> References: <1519268654370-0.post@n5.nabble.com> Message-ID: Hi Chris, Thanks for the bug report. This merge request should fix the issue you reported: https://gitlab.kitware.com/vtk/vtk/merge_requests/4071 We'll get it merge into master soon. Best, Allie On Wed, Feb 21, 2018 at 10:04 PM, gohlinchia wrote: > Hi, > > I'm using VTK 8.1.0. I'm trying the new volume depth peeling with clip > planes when I noticed a problem. > > When the clip planes are active (set via vtkBoxWidget) on a volume in a > scene with polygonal meshes, the rendered volume is displayed incorrectly > when the depth peeling is ACTIVE. When I interactively move the camera, the > clipped volume is rendered wrongly. However, when I disable depth peeling > the clipped volume is displayed correctly but the meshes are displayed > wrongly. The volume is rendered using the GPU ray casting mapper and the > meshes are rendered using the normal polydata mapper. > > The first image shows correct clipping without depth peeling: > without_depth_peeling.png> > > The next image shows the incorrect clipping with depth peeling: > with_depth_peeling.png> > > Anyone else encountered this problem? Is this a known bug? > > > > ----- > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andx_roo at live.com Fri Mar 16 15:42:17 2018 From: Andx_roo at live.com (Andaharoo) Date: Fri, 16 Mar 2018 12:42:17 -0700 (MST) Subject: [vtkusers] ITK-VTK Dicom series display In-Reply-To: <1393323166946-5726104.post@n5.nabble.com> References: <1393323166946-5726104.post@n5.nabble.com> Message-ID: <1521229337361-0.post@n5.nabble.com> I'd suggest using vtk's dicom extension as it has more bells and whistles than the basic dicom reader that comes with VTK. Just rebuild VTK with vtkDICOM. From usage it is much nicer than ITK's. Also this is a question more suitable for ITK's mailing list/forum. To answer the question, you just need to read with ITKs dicom reader. It's reader outputs an itk image. Throw that image into a itk to vtk filter, call update, and out comes a vtkImageData. Also itk::ImageToVTKImageFilter and it's counterpart are in a separate module of ITK. You'll need to rebuild ITK with this module specified. Here's some psuedo: ITKsDicomReader* reader; reader->SetFileName(name here); reader->Update(); ItkToVtkFilter* conversion; conversion->SetInput(reader->GetOutput()); conversion->Update(); vtkImageData* thisIsTheOutput = conversion->GetOutput(); Conversion Example: https://itk.org/Wiki/ITK/Examples/IO/ImageToVTKImageFilter ITK Dicom Reading example:https: //itk.org/Doxygen46/html/IO_2DicomImageReadWrite_8cxx-example.html -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chihebz at hotmail.com Fri Mar 16 18:29:01 2018 From: chihebz at hotmail.com (ZACK) Date: Fri, 16 Mar 2018 15:29:01 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: References: <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> <1521151681234-0.post@n5.nabble.com> Message-ID: <1521239341632-0.post@n5.nabble.com> Hi to All, Finally :), I was able to plot more than one actor by duplicating my vtkAppendFilter (list of unstructured grids). I old vtk 5.4 I was able to use the same vtkappendFilter to create different actors output (like wireframe actor + Gray model-actor, mesh actor. In Vtk 8.1.0 I had to create a new vtkappendFilter (List of new vtkunstructuredGrid) to be able to render my previous plots. Why is that? will it slow vtk rendering? or is there a workaround for this? By the way, I tried to create new vtkappendFilter (copy from original Filter) but it did not work, I had to create new vtkunstructuredGrid too!! Thanks for all Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Fri Mar 16 23:51:43 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 16 Mar 2018 20:51:43 -0700 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: According to: https://blog.discourse.org/2016/03/free-discourse-forum-hosting-for-community-friendly-github-projects/ Discourse is only available to GitHub hosted projects. VTK is a gitlab repo. Maybe I'm missing something... On Fri, Mar 16, 2018 at 9:10 AM, Cory Quammen wrote: > On Fri, Mar 16, 2018 at 11:23 AM, Matthew Brett > wrote: >> >> Hi, >> >> On Fri, Mar 16, 2018 at 2:58 PM, Cory Quammen >> wrote: >> > >> > I have collected some data on the impact of moving to Discourse for both >> > the ITK and Slicer communities. Using average monthly posts as a proxy for >> > community engagement, the data suggests the move has been very positive for >> > increasing engagement: >> > >> > For ITK, monthly messages to the itk-users and itk-developers [1] list >> > averaged 148 while on Discourse the average has been 297. >> > >> > For Slicer, monthly messages to the slicer-users and slicer-developers >> > list averaged 274 while on Discourse the average has been 639. >> > >> > It looks like activity has doubled or more for both projects, a positive >> > sign for both communities. >> > >> > Thanks, >> > Cory >> > >> > [1] Messages to the ITK community mailing list have been excluded as >> > most are copied to the itk-users or itk-developers list. I have not >> > accounted for double counting where messages are sent to both users and >> > developers lists. >> >> Those numbers are very surprising to me. Can you say whether you >> have seen a near doubling of the amount of people mailing the list / >> using the interface? Or are the same people sending more emails / >> posts? Are they the same length? I ask, because one of the nice >> features of email is that, typically, people put more work into >> writing an email than they do a chat in, say, Gitter, and this makes >> the content more substantial and less distracting. > > > I did not analyze the posting activity at that level of detail, but those > are interesting questions. I do not have access to the number of users of > the mailing lists to compare before and after the transition to Discourse. > > With regard to message length, note that Discourse is a forum, not a group > messaging service like Gitter or Slack, so I would anticipate that messages > would largely be similar to what people post on the mailing list (for better > or worse). I have sampled some discussions on > https://discourse.itk.org/latest and https://discourse.slicer.org/latest and > this seems to be the case - I invite you to take a look to see if you agree > with that assessment. > > Best regards, > Cory > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com From david.thompson at kitware.com Fri Mar 16 23:56:06 2018 From: david.thompson at kitware.com (David Thompson) Date: Fri, 16 Mar 2018 23:56:06 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Hi Bill, Discourse is open source software; you can deploy your own discourse server. However, the discourse developers will also _host_ your discourse forum on their servers if you are open source on github. David > On Mar 16, 2018, at 23:51, Bill Lorensen wrote: > > According to: > > https://blog.discourse.org/2016/03/free-discourse-forum-hosting-for-community-friendly-github-projects/ > > Discourse is only available to GitHub hosted projects. VTK is a gitlab repo. > > Maybe I'm missing something... > >> On Fri, Mar 16, 2018 at 9:10 AM, Cory Quammen wrote: >> On Fri, Mar 16, 2018 at 11:23 AM, Matthew Brett >> wrote: >>> >>> Hi, >>> >>> On Fri, Mar 16, 2018 at 2:58 PM, Cory Quammen >>> wrote: >>>> >>>> I have collected some data on the impact of moving to Discourse for both >>>> the ITK and Slicer communities. Using average monthly posts as a proxy for >>>> community engagement, the data suggests the move has been very positive for >>>> increasing engagement: >>>> >>>> For ITK, monthly messages to the itk-users and itk-developers [1] list >>>> averaged 148 while on Discourse the average has been 297. >>>> >>>> For Slicer, monthly messages to the slicer-users and slicer-developers >>>> list averaged 274 while on Discourse the average has been 639. >>>> >>>> It looks like activity has doubled or more for both projects, a positive >>>> sign for both communities. >>>> >>>> Thanks, >>>> Cory >>>> >>>> [1] Messages to the ITK community mailing list have been excluded as >>>> most are copied to the itk-users or itk-developers list. I have not >>>> accounted for double counting where messages are sent to both users and >>>> developers lists. >>> >>> Those numbers are very surprising to me. Can you say whether you >>> have seen a near doubling of the amount of people mailing the list / >>> using the interface? Or are the same people sending more emails / >>> posts? Are they the same length? I ask, because one of the nice >>> features of email is that, typically, people put more work into >>> writing an email than they do a chat in, say, Gitter, and this makes >>> the content more substantial and less distracting. >> >> >> I did not analyze the posting activity at that level of detail, but those >> are interesting questions. I do not have access to the number of users of >> the mailing lists to compare before and after the transition to Discourse. >> >> With regard to message length, note that Discourse is a forum, not a group >> messaging service like Gitter or Slack, so I would anticipate that messages >> would largely be similar to what people post on the mailing list (for better >> or worse). I have sampled some discussions on >> https://discourse.itk.org/latest and https://discourse.slicer.org/latest and >> this seems to be the case - I invite you to take a look to see if you agree >> with that assessment. >> >> Best regards, >> Cory >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> 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 bill.lorensen at gmail.com Sat Mar 17 00:04:32 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 16 Mar 2018 21:04:32 -0700 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Makes sense. On Mar 16, 2018 8:56 PM, "David Thompson" wrote: > Hi Bill, > > Discourse is open source software; you can deploy your own discourse > server. However, the discourse developers will also _host_ your discourse > forum on their servers if you are open source on github. > > David > > > On Mar 16, 2018, at 23:51, Bill Lorensen > wrote: > > > > According to: > > > > https://blog.discourse.org/2016/03/free-discourse-forum- > hosting-for-community-friendly-github-projects/ > > > > Discourse is only available to GitHub hosted projects. VTK is a gitlab > repo. > > > > Maybe I'm missing something... > > > >> On Fri, Mar 16, 2018 at 9:10 AM, Cory Quammen > wrote: > >> On Fri, Mar 16, 2018 at 11:23 AM, Matthew Brett < > matthew.brett at gmail.com> > >> wrote: > >>> > >>> Hi, > >>> > >>> On Fri, Mar 16, 2018 at 2:58 PM, Cory Quammen < > cory.quammen at kitware.com> > >>> wrote: > >>>> > >>>> I have collected some data on the impact of moving to Discourse for > both > >>>> the ITK and Slicer communities. Using average monthly posts as a > proxy for > >>>> community engagement, the data suggests the move has been very > positive for > >>>> increasing engagement: > >>>> > >>>> For ITK, monthly messages to the itk-users and itk-developers [1] list > >>>> averaged 148 while on Discourse the average has been 297. > >>>> > >>>> For Slicer, monthly messages to the slicer-users and slicer-developers > >>>> list averaged 274 while on Discourse the average has been 639. > >>>> > >>>> It looks like activity has doubled or more for both projects, a > positive > >>>> sign for both communities. > >>>> > >>>> Thanks, > >>>> Cory > >>>> > >>>> [1] Messages to the ITK community mailing list have been excluded as > >>>> most are copied to the itk-users or itk-developers list. I have not > >>>> accounted for double counting where messages are sent to both users > and > >>>> developers lists. > >>> > >>> Those numbers are very surprising to me. Can you say whether you > >>> have seen a near doubling of the amount of people mailing the list / > >>> using the interface? Or are the same people sending more emails / > >>> posts? Are they the same length? I ask, because one of the nice > >>> features of email is that, typically, people put more work into > >>> writing an email than they do a chat in, say, Gitter, and this makes > >>> the content more substantial and less distracting. > >> > >> > >> I did not analyze the posting activity at that level of detail, but > those > >> are interesting questions. I do not have access to the number of users > of > >> the mailing lists to compare before and after the transition to > Discourse. > >> > >> With regard to message length, note that Discourse is a forum, not a > group > >> messaging service like Gitter or Slack, so I would anticipate that > messages > >> would largely be similar to what people post on the mailing list (for > better > >> or worse). I have sampled some discussions on > >> https://discourse.itk.org/latest and https://discourse.slicer.org/ > latest and > >> this seems to be the case - I invite you to take a look to see if you > agree > >> with that assessment. > >> > >> Best regards, > >> Cory > >> > >> -- > >> Cory Quammen > >> Staff R&D Engineer > >> Kitware, Inc. > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> 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 simakov.w at gmail.com Sat Mar 17 08:29:59 2018 From: simakov.w at gmail.com (Met@ll) Date: Sat, 17 Mar 2018 05:29:59 -0700 (MST) Subject: [vtkusers] display the model in two views Message-ID: <1521289799220-0.post@n5.nabble.com> Hello. It is necessary to display the model in two views. Can someone do? a link to the example would be very helpful) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aron.helser at kitware.com Sat Mar 17 17:03:30 2018 From: aron.helser at kitware.com (Aron Helser) Date: Sat, 17 Mar 2018 17:03:30 -0400 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn> Message-ID: Were you referring to this VTK web example? https://www.vtk.org/Wiki/VTK/Examples/Python/Web/RemoteRenderer This has been updated on the ParaViewWeb examples page for wslink: https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html As you can see it is very similar. Hope that helps, Aron On Thu, Mar 15, 2018 at 9:30 PM, Aron Helser wrote: > Hi Zhuangming, > (adding back the list) > > We have tested wslink and vtk with python 3.5 and 3.6. They may use some > features that require 3.5, but I'm not sure if there would be any issues > with 3.4. > > Which vtkweb example are you following? It is likely to be very similar > with wslink - we designed it to require very few changes from the previous > implementation. > > Regards, > Aron > > On Thu, Mar 15, 2018 at 4:50 AM, ??? wrote: > >> ?Hi Aron, >> >> >> Sorry for interrupting you again. I'm learning how to use wslink in my >> project. My project is coded using previous vtkweb framework, and learn a >> lot from its simple example to display a cone on the browse. Now I would >> like to use wslink, which can support python 3.x, to replace the old >> framework. I am not sure if you could provide me a similar simple example. >> Then I could learn by myself how to do that. Thanks in advance. >> >> >> >> Regards, >> >> >> Zhuangming Shen >> ------------------------------ >> *From:* Aron Helser >> *Sent:* Wednesday, March 14, 2018 11:51 PM >> *To:* ??? >> *Subject:* Re: [vtkusers] Json object error caused by websocket.py >> >> Thanks for the report - we've tested with Python 3.6, but I'm not sure >> there's automated testing for this code. >> If you'd like to report a bug, that'd be great. >> >> Thanks! >> Aron >> >> On Wed, Mar 14, 2018 at 4:11 AM, ??? >> wrote: >> >>> Hi all, >>> >>> >>> I found there probably be a bug around Line 250 >>> in /Wrapping/Python/wslink/websocket.py. If this code is run >>> using python 3.x, this will cause an error "json object must be str not >>> 'bytes' " when use json.loads. To avoid this error, I think the code can be >>> modified by >>> >>> ? >>> >>> >>> >>> >>> Regards, >>> >>> >>> Zhuangming Shen >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: not available URL: From andrew.amaclean at gmail.com Sat Mar 17 22:45:10 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 18 Mar 2018 13:45:10 +1100 Subject: [vtkusers] display the model in two views Message-ID: There are many examples in https://lorensen.github.io/VTKExamples/site/ Here is a good place to start: https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Planes/ or: https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/PlatonicSolids/ Andrew > ---------- Forwarded message ---------- > From: "Met at ll" > To: vtkusers at vtk.org > Cc: > Bcc: > Date: Sat, 17 Mar 2018 05:29:59 -0700 (MST) > Subject: [vtkusers] display the model in two views > Hello. > It is necessary to display the model in two views. > Can someone do? a link to the example would be very helpful) > > > > -- > 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 > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoequella at gmail.com Sun Mar 18 22:34:11 2018 From: zoequella at gmail.com (Stephen Zucker) Date: Sun, 18 Mar 2018 19:34:11 -0700 (MST) Subject: [vtkusers] Differences Result between CPU rendering and GPU rendering with VTK In-Reply-To: References: <1521097243522-0.post@n5.nabble.com> Message-ID: <1521426851835-0.post@n5.nabble.com> Thanks for your response. I have tried this method(UseJitteringOn()) but it seems to have no effect, result like this: Do you know what may be causing the emergence of this rainbow region? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mathieu.westphal at kitware.com Sun Mar 18 22:48:16 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 19 Mar 2018 03:48:16 +0100 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: I never used discourse, but if StackOverflow or bbs.archlinux.org are able to reach high quality content on a forum, if think we can as well. Best, Mathieu Westphal On Fri, Mar 16, 2018 at 5:10 PM, Cory Quammen wrote: > On Fri, Mar 16, 2018 at 11:23 AM, Matthew Brett > wrote: > >> Hi, >> >> On Fri, Mar 16, 2018 at 2:58 PM, Cory Quammen >> wrote: >> > >> > I have collected some data on the impact of moving to Discourse for >> both the ITK and Slicer communities. Using average monthly posts as a proxy >> for community engagement, the data suggests the move has been very positive >> for increasing engagement: >> > >> > For ITK, monthly messages to the itk-users and itk-developers [1] list >> averaged 148 while on Discourse the average has been 297. >> > >> > For Slicer, monthly messages to the slicer-users and slicer-developers >> list averaged 274 while on Discourse the average has been 639. >> > >> > It looks like activity has doubled or more for both projects, a >> positive sign for both communities. >> > >> > Thanks, >> > Cory >> > >> > [1] Messages to the ITK community mailing list have been excluded as >> most are copied to the itk-users or itk-developers list. I have not >> accounted for double counting where messages are sent to both users and >> developers lists. >> >> Those numbers are very surprising to me. Can you say whether you >> have seen a near doubling of the amount of people mailing the list / >> using the interface? Or are the same people sending more emails / >> posts? Are they the same length? I ask, because one of the nice >> features of email is that, typically, people put more work into >> writing an email than they do a chat in, say, Gitter, and this makes >> the content more substantial and less distracting. >> > > I did not analyze the posting activity at that level of detail, but those > are interesting questions. I do not have access to the number of users of > the mailing lists to compare before and after the transition to Discourse. > > With regard to message length, note that Discourse is a forum, not a group > messaging service like Gitter or Slack, so I would anticipate that messages > would largely be similar to what people post on the mailing list (for > better or worse). I have sampled some discussions on > https://discourse.itk.org/latest and https://discourse.slicer.org/latest > and this seems to be the case - I invite you to take a look to see if you > agree with that assessment. > > Best regards, > Cory > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoequella at gmail.com Sun Mar 18 23:00:04 2018 From: zoequella at gmail.com (Stephen Zucker) Date: Sun, 18 Mar 2018 20:00:04 -0700 (MST) Subject: [vtkusers] Differences Result between CPU rendering and GPU rendering with VTK In-Reply-To: References: <1521097243522-0.post@n5.nabble.com> Message-ID: <1521428404036-0.post@n5.nabble.com> Thanks for your response. I have tried this method(UseJitteringOn()) and set the sampleDistance to 0.1 but it seems to have no effect. Maybe my VTK version is bad ? My version is 7.1.0 -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Mon Mar 19 00:46:18 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 19 Mar 2018 00:46:18 -0400 Subject: [vtkusers] Differences Result between CPU rendering and GPU rendering with VTK In-Reply-To: <1521428404036-0.post@n5.nabble.com> References: <1521097243522-0.post@n5.nabble.com> <1521428404036-0.post@n5.nabble.com> Message-ID: Stephen, Just to be on safe side, set call "*AutoAdjustSampleDistancesOff*". Also, please try to use the version 8.10 as we have couple of bug fixes. - aashish On Sun, Mar 18, 2018 at 11:00 PM, Stephen Zucker wrote: > Thanks for your response. > I have tried this method(UseJitteringOn()) and set the sampleDistance to > 0.1 > but it seems to have no effect. > Maybe my VTK version is bad ? My version is 7.1.0 > > > > > -- > 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 zhuangming.shen at sphic.org.cn Mon Mar 19 04:06:51 2018 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Mon, 19 Mar 2018 08:06:51 +0000 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn> , Message-ID: <1521446811195.40502@sphic.org.cn> ?Hi Aron, Great, this is exactly what I want. I'll try the new example. Thanks a lot. Regards, Zhuangming Shen ________________________________ From: Aron Helser Sent: Sunday, March 18, 2018 5:03 AM To: ???; VTK Users Subject: Re: [vtkusers] Json object error caused by websocket.py Were you referring to this VTK web example? https://www.vtk.org/Wiki/VTK/Examples/Python/Web/RemoteRenderer This has been updated on the ParaViewWeb examples page for wslink: https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html As you can see it is very similar. Hope that helps, Aron On Thu, Mar 15, 2018 at 9:30 PM, Aron Helser > wrote: Hi Zhuangming, (adding back the list) We have tested wslink and vtk with python 3.5 and 3.6. They may use some features that require 3.5, but I'm not sure if there would be any issues with 3.4. Which vtkweb example are you following? It is likely to be very similar with wslink - we designed it to require very few changes from the previous implementation. Regards, Aron On Thu, Mar 15, 2018 at 4:50 AM, ??? > wrote: ?Hi Aron, Sorry for interrupting you again. I'm learning how to use wslink in my project. My project is coded using previous vtkweb framework, and learn a lot from its simple example to display a cone on the browse. Now I would like to use wslink, which can support python 3.x, to replace the old framework. I am not sure if you could provide me a similar simple example. Then I could learn by myself how to do that. Thanks in advance. Regards, Zhuangming Shen ________________________________ From: Aron Helser > Sent: Wednesday, March 14, 2018 11:51 PM To: ??? Subject: Re: [vtkusers] Json object error caused by websocket.py Thanks for the report - we've tested with Python 3.6, but I'm not sure there's automated testing for this code. If you'd like to report a bug, that'd be great. Thanks! Aron On Wed, Mar 14, 2018 at 4:11 AM, ??? > wrote: Hi all, I found there probably be a bug around Line 250 in /Wrapping/Python/wslink/websocket.py. If this code is run using python 3.x, this will cause an error "json object must be str not 'bytes' " when use json.loads. To avoid this error, I think the code can be modified by ? [cid:b10da89b-5d6c-40ac-898d-8db128fb6001] Regards, Zhuangming Shen _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: pastedImage.png URL: From utkarsh.ayachit at kitware.com Mon Mar 19 10:55:51 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Mon, 19 Mar 2018 10:55:51 -0400 Subject: [vtkusers] Survey: Migrating to Discourse Forum In-Reply-To: References: Message-ID: Folks, I'll close the survey later today and then summarize the results along with the pros and cons that folks have raised on the mailing list in a shared document. Thanks Utkarsh On Thu, Mar 15, 2018 at 3:51 PM, Utkarsh Ayachit wrote: > Folks, > > Here's a quick survey to collect community preference on migrating the > mailing list to a Discourse forum. > > https://goo.gl/forms/kdI3FOZTu2crmLUq1 > > Your feedback is welcome! > > Thanks > Utkarsh From simakov.w at gmail.com Mon Mar 19 11:49:46 2018 From: simakov.w at gmail.com (Met@ll) Date: Mon, 19 Mar 2018 08:49:46 -0700 (MST) Subject: [vtkusers] display the model in two views In-Reply-To: References: <1521289799220-0.post@n5.nabble.com> Message-ID: <1521474586045-0.post@n5.nabble.com> Andrew Maclean-3, thanks for the help! But the task is a little different, namely: it is necessary that actors were added only to one vtkRenderer, and in others only that which is displayed from the cameras that are aimed at the actors and the first vtkRenderer. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chihebz at hotmail.com Mon Mar 19 17:19:27 2018 From: chihebz at hotmail.com (ZACK) Date: Mon, 19 Mar 2018 14:19:27 -0700 (MST) Subject: [vtkusers] Rendering more than one actor problem In-Reply-To: <1521149516088-0.post@n5.nabble.com> References: <1521137378896-0.post@n5.nabble.com> <1521142499606-0.post@n5.nabble.com> <1521145716629-0.post@n5.nabble.com> <1521148707935-0.post@n5.nabble.com> <1521149516088-0.post@n5.nabble.com> Message-ID: <1521494367452-0.post@n5.nabble.com> Hi to All, Finally :), I was able to plot more than one actor by duplicating my vtkAppendFilter (list of unstructured grids). I old vtk 5.4 I was able to use the same vtkappendFilter to create different actors output (like wireframe actor + Gray model-actor, mesh actor. In Vtk 8.1.0 I had to create a new vtkappendFilter (List of new vtkunstructuredGrid) to be able to render my previous plots. Why is that? will it slow vtk rendering? or is there a workaround for this? By the way, I tried to create new vtkappendFilter (copy from original Filter) but it did not work, I had to create new vtkunstructuredGrid too!! Thanks for all Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bikash at umich.edu Mon Mar 19 22:56:33 2018 From: bikash at umich.edu (Bikash Kanungo) Date: Mon, 19 Mar 2018 22:56:33 -0400 Subject: [vtkusers] Sub-dividing vtkHexahedron Message-ID: Hi, Is there a way to sub-divide a given vtkHexahedron (say parent hex) into 8 child hexes? Currently, I'm extracting the parent hex's corner vertices and determining the edge centers, face centers and body center. Next, I use these various vertices to define the vertices of each of the 8 child hexes. This works fine. But it doesn't form a maintainable piece of code as the algorithm relies on a specifiv indexing of vtkHexahedron to identify the pairs and quadraplets that form an edge and a face, respectively. The indexing as mentioned in the vtkHexahedron description is: *" The hexahedron is defined by the eight points (0-7) where (0,1,2,3) is the base of the hexahedron which, using the right hand rule, forms a quadrilaterial whose normal points in the direction of the opposite face (4,5,6,7)."* I'm worried that if this indexing changes internally in later releases of vtk then it might lead to a very difficult to find bug. Any ideas about making it independent of the underlying indexing and/or making it more maintainable upon linking to a new vtk releases? Thanks, Bikash -- Bikash S. Kanungo PhD Student Computational Materials Physics Group Mechanical Engineering University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From polly_sukting at hotmail.com Mon Mar 19 23:31:34 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Tue, 20 Mar 2018 03:31:34 +0000 Subject: [vtkusers] Can the polydata vtk dataset apply with Kmeans Clustering? Message-ID: Hi all, I want to apply my .vtk polydata (which contains x,y,z coordinates) into clusters by using vtkKMeansStatistics. I tried with the coding by calling vtkPoints and listed all the points in the worksheet. The results look fine and I could visualize them. However, I have more than a thousand of .vtk polydata to go through the experiments. I used vtkDelimitedTextReader but it failed to read the x,y,z coordinates into KMeansStatistics. Is there anyway that I can load the .vtk polydata directly into KmeansStatistics? Thousand appreciations on the help and advice. Regards, Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhuangming.shen at sphic.org.cn Tue Mar 20 04:51:17 2018 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Tue, 20 Mar 2018 08:51:17 +0000 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn> , Message-ID: <1521535876737.37805@sphic.org.cn> ??Hi Aron, In the RemoteRenderer example https://www.vtk.org/Wiki/VTK/Examples/Python/Web/RemoteRenderer. If this code runs under VTK 8.1.0, I think self.Application.GetObjectIdMap().SetActiveObject("VIEW", renderWindow) should be changed to self.initApplication().GetObjectIdMap().SetActiveObject("VIEW", renderWindow) otherwise, an error will occur AttributeError: '_WebCone' object has no attribute 'Application'? Regards, Zhuangming Shen ________________________________ From: Aron Helser Sent: Sunday, March 18, 2018 5:03 AM To: ???; VTK Users Subject: Re: [vtkusers] Json object error caused by websocket.py Were you referring to this VTK web example? https://www.vtk.org/Wiki/VTK/Examples/Python/Web/RemoteRenderer This has been updated on the ParaViewWeb examples page for wslink: https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html As you can see it is very similar. Hope that helps, Aron On Thu, Mar 15, 2018 at 9:30 PM, Aron Helser > wrote: Hi Zhuangming, (adding back the list) We have tested wslink and vtk with python 3.5 and 3.6. They may use some features that require 3.5, but I'm not sure if there would be any issues with 3.4. Which vtkweb example are you following? It is likely to be very similar with wslink - we designed it to require very few changes from the previous implementation. Regards, Aron On Thu, Mar 15, 2018 at 4:50 AM, ??? > wrote: ?Hi Aron, Sorry for interrupting you again. I'm learning how to use wslink in my project. My project is coded using previous vtkweb framework, and learn a lot from its simple example to display a cone on the browse. Now I would like to use wslink, which can support python 3.x, to replace the old framework. I am not sure if you could provide me a similar simple example. Then I could learn by myself how to do that. Thanks in advance. Regards, Zhuangming Shen ________________________________ From: Aron Helser > Sent: Wednesday, March 14, 2018 11:51 PM To: ??? Subject: Re: [vtkusers] Json object error caused by websocket.py Thanks for the report - we've tested with Python 3.6, but I'm not sure there's automated testing for this code. If you'd like to report a bug, that'd be great. Thanks! Aron On Wed, Mar 14, 2018 at 4:11 AM, ??? > wrote: Hi all, I found there probably be a bug around Line 250 in /Wrapping/Python/wslink/websocket.py. If this code is run using python 3.x, this will cause an error "json object must be str not 'bytes' " when use json.loads. To avoid this error, I think the code can be modified by ? [cid:b10da89b-5d6c-40ac-898d-8db128fb6001] Regards, Zhuangming Shen _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: pastedImage.png URL: From zoequella at gmail.com Tue Mar 20 05:09:46 2018 From: zoequella at gmail.com (Stephen Zucker) Date: Tue, 20 Mar 2018 02:09:46 -0700 (MST) Subject: [vtkusers] Differences Result between CPU rendering and GPU rendering with VTK In-Reply-To: References: <1521097243522-0.post@n5.nabble.com> <1521428404036-0.post@n5.nabble.com> Message-ID: <1521536986339-0.post@n5.nabble.com> Thank you very much! I upgraded the version of VTK to 8.10 and it worked better. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ilindsay at insigniamedical.co.uk Tue Mar 20 08:00:03 2018 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 20 Mar 2018 05:00:03 -0700 (MST) Subject: [vtkusers] Volume Rendering Performance With Two Volumes Message-ID: <1521547203193-0.post@n5.nabble.com> Hello all, I am investigating a performance issue we are seeing with VTK 8.1 and the new OpenGL2 back-end. We are loading two medium/large volumes (~900 images) made from CT slices at 512x512 x 2 Bytes (raw data size of ~450MB). The GPU is an AMD R7 200 with 2GB of graphics RAM, so should easily be able to hold both volumes. I am running on Windows 10 with a Visual Studio 2017 build of VTK. The issue we are seeing is that the performance of one of the volumes is quite degraded. This leads to the mapper reducing the quality noticeably on one volume but not the other. Generally it is the first volume to be shown that gets the best performance, but not always. This issue does not seem to happen with the old OpenGL back-end, or is not anything like as noticeable. Eventually, the rendering will get so slow that Windows determines that the driver is not responding and resets it, leading to all sorts of havoc! I have also been able to reproduce the quality degradation using 3DSlicer - version 4.8.1, downloaded yesterday, which as far as I am aware uses the new OpenGL2 back-end. I load one of the volumes and display twice in GPU mode (Dual 3D from view menu). I also had to set the GPU memory size on the advanced section for the GPU rendering to work properly. The effect is most noticible with the CT-AAA preset. The driver reset seems to be mitigated by the dramatic degradation in quality that 3DSlicer seems to allow by default. We could allow the quality to drop in the same way that 3DSlicer does, but as we were getting acceptable performance at reasonable quality levels using the old back end, it seems a shame to do this. How do I proceed with this? Is there anything I can 'tweak' to change how the volumes are swapped on/off the GPU (if this is what is happening). Is the new volume rendering back-end just more memory heavy, so this is probabably something we will have to live with? Does anyone have any suggestions for diagnostics we can carry out to determine what is going on? I have looked at GPU-Z and am seeing a higher Memory Controller Load when manipulating the 'bad' volume, so I am guessing that some sort of swapping of data is going on. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Tue Mar 20 10:04:31 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 20 Mar 2018 14:04:31 +0000 Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: <1521547203193-0.post@n5.nabble.com> References: <1521547203193-0.post@n5.nabble.com> Message-ID: Slicer 4.8.1 still uses the OpenGL1 backend. We've noticed slowdown with OpenGL2 backend in Slicer 4.9, but solved it by tuning adjustment of sampling settings. See the full discussion here: https://discourse.slicer.org/t/volume-rendering-slow-in-latest-nightlies-for-macos/2231/21 As a side note, these are very large volumes for a modest GPU such as AMD R7 200. Andras -----Original Message----- From: vtkusers On Behalf Of ianl Sent: Tuesday, March 20, 2018 8:00 AM To: vtkusers at vtk.org Subject: [vtkusers] Volume Rendering Performance With Two Volumes Hello all, I am investigating a performance issue we are seeing with VTK 8.1 and the new OpenGL2 back-end. We are loading two medium/large volumes (~900 images) made from CT slices at 512x512 x 2 Bytes (raw data size of ~450MB). The GPU is an AMD R7 200 with 2GB of graphics RAM, so should easily be able to hold both volumes. I am running on Windows 10 with a Visual Studio 2017 build of VTK. The issue we are seeing is that the performance of one of the volumes is quite degraded. This leads to the mapper reducing the quality noticeably on one volume but not the other. Generally it is the first volume to be shown that gets the best performance, but not always. This issue does not seem to happen with the old OpenGL back-end, or is not anything like as noticeable. Eventually, the rendering will get so slow that Windows determines that the driver is not responding and resets it, leading to all sorts of havoc! I have also been able to reproduce the quality degradation using 3DSlicer - version 4.8.1, downloaded yesterday, which as far as I am aware uses the new OpenGL2 back-end. I load one of the volumes and display twice in GPU mode (Dual 3D from view menu). I also had to set the GPU memory size on the advanced section for the GPU rendering to work properly. The effect is most noticible with the CT-AAA preset. The driver reset seems to be mitigated by the dramatic degradation in quality that 3DSlicer seems to allow by default. We could allow the quality to drop in the same way that 3DSlicer does, but as we were getting acceptable performance at reasonable quality levels using the old back end, it seems a shame to do this. How do I proceed with this? Is there anything I can 'tweak' to change how the volumes are swapped on/off the GPU (if this is what is happening). Is the new volume rendering back-end just more memory heavy, so this is probabably something we will have to live with? Does anyone have any suggestions for diagnostics we can carry out to determine what is going on? I have looked at GPU-Z and am seeing a higher Memory Controller Load when manipulating the 'bad' volume, so I am guessing that some sort of swapping of data is going on. -- 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%7C4c4d20f833f04837478b08d58e5a20b7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571440103873466&sdata=8LQNS8ZnMM28wDa5YZ%2F6P5%2B5P%2BlV7%2F8eM3R%2FjcntZNE%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C4c4d20f833f04837478b08d58e5a20b7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571440103873466&sdata=5JGEGDxj1jZi6SGrGQaIPBOd%2FRBcWdrr%2B%2BvkZNw0d7M%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%7C4c4d20f833f04837478b08d58e5a20b7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571440103882560&sdata=J%2BhXm35292b%2Bku9u8UXqrOp9xuKsfRm4P3CuIrwyd50%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%7C4c4d20f833f04837478b08d58e5a20b7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571440103882560&sdata=gGD9xu7Pr%2FvZDjKpvvjPQj8ER3j%2FO6T73BTd7DoSzA8%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%7C4c4d20f833f04837478b08d58e5a20b7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571440103882560&sdata=5MytgbE9VbMbw%2FVzG8VJPNkTfOm7%2BWN57kIpO3jVOaA%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%7C4c4d20f833f04837478b08d58e5a20b7%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571440103882560&sdata=WjbVR8iAZJ71joPozd2WNaEtrzYM2rC%2BIpXj1m9jbxM%3D&reserved=0 From aron.helser at kitware.com Tue Mar 20 10:26:04 2018 From: aron.helser at kitware.com (Aron Helser) Date: Tue, 20 Mar 2018 10:26:04 -0400 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: <1521535876737.37805@sphic.org.cn> References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn> <1521535876737.37805@sphic.org.cn> Message-ID: Thanks for the feedback! I've updated the wiki. On Tue, Mar 20, 2018 at 4:51 AM, ??? wrote: > ??Hi Aron, > > > In the RemoteRenderer example https://www.vtk.org/Wiki/VTK/ > Examples/Python/Web/RemoteRenderer. If this code runs under VTK 8.1.0, I > think > > > self.Application.GetObjectIdMap().SetActiveObject("VIEW", renderWindow) > > > should be changed to > > > self.initApplication().GetObjectIdMap().SetActiveObject("VIEW", renderWindow) > > > otherwise, an error will occur > > > AttributeError: '_WebCone' object has no attribute 'Application'? > > > > Regards, > > > Zhuangming Shen > ------------------------------ > *From:* Aron Helser > *Sent:* Sunday, March 18, 2018 5:03 AM > *To:* ???; VTK Users > *Subject:* Re: [vtkusers] Json object error caused by websocket.py > > Were you referring to this VTK web example? https://www.vtk.org/ > Wiki/VTK/Examples/Python/Web/RemoteRenderer > This has been updated on the ParaViewWeb examples page for wslink: > https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html > As you can see it is very similar. > > Hope that helps, > Aron > > On Thu, Mar 15, 2018 at 9:30 PM, Aron Helser > wrote: > >> Hi Zhuangming, >> (adding back the list) >> >> We have tested wslink and vtk with python 3.5 and 3.6. They may use some >> features that require 3.5, but I'm not sure if there would be any issues >> with 3.4. >> >> Which vtkweb example are you following? It is likely to be very similar >> with wslink - we designed it to require very few changes from the previous >> implementation. >> >> Regards, >> Aron >> >> On Thu, Mar 15, 2018 at 4:50 AM, ??? >> wrote: >> >>> ?Hi Aron, >>> >>> >>> Sorry for interrupting you again. I'm learning how to use wslink in my >>> project. My project is coded using previous vtkweb framework, and learn a >>> lot from its simple example to display a cone on the browse. Now I would >>> like to use wslink, which can support python 3.x, to replace the old >>> framework. I am not sure if you could provide me a similar simple example. >>> Then I could learn by myself how to do that. Thanks in advance. >>> >>> >>> >>> Regards, >>> >>> >>> Zhuangming Shen >>> ------------------------------ >>> *From:* Aron Helser >>> *Sent:* Wednesday, March 14, 2018 11:51 PM >>> *To:* ??? >>> *Subject:* Re: [vtkusers] Json object error caused by websocket.py >>> >>> Thanks for the report - we've tested with Python 3.6, but I'm not sure >>> there's automated testing for this code. >>> If you'd like to report a bug, that'd be great. >>> >>> Thanks! >>> Aron >>> >>> On Wed, Mar 14, 2018 at 4:11 AM, ??? >>> wrote: >>> >>>> Hi all, >>>> >>>> >>>> I found there probably be a bug around Line 250 >>>> in /Wrapping/Python/wslink/websocket.py. If this code is >>>> run using python 3.x, this will cause an error "json object must be str not >>>> 'bytes' " when use json.loads. To avoid this error, I think the code can be >>>> modified by >>>> >>>> ? >>>> >>>> >>>> >>>> >>>> Regards, >>>> >>>> >>>> Zhuangming Shen >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: not available URL: From Jesse.Kinross-Smith at bentley.com Tue Mar 20 10:33:41 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Tue, 20 Mar 2018 14:33:41 +0000 Subject: [vtkusers] Exception when using vtkOrientationMarkerWidget in a vtkMFCWindow Message-ID: Long shot, but wondering if anyone has any clue here. I've got a whole lot of rendering working nicely in a vtkMFCWindow and thought I'd try adding an orientation widget to show axes. I found some sample code which does this with a vtkOrientationMarkerWidget, but I tried it with our vtkMFCWindow and it's causing an exception almost straight away. This is the code I'm using, which is almost identical to the sample code at: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes vtkSmartPointer axes = vtkSmartPointer::New(); vtkSmartPointer widget = vtkSmartPointer::New(); widget->SetOutlineColor(0.9300, 0.5700, 0.1300); widget->SetOrientationMarker(axes); widget->SetCurrentRenderer(m_vtkRenderer); widget->SetInteractor(m_vtkRenderer->GetRenderWindow()->GetInteractor()); widget->SetViewport(0.0, 0.0, 0.4, 0.4); widget->SetEnabled(1); widget->InteractiveOn(); It actually displays both the model and the orientation axes briefly, then displays the following exception: 0xC000041D: An unhandled exception was encountered during a user callback. Call Stack: > vtkMFCWindow::OnPaint() Line 169 C++ CWnd::OnWndMsg(unsigned int message, unsigned __int64 wParam, __int64 lParam, __int64 * pResult) Line 2459 C++ CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2093 C++ AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 265 C++ AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 418 C++ Anyone got any ideas? -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Tue Mar 20 11:41:26 2018 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 20 Mar 2018 08:41:26 -0700 (MST) Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: References: <1521547203193-0.post@n5.nabble.com> Message-ID: <1521560486104-0.post@n5.nabble.com> Andras Lasso wrote > Slicer 4.8.1 still uses the OpenGL1 backend. We've noticed slowdown with > OpenGL2 backend in Slicer 4.9, but solved it by tuning adjustment of > sampling settings. > > See the full discussion here: > https://discourse.slicer.org/t/volume-rendering-slow-in-latest-nightlies-for-macos/2231/21 Interesting that 3DSlicer 4.8.1 is still using the old back end and I am seeing a similar issue. This somewhat disproves my suspicion that there might be an issue with multiple volumes introduced with OpenGL2. However, the effect is certainly worse in our code with the new back end. I have tried your fix to set LockSampleDistanceToInputSpacing. This does not seem to make much difference for us as we have InteractiveAdjustSampleDistances set on, which presumably overrides it. As it looks like 3DSlicer is also adjusting ImageSampleDistance from observation, this may be a difference. I will look into perhaps varying that too in interactive modes. Interestingly, I have just noticed that if I have just two VTK windows with volumes in, performance is much better and consistent with and without LockSampleDistanceToInputSpacing. If I have other VTK windows, MPR views for example, performance drops off on one of the volumes. Andras Lasso wrote > As a side note, these are very large volumes for a modest GPU such as AMD > R7 200. Granted, the card is a few years old, but does have 2GB of graphics memory and renders volumes of this size and larger very nicely with the old OpenGL back end. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Tue Mar 20 11:56:13 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 20 Mar 2018 15:56:13 +0000 Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: <1521560486104-0.post@n5.nabble.com> References: <1521547203193-0.post@n5.nabble.com> <1521560486104-0.post@n5.nabble.com> Message-ID: Automatic sample distance adjustment is based on measuring rendering times. If you render multiple volumes then maybe the measurement is not reliable anymore (just guessing). You could try manually setting sample distances for all volumes and see if you get more consistent behavior. Andras -----Original Message----- From: vtkusers On Behalf Of ianl Sent: Tuesday, March 20, 2018 11:41 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] Volume Rendering Performance With Two Volumes Andras Lasso wrote > Slicer 4.8.1 still uses the OpenGL1 backend. We've noticed slowdown > with > OpenGL2 backend in Slicer 4.9, but solved it by tuning adjustment of > sampling settings. > > See the full discussion here: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdisco > urse.slicer.org%2Ft%2Fvolume-rendering-slow-in-latest-nightlies-for-ma > cos%2F2231%2F21&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f > 2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C6365715729 > 25774613&sdata=s5J76LJnOInDFeBR1APBgyb9Xe5Q8m8yzsZHdbJDbHU%3D&reserved > =0 Interesting that 3DSlicer 4.8.1 is still using the old back end and I am seeing a similar issue. This somewhat disproves my suspicion that there might be an issue with multiple volumes introduced with OpenGL2. However, the effect is certainly worse in our code with the new back end. I have tried your fix to set LockSampleDistanceToInputSpacing. This does not seem to make much difference for us as we have InteractiveAdjustSampleDistances set on, which presumably overrides it. As it looks like 3DSlicer is also adjusting ImageSampleDistance from observation, this may be a difference. I will look into perhaps varying that too in interactive modes. Interestingly, I have just noticed that if I have just two VTK windows with volumes in, performance is much better and consistent with and without LockSampleDistanceToInputSpacing. If I have other VTK windows, MPR views for example, performance drops off on one of the volumes. Andras Lasso wrote > As a side note, these are very large volumes for a modest GPU such as > AMD > R7 200. Granted, the card is a few years old, but does have 2GB of graphics memory and renders volumes of this size and larger very nicely with the old OpenGL back end. -- 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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=MaOY1zTuXMMAwRrUiG8UFnbZMlKlfcGdbSmmY2vb64s%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=zRdGnwhQ8HnlZ%2BBGOHRA3pbNBc7cnnAH6ft%2FPITr2B8%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=ElsRWmQqZnJSdcjAdN6DI7LKVOdndAWkV77Sv1Nzkwo%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=yZQrBLgqIPqa10Gjhd2JbJLl%2Fi05vjev0PodYiwtnIE%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=eFJwHeGxaobtJLJ%2FxQ7eUbGWu9IDhoDuIM5umpg5DDo%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=0Wfviq%2BeVV6vZeOlFiivuD9rX6uGwtXxeQ6I%2FpUPCa0%3D&reserved=0 From bill.lorensen at gmail.com Tue Mar 20 13:31:02 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 20 Mar 2018 10:31:02 -0700 Subject: [vtkusers] ANN: VTKExamples adds Shader example Message-ID: We are excited to announce that we have added several examples that show how to use vtkShaders to generate exciting images. Each of the new examples modifies the existing vtkOpenGLPolyData pipeline. We hope that these examples will stimulate interest and usage of this advanced capability. The new examples are here: https://lorensen.github.io/VTKExamples/site/Cxx/#shaders As always we ask you to contribute to the grassroots effort to make VTK more understandable and exciting. See: https://lorensen.github.io/VTKExamples/site/Instructions/ForDevelopers/ Andrew Maclean and I will be happy to get you started. Stay tuned, we will be adding more examples in the next weeks. -- Unpaid intern in BillsParadise at noware dot com From aron.helser at kitware.com Tue Mar 20 13:34:44 2018 From: aron.helser at kitware.com (Aron Helser) Date: Tue, 20 Mar 2018 13:34:44 -0400 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn> <1521535876737.37805@sphic.org.cn> Message-ID: Zhuangming , Regarding your original problem, I've found in the documentation that Python 3.6 supports json.loads() of 'bytes' type objects natively. That's the version I've been testing with. https://docs.python.org/3.6/library/json.html So your suggested fix is a good one, limited to python v3.4 and v3.5. I'll see if I can get it in. Aron On Tue, Mar 20, 2018 at 10:26 AM, Aron Helser wrote: > Thanks for the feedback! I've updated the wiki. > > On Tue, Mar 20, 2018 at 4:51 AM, ??? wrote: > >> ??Hi Aron, >> >> >> In the RemoteRenderer example https://www.vtk.org/Wiki/VTK/E >> xamples/Python/Web/RemoteRenderer. If this code runs under VTK 8.1.0, I >> think >> >> >> self.Application.GetObjectIdMap().SetActiveObject("VIEW", renderWindow) >> >> >> should be changed to >> >> >> self.initApplication().GetObjectIdMap().SetActiveObject("VIEW", renderWindow) >> >> >> otherwise, an error will occur >> >> >> AttributeError: '_WebCone' object has no attribute 'Application'? >> >> >> >> Regards, >> >> >> Zhuangming Shen >> ------------------------------ >> *From:* Aron Helser >> *Sent:* Sunday, March 18, 2018 5:03 AM >> *To:* ???; VTK Users >> *Subject:* Re: [vtkusers] Json object error caused by websocket.py >> >> Were you referring to this VTK web example? https://www.vtk.org/W >> iki/VTK/Examples/Python/Web/RemoteRenderer >> This has been updated on the ParaViewWeb examples page for wslink: >> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >> As you can see it is very similar. >> >> Hope that helps, >> Aron >> >> On Thu, Mar 15, 2018 at 9:30 PM, Aron Helser >> wrote: >> >>> Hi Zhuangming, >>> (adding back the list) >>> >>> We have tested wslink and vtk with python 3.5 and 3.6. They may use some >>> features that require 3.5, but I'm not sure if there would be any issues >>> with 3.4. >>> >>> Which vtkweb example are you following? It is likely to be very similar >>> with wslink - we designed it to require very few changes from the previous >>> implementation. >>> >>> Regards, >>> Aron >>> >>> On Thu, Mar 15, 2018 at 4:50 AM, ??? >>> wrote: >>> >>>> ?Hi Aron, >>>> >>>> >>>> Sorry for interrupting you again. I'm learning how to use wslink in my >>>> project. My project is coded using previous vtkweb framework, and learn a >>>> lot from its simple example to display a cone on the browse. Now I would >>>> like to use wslink, which can support python 3.x, to replace the old >>>> framework. I am not sure if you could provide me a similar simple example. >>>> Then I could learn by myself how to do that. Thanks in advance. >>>> >>>> >>>> >>>> Regards, >>>> >>>> >>>> Zhuangming Shen >>>> ------------------------------ >>>> *From:* Aron Helser >>>> *Sent:* Wednesday, March 14, 2018 11:51 PM >>>> *To:* ??? >>>> *Subject:* Re: [vtkusers] Json object error caused by websocket.py >>>> >>>> Thanks for the report - we've tested with Python 3.6, but I'm not sure >>>> there's automated testing for this code. >>>> If you'd like to report a bug, that'd be great. >>>> >>>> Thanks! >>>> Aron >>>> >>>> On Wed, Mar 14, 2018 at 4:11 AM, ??? >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> >>>>> I found there probably be a bug around Line 250 >>>>> in /Wrapping/Python/wslink/websocket.py. If this code is >>>>> run using python 3.x, this will cause an error "json object must be str not >>>>> 'bytes' " when use json.loads. To avoid this error, I think the code can be >>>>> modified by >>>>> >>>>> ? >>>>> >>>>> >>>>> >>>>> >>>>> Regards, >>>>> >>>>> >>>>> Zhuangming Shen >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: not available URL: From samoluk.aleksey at gmail.com Tue Mar 20 14:56:09 2018 From: samoluk.aleksey at gmail.com (Smeh) Date: Tue, 20 Mar 2018 11:56:09 -0700 (MST) Subject: [vtkusers] Adding image in pcl::visualization::PCLVisualizer (PCL/VTK question) Message-ID: <1521572169926-0.post@n5.nabble.com> I want to add image near 3d model. I got pcl::visualization::PCLVisualizer,and QVTKOpenGLWidget. I didnt find way to add 2d image to scene in pcl(there is pcl::visualization::ImageViewer, but then i need to set another visualizator, and the model displayed before that - dissapear). I found that pcl::visualization::PCLVisualizer got method getShapeActorMap(). Questions: -Could i add something like vtkImageSlice, whether it will be displayed? -Could u give me some example how to emplace vtkImageSlice to ShapeActorMap? If this approach is stupid and does not make sense, please let me know. I will be glad to any help. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From nztoddler at yahoo.com Tue Mar 20 17:43:35 2018 From: nztoddler at yahoo.com (Todd) Date: Wed, 21 Mar 2018 10:43:35 +1300 Subject: [vtkusers] Exception when using vtkOrientationMarkerWidget in a vtkMFCWindow In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From Jesse.Kinross-Smith at bentley.com Tue Mar 20 19:41:18 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Tue, 20 Mar 2018 23:41:18 +0000 Subject: [vtkusers] Exception when using vtkOrientationMarkerWidget in a vtkMFCWindow In-Reply-To: References: Message-ID: Well I?m a dunce then aren?t I (I?m blaming this cold I have!). Yep ? works great when in a local variable. Definitely interested in that patch you?ve made too. Thank you very much! Jesse -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle From: Todd [mailto:nztoddler at yahoo.com] Sent: Wednesday, 21 March 2018 5:44 AM To: Jesse Kinross-Smith Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Exception when using vtkOrientationMarkerWidget in a vtkMFCWindow What version of VTK are you using? You're using a local variable for the marker widget with a smart pointer. As soon as it goes out of scope, it will be destroyed. To make matters worse the marker widget does not properly unhook itself from render window events upon destruction, so you get these nasty callbacks to a dead object. However I pushed a patch for this which was merged, as I recall, just after the official release of VTK8.1. I'll see if I can find the merge request number. I would suggest creating a class member to hold onto the marker widget until you're finished with the render window; i.e. keep it alive. On 21 Mar 2018 3:33 a.m., Jesse Kinross-Smith > wrote: Long shot, but wondering if anyone has any clue here. I?ve got a whole lot of rendering working nicely in a vtkMFCWindow and thought I?d try adding an orientation widget to show axes. I found some sample code which does this with a vtkOrientationMarkerWidget, but I tried it with our vtkMFCWindow and it?s causing an exception almost straight away. This is the code I?m using, which is almost identical to the sample code at: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes vtkSmartPointer axes = vtkSmartPointer::New(); vtkSmartPointer widget = vtkSmartPointer::New(); widget->SetOutlineColor(0.9300, 0.5700, 0.1300); widget->SetOrientationMarker(axes); widget->SetCurrentRenderer(m_vtkRenderer); widget->SetInteractor(m_vtkRenderer->GetRenderWindow()->GetInteractor()); widget->SetViewport(0.0, 0.0, 0.4, 0.4); widget->SetEnabled(1); widget->InteractiveOn(); It actually displays both the model and the orientation axes briefly, then displays the following exception: 0xC000041D: An unhandled exception was encountered during a user callback. Call Stack: > vtkMFCWindow::OnPaint() Line 169 C++ CWnd::OnWndMsg(unsigned int message, unsigned __int64 wParam, __int64 lParam, __int64 * pResult) Line 2459 C++ CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2093 C++ AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 265 C++ AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 418 C++ Anyone got any ideas? -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle -------------- next part -------------- An HTML attachment was scrubbed... URL: From minpu.code at gmail.com Tue Mar 20 20:24:24 2018 From: minpu.code at gmail.com (pnt1614) Date: Tue, 20 Mar 2018 17:24:24 -0700 (MST) Subject: [vtkusers] How to clip a 3D mesh with a curve surface? Message-ID: <1521591864125-0.post@n5.nabble.com> I have searched on the google and there is an answer (http://vtkusers.public.kitware.narkive.com/UA15hWtq/mesh-cutting-using-freehand-curve) but I do not completetly understand. A part of answer is Try out this pipeline: (in Tcl but it's the same idea in any language) vtkPoints selectionPoints selectionPoints InsertNextPoint 1.0 1.0 1.0 # etc... vtkSelectPolyData select select SetLoop selectionPoints # connect your data here select SetInputConnection [mydataFilter GetOutputPort] select GenerateSelectionScalarsOn select SetSelectionModeToLargestRegion; vtkClipPolyData selectclip selectclip SetInputConnection [select GetOutputPort] selectclip SetValue 0.0 I am using C++ and I do not understand "selectedPoints" part. Is there someone using Tcl? Please help me. Thank you -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From nztoddler at yahoo.com Tue Mar 20 21:02:35 2018 From: nztoddler at yahoo.com (Todd Martin) Date: Wed, 21 Mar 2018 01:02:35 +0000 (UTC) Subject: [vtkusers] Exception when using vtkOrientationMarkerWidget in a vtkMFCWindow In-Reply-To: References: Message-ID: <1142411548.4419204.1521594155695@mail.yahoo.com> Hi Jesse No problem. I made a similar mistake using c# wrappers.Here's the MR. Looking at the gitlab site, it is not obvious to me whether it got in before the 8.1 release or not, but it is definitely in the master branch. Remove OrientationMarkerWidget from render window on destruction (!3546) ? Merge Requests ? VTK / VTK | | | | | | | | | | | Remove OrientationMarkerWidget from render window on destruction (!3546)... The orientation marker widget adds its own visual elements and an observer to the display window and also hooks ... | | | On Wednesday, March 21, 2018, 12:41:22 PM GMT+13, Jesse Kinross-Smith wrote: Well I?m a dunce then aren?t I (I?m blaming this cold I have!). ? Yep ? works great when in a local variable. Definitely interested in that patch you?ve made too. ? Thank you very much! ? Jesse -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle ? From: Todd [mailto:nztoddler at yahoo.com] Sent: Wednesday, 21 March 2018 5:44 AM To: Jesse Kinross-Smith Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Exception when using vtkOrientationMarkerWidget in a vtkMFCWindow ? What version of VTK are you using? ? You're using a local variable for the marker widget with a smart pointer. As soon as it goes out of scope, it will be destroyed.? ? To make matters worse the marker widget does not properly unhook itself from render window events upon destruction, so you get these nasty callbacks to a dead object. However I pushed a patch for this which was merged, as I recall, just after the official release of VTK8.1. I'll see if I can find the merge request number. ? I would suggest creating a class member to hold onto the marker widget until you're finished with the render window; i.e. keep it alive. ? On 21 Mar 2018 3:33 a.m., Jesse Kinross-Smith wrote: Long shot, but wondering if anyone has any clue here. I?ve got a whole lot of rendering working nicely in a vtkMFCWindow and thought I?d try adding an orientation widget to show axes. ? I found some sample code which does this with a vtkOrientationMarkerWidget, but I tried it with our vtkMFCWindow and it?s causing an exception almost straight away. ? This is the code I?m using, which is almost identical to the sample code at: ? https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes ? vtkSmartPointer axes = vtkSmartPointer::New(); vtkSmartPointer widget = vtkSmartPointer::New(); widget->SetOutlineColor(0.9300, 0.5700, 0.1300); widget->SetOrientationMarker(axes); widget->SetCurrentRenderer(m_vtkRenderer); widget->SetInteractor(m_vtkRenderer->GetRenderWindow()->GetInteractor()); widget->SetViewport(0.0, 0.0, 0.4, 0.4); widget->SetEnabled(1); widget->InteractiveOn(); ? It actually displays both the model and the orientation axes briefly, then displays the following exception: ? 0xC000041D: An unhandled exception was encountered during a user callback. ? Call Stack: > vtkMFCWindow::OnPaint() Line 169???? C++ CWnd::OnWndMsg(unsigned int message, unsigned __int64 wParam, __int64 lParam, __int64 * pResult) Line 2459??????? C++ CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2093????? C++ AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 265?????????? C++ AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 418????????????? C++ ? Anyone got any ideas? ? -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhuangming.shen at sphic.org.cn Tue Mar 20 21:05:10 2018 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Wed, 21 Mar 2018 01:05:10 +0000 Subject: [vtkusers] Json object error caused by websocket.py In-Reply-To: References: <1521015106641.17215@sphic.org.cn> <1521103848643.94421@sphic.org.cn> <1521535876737.37805@sphic.org.cn> , Message-ID: <1521594309791.77411@sphic.org.cn> ?Hi Aron, Thanks for your explanation. It's clear now. Regards, Zhuangming Shen ________________________________ From: Aron Helser Sent: Wednesday, March 21, 2018 1:34 AM To: ??? Cc: VTK Users Subject: Re: [vtkusers] Json object error caused by websocket.py Zhuangming , Regarding your original problem, I've found in the documentation that Python 3.6 supports json.loads() of 'bytes' type objects natively. That's the version I've been testing with. https://docs.python.org/3.6/library/json.html So your suggested fix is a good one, limited to python v3.4 and v3.5. I'll see if I can get it in. Aron On Tue, Mar 20, 2018 at 10:26 AM, Aron Helser > wrote: Thanks for the feedback! I've updated the wiki. On Tue, Mar 20, 2018 at 4:51 AM, ??? > wrote: ??Hi Aron, In the RemoteRenderer example https://www.vtk.org/Wiki/VTK/Examples/Python/Web/RemoteRenderer. If this code runs under VTK 8.1.0, I think self.Application.GetObjectIdMap().SetActiveObject("VIEW", renderWindow) should be changed to self.initApplication().GetObjectIdMap().SetActiveObject("VIEW", renderWindow) otherwise, an error will occur AttributeError: '_WebCone' object has no attribute 'Application'? Regards, Zhuangming Shen ________________________________ From: Aron Helser > Sent: Sunday, March 18, 2018 5:03 AM To: ???; VTK Users Subject: Re: [vtkusers] Json object error caused by websocket.py Were you referring to this VTK web example? https://www.vtk.org/Wiki/VTK/Examples/Python/Web/RemoteRenderer This has been updated on the ParaViewWeb examples page for wslink: https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html As you can see it is very similar. Hope that helps, Aron On Thu, Mar 15, 2018 at 9:30 PM, Aron Helser > wrote: Hi Zhuangming, (adding back the list) We have tested wslink and vtk with python 3.5 and 3.6. They may use some features that require 3.5, but I'm not sure if there would be any issues with 3.4. Which vtkweb example are you following? It is likely to be very similar with wslink - we designed it to require very few changes from the previous implementation. Regards, Aron On Thu, Mar 15, 2018 at 4:50 AM, ??? > wrote: ?Hi Aron, Sorry for interrupting you again. I'm learning how to use wslink in my project. My project is coded using previous vtkweb framework, and learn a lot from its simple example to display a cone on the browse. Now I would like to use wslink, which can support python 3.x, to replace the old framework. I am not sure if you could provide me a similar simple example. Then I could learn by myself how to do that. Thanks in advance. Regards, Zhuangming Shen ________________________________ From: Aron Helser > Sent: Wednesday, March 14, 2018 11:51 PM To: ??? Subject: Re: [vtkusers] Json object error caused by websocket.py Thanks for the report - we've tested with Python 3.6, but I'm not sure there's automated testing for this code. If you'd like to report a bug, that'd be great. Thanks! Aron On Wed, Mar 14, 2018 at 4:11 AM, ??? > wrote: Hi all, I found there probably be a bug around Line 250 in /Wrapping/Python/wslink/websocket.py. If this code is run using python 3.x, this will cause an error "json object must be str not 'bytes' " when use json.loads. To avoid this error, I think the code can be modified by ? [cid:b10da89b-5d6c-40ac-898d-8db128fb6001] Regards, Zhuangming Shen _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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: pastedImage.png Type: image/png Size: 40575 bytes Desc: pastedImage.png URL: From minpu.code at gmail.com Tue Mar 20 22:28:50 2018 From: minpu.code at gmail.com (pnt1614) Date: Tue, 20 Mar 2018 19:28:50 -0700 (MST) Subject: [vtkusers] How to set color of a clipped mesh? Message-ID: <1521599330640-0.post@n5.nabble.com> I am using vtkSelectPolyData to clip a region using a contour. But the clipped region is rendered in unexpected color. Is there anyway to get the original mesh's color after clipping? // A contour generated using points vtkSmartPointer rep = vtkContourRepresentation::SafeDownCast(g_contourWidget->GetRepresentation()); vtkSmartPointer selectionPoints = rep->GetContourRepresentationAsPolyData()->GetPoints(); vtkSmartPointer loop = vtkSmartPointer::New(); loop->SetInputData(mesh->GetOutput()); loop->SetLoop(selectionPoints); loop->GenerateSelectionScalarsOn(); loop->SetSelectionModeToLargestRegion(); vtkSmartPointer clip = vtkSmartPointer::New(); clip->SetInputConnection(loop->GetOutputPort()); vtkSmartPointer clipMapper = vtkSmartPointer::New(); clipMapper->SetInputConnection(clip->GetOutputPort()); vtkSmartPointer clipActor = vtkSmartPointer::New(); clipActor->SetMapper(clipMapper); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer interactor = m_vtkWindow->GetInteractor(); // Add the actors to the renderer, set the background and size renderer->AddActor(clipActor); renderer->SetBackground(0.5, 0.5, 0.5); m_vtkWindow->RemoveRenderer(contour_renderer); m_vtkWindow->AddRenderer(renderer); m_vtkWindow->Render(); interactor->Start(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Mar 21 01:38:22 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 20 Mar 2018 22:38:22 -0700 Subject: [vtkusers] How to set color of a clipped mesh? In-Reply-To: <1521599330640-0.post@n5.nabble.com> References: <1521599330640-0.post@n5.nabble.com> Message-ID: Try clipMapper->ScalarVisibiltyOff(); On Tue, Mar 20, 2018 at 7:28 PM, pnt1614 wrote: > I am using vtkSelectPolyData to clip a region using a contour. But the > clipped region is rendered in unexpected color. Is there anyway to get the > original mesh's color after clipping? > > // A contour generated using points > vtkSmartPointer rep = > vtkContourRepresentation::SafeDownCast(g_contourWidget->GetRepresentation()); > > vtkSmartPointer selectionPoints = > rep->GetContourRepresentationAsPolyData()->GetPoints(); > > vtkSmartPointer loop = > vtkSmartPointer::New(); > loop->SetInputData(mesh->GetOutput()); > loop->SetLoop(selectionPoints); > loop->GenerateSelectionScalarsOn(); > loop->SetSelectionModeToLargestRegion(); > > vtkSmartPointer clip = > vtkSmartPointer::New(); > clip->SetInputConnection(loop->GetOutputPort()); > > vtkSmartPointer clipMapper = > vtkSmartPointer::New(); > clipMapper->SetInputConnection(clip->GetOutputPort()); > > vtkSmartPointer clipActor = > vtkSmartPointer::New(); > clipActor->SetMapper(clipMapper); > > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > > > vtkSmartPointer interactor = > m_vtkWindow->GetInteractor(); > > // Add the actors to the renderer, set the background and size > renderer->AddActor(clipActor); > renderer->SetBackground(0.5, 0.5, 0.5); > > m_vtkWindow->RemoveRenderer(contour_renderer); > m_vtkWindow->AddRenderer(renderer); > > m_vtkWindow->Render(); > interactor->Start(); > > > > > > -- > 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 polly_sukting at hotmail.com Wed Mar 21 03:00:29 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Wed, 21 Mar 2018 07:00:29 +0000 Subject: [vtkusers] vtkThreshold Message-ID: Hi, Previously, I applied vtkThreshold with ThresholdByUpper and get the data extracted on 3D vtk dataset. For example, i could get 500 points out of 5000 points after the thresholding with a criterion of 0.085. vtkThreshold *thresh = vtkThreshold::New(); thresh->SetInputConnection(meanCurve->GetOutputPort()); thresh->ThresholdByUpper(0.085); thresh->AllScalarsOff(); thresh->Update(); Now, my question is, how i can do this process in an opposite way. I want to get the threshold value which the number of the points are within 500-600. Instead of I am the one who providing the threshold value manually. // If meanCurve points 500-600 provide threshold value If meanCurve points 600-700 provide threshold value ...and so on // Thanks. Best, Polly -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Wed Mar 21 03:26:31 2018 From: josp.jorge at gmail.com (Jorge Perez) Date: Wed, 21 Mar 2018 08:26:31 +0100 Subject: [vtkusers] vtkThreshold In-Reply-To: References: Message-ID: Hello, you can use ThresholdBetween void vtkThreshold::ThresholdBetween ( double *lower*, double *upper* ) Criterion is cells whose scalars are between lower and upper thresholds (inclusive of the end values). https://www.vtk.org/doc/nightly/html/classvtkThreshold.html#a20f1127a1da274eea9791c15410e9935 2018-03-21 8:00 GMT+01:00 Polly Pui : > Hi, > > > Previously, I applied vtkThreshold with ThresholdByUpper and get the data > extracted on 3D vtk dataset. > > For example, i could get 500 points out of 5000 points after the > thresholding with a criterion of 0.085. > > vtkThreshold *thresh = vtkThreshold::New(); > thresh->SetInputConnection(meanCurve->GetOutputPort()); > thresh->ThresholdByUpper(0.085); > thresh->AllScalarsOff(); > thresh->Update(); > > Now, my question is, how i can do this process in an opposite way. > > I want to get the threshold value which the number of the points are > within 500-600. > > Instead of I am the one who providing the threshold value manually. > > // > > If meanCurve points 500-600 provide threshold value > > If meanCurve points 600-700 provide threshold value > > ...and so on > > // > > > Thanks. > > > Best, > > 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 vtk12af6bc42 at kant.sophonet.de Wed Mar 21 06:56:46 2018 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Wed, 21 Mar 2018 11:56:46 +0100 Subject: [vtkusers] 16Bit per color channel? Message-ID: Hi list, using OSMesa for offscreen rendering (and VTK 8.1.0) I would like to save the renderwindow content (vtkWindowToImageFilter) with 16 bits per color channel to file. PNG would support 16 bits per channel (https://en.wikipedia.org/wiki/Portable_Network_Graphics), but I am wondering how to set things up via VTK. Any hint? Thanks, sophonet From sankhesh.jhaveri at kitware.com Wed Mar 21 07:26:46 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 21 Mar 2018 11:26:46 +0000 Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: References: <1521547203193-0.post@n5.nabble.com> <1521560486104-0.post@n5.nabble.com> Message-ID: Hi, If you are rendering the two volumes at the same time and if they fit in GPU memory, they should be cached on the GPU without having to stream. IIRC, the OpenGL2 volume mapper uses a little more GPU memory over the old mapper but it should not be a significant difference. Thanks, Sankhesh On Tue, Mar 20, 2018 at 11:56 AM Andras Lasso wrote: > Automatic sample distance adjustment is based on measuring rendering > times. If you render multiple volumes then maybe the measurement is not > reliable anymore (just guessing). You could try manually setting sample > distances for all volumes and see if you get more consistent behavior. > > Andras > > -----Original Message----- > From: vtkusers On Behalf Of ianl > Sent: Tuesday, March 20, 2018 11:41 AM > To: vtkusers at vtk.org > Subject: Re: [vtkusers] Volume Rendering Performance With Two Volumes > > Andras Lasso wrote > > Slicer 4.8.1 still uses the OpenGL1 backend. We've noticed slowdown > > with > > OpenGL2 backend in Slicer 4.9, but solved it by tuning adjustment of > > sampling settings. > > > > See the full discussion here: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdisco > > urse.slicer.org%2Ft%2Fvolume-rendering-slow-in-latest-nightlies-for-ma > > cos%2F2231%2F21&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f > > 2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C6365715729 > > 25774613&sdata=s5J76LJnOInDFeBR1APBgyb9Xe5Q8m8yzsZHdbJDbHU%3D&reserved > > =0 > > Interesting that 3DSlicer 4.8.1 is still using the old back end and I am > seeing a similar issue. This somewhat disproves my suspicion that there > might be an issue with multiple volumes introduced with OpenGL2. However, > the effect is certainly worse in our code with the new back end. > > I have tried your fix to set LockSampleDistanceToInputSpacing. This does > not seem to make much difference for us as we have > InteractiveAdjustSampleDistances set on, which presumably overrides it. As > it looks like 3DSlicer is also adjusting ImageSampleDistance from > observation, this may be a difference. I will look into perhaps varying > that too in interactive modes. > > Interestingly, I have just noticed that if I have just two VTK windows > with volumes in, performance is much better and consistent with and without > LockSampleDistanceToInputSpacing. If I have other VTK windows, MPR views > for example, performance drops off on one of the volumes. > > > Andras Lasso wrote > > As a side note, these are very large volumes for a modest GPU such as > > AMD > > R7 200. > > Granted, the card is a few years old, but does have 2GB of graphics memory > and renders volumes of this size and larger very nicely with the old OpenGL > back end. > > > > > -- > 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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=MaOY1zTuXMMAwRrUiG8UFnbZMlKlfcGdbSmmY2vb64s%3D&reserved=0 > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=zRdGnwhQ8HnlZ%2BBGOHRA3pbNBc7cnnAH6ft%2FPITr2B8%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=ElsRWmQqZnJSdcjAdN6DI7LKVOdndAWkV77Sv1Nzkwo%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=yZQrBLgqIPqa10Gjhd2JbJLl%2Fi05vjev0PodYiwtnIE%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=eFJwHeGxaobtJLJ%2FxQ7eUbGWu9IDhoDuIM5umpg5DDo%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%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=0Wfviq%2BeVV6vZeOlFiivuD9rX6uGwtXxeQ6I%2FpUPCa0%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 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Wed Mar 21 10:36:47 2018 From: ilindsay at insigniamedical.co.uk (ianl) Date: Wed, 21 Mar 2018 07:36:47 -0700 (MST) Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: References: <1521547203193-0.post@n5.nabble.com> <1521560486104-0.post@n5.nabble.com> Message-ID: <1521643007315-0.post@n5.nabble.com> Just to be clear, I am interacting with each volume in turn for a few seconds each. It appears that one of the volumes gets cached onto the card and is performant, but not the other, no matter how much I interact with it. I have done some more experimentation, and down sampling the volumes makes a significant improvement to performance. This seems to imply some swapping on/off is going on. Incidentally, GPU-Z shows plenty of GPU RAM left (~700MB), but I don't know how accurate this is and of course it does not give me any idea how fragmented it is. Am I correct in assuming that once the volume data texture is loaded into GPU memory, then performance should only depend on ImageSampleDistance/viewport size i.e. the number of rays cast and SampleDistance i.e. the sample spacing - (in mm?) along the ray? Having less data at a wider spacing to sample through should not make a difference to performance, only quality - or is this a gross simplification. Thanks, Ian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From polly_sukting at hotmail.com Wed Mar 21 10:50:23 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Wed, 21 Mar 2018 14:50:23 +0000 Subject: [vtkusers] vtkThreshold In-Reply-To: References: , Message-ID: Hi Jorge, Thanks for your reply. I could do the ThresholdBetween to get the points. I have another question. Is it possible for me to get the threshold value automatically without pre-assign the value to vtkThreshold? Let me explain further. I am doing a feature extraction using meanCurvature on the 3D vtk polydata. I obtained the meanCurvature values from the dataset. And I realized that threshold value (eg. ThresholdByUpper =0.085) could show the relevant regions (about 500-800 polydata points) that I am looking for. Now I want to obtain the threshold values automatically by looking into the points that If 500 points more than 0.085 >>show me the threshold value If 600 points more than 0.085 >>show me the threshold value I want to reverse the process to get the threshold values. Thanks again. Best, Polly ________________________________ From: Jorge Perez Sent: Wednesday, March 21, 2018 3:26 PM To: Polly Pui Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkThreshold Hello, you can use ThresholdBetween void vtkThreshold::ThresholdBetween ( double lower, double upper ) Criterion is cells whose scalars are between lower and upper thresholds (inclusive of the end values). https://www.vtk.org/doc/nightly/html/classvtkThreshold.html#a20f1127a1da274eea9791c15410e9935 2018-03-21 8:00 GMT+01:00 Polly Pui >: Hi, Previously, I applied vtkThreshold with ThresholdByUpper and get the data extracted on 3D vtk dataset. For example, i could get 500 points out of 5000 points after the thresholding with a criterion of 0.085. vtkThreshold *thresh = vtkThreshold::New(); thresh->SetInputConnection(meanCurve->GetOutputPort()); thresh->ThresholdByUpper(0.085); thresh->AllScalarsOff(); thresh->Update(); Now, my question is, how i can do this process in an opposite way. I want to get the threshold value which the number of the points are within 500-600. Instead of I am the one who providing the threshold value manually. // If meanCurve points 500-600 provide threshold value If meanCurve points 600-700 provide threshold value ...and so on // Thanks. Best, 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 sankhesh.jhaveri at kitware.com Wed Mar 21 11:06:50 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 21 Mar 2018 15:06:50 +0000 Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: <1521643007315-0.post@n5.nabble.com> References: <1521547203193-0.post@n5.nabble.com> <1521560486104-0.post@n5.nabble.com> <1521643007315-0.post@n5.nabble.com> Message-ID: Just so I understand correctly, you have two volumes in the same viewport and are interacting with each separately. Is that the case? Or do you have two different viewports? Do you see the same issue on a different graphics card? As far as performance, I agree if you?re not changing any other property on the volume, viewport size and image sample distance should be the only factors affecting rendering. ? On Wed, Mar 21, 2018 at 10:36 AM ianl wrote: > Just to be clear, I am interacting with each volume in turn for a few > seconds > each. It appears that one of the volumes gets cached onto the card and is > performant, but not the other, no matter how much I interact with it. > > I have done some more experimentation, and down sampling the volumes makes > a > significant improvement to performance. This seems to imply some swapping > on/off is going on. Incidentally, GPU-Z shows plenty of GPU RAM left > (~700MB), but I don't know how accurate this is and of course it does not > give me any idea how fragmented it is. > > Am I correct in assuming that once the volume data texture is loaded into > GPU memory, then performance should only depend on > ImageSampleDistance/viewport size i.e. the number of rays cast and > SampleDistance i.e. the sample spacing - (in mm?) along the ray? Having > less > data at a wider spacing to sample through should not make a difference to > performance, only quality - or is this a gross simplification. > > Thanks, > Ian > > > > -- > 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 paul_geus at hotmail.com Wed Mar 21 11:51:11 2018 From: paul_geus at hotmail.com (pauldoesntlikesurfaceextractio) Date: Wed, 21 Mar 2018 08:51:11 -0700 (MST) Subject: [vtkusers] Implicit boolean and dimensions of vtk Message-ID: <1521647471203-0.post@n5.nabble.com> Hi everyone, I am trying to create a Visualization for my smoothed particle hydrodynamics simulation. This means, that I have a set of unorganized points and using VTK I want to construct a surface body. My current approach is as follows: - Get Surface Particles from all unorganized points - Triangulate the points which have further points nearby as a Delaunay3D - The points which have 5 or less points nearby I want to visualize as Boolean implicit functions, very similar to this tutorial https://lorensen.github.io/VTKExamples/site/Cxx/Filtering/ImplicitBoolean/ My problem: I can?t get the spheres to be smaller. Even when setting the radius of the spheres I still get big spheres. *Can someone please tell me, what I am missing? * *A further question:* What dimension does VTK use? As in, when I set the radius of a sphere to 1. Does that mean 1 meter, 1mm, 1 ft? Thank you very much -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ilindsay at insigniamedical.co.uk Wed Mar 21 11:53:50 2018 From: ilindsay at insigniamedical.co.uk (ianl) Date: Wed, 21 Mar 2018 08:53:50 -0700 (MST) Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: References: <1521547203193-0.post@n5.nabble.com> <1521560486104-0.post@n5.nabble.com> <1521643007315-0.post@n5.nabble.com> Message-ID: <1521647630292-0.post@n5.nabble.com> Two volumes in different VTK windows I see the same issue with the AMD FirePro V5900 card (also 2GB) we have here, but much less pronounced. Volumes of a smaller size seem to trigger the problem more easily, so it seems as though the 900 slice sets are over some threshold for that card and are generally slower so it is difficult to tell. We don't have any NVidia cards unfortunately at the moment to test with. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Mar 21 12:13:13 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Mar 2018 09:13:13 -0700 Subject: [vtkusers] Implicit boolean and dimensions of vtk In-Reply-To: <1521647471203-0.post@n5.nabble.com> References: <1521647471203-0.post@n5.nabble.com> Message-ID: Have you looked at any of the point processing filters in: https://lorensen.github.io/VTKExamples/site/Cxx/#surface-reconstruction Also, there are two remote examples: https://lorensen.github.io/VTKExamples/site/Cxx/Points/CompareExtractSurface/ If you could save your points into a vtkXML file I can a look and try some approaches. Bill On Mar 21, 2018 8:51 AM, "pauldoesntlikesurfaceextractio" < paul_geus at hotmail.com> wrote: > Hi everyone, > > I am trying to create a Visualization for my smoothed particle > hydrodynamics > simulation. This means, that I have a set of unorganized points and using > VTK I want to construct a surface body. > My current approach is as follows: > > - Get Surface Particles from all unorganized points > - Triangulate the points which have further points nearby as a Delaunay3D > - The points which have 5 or less points nearby I want to visualize as > Boolean implicit functions, very similar to this tutorial > https://lorensen.github.io/VTKExamples/site/Cxx/Filtering/ImplicitBoolean/ > > My problem: I can?t get the spheres to be smaller. Even when setting the > radius of the spheres I still get big spheres. *Can someone please tell me, > what I am missing? * > > *A further question:* What dimension does VTK use? As in, when I set the > radius of a sphere to 1. Does that mean 1 meter, 1mm, 1 ft? > Thank you very much > > > > > -- > 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/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 aashish.chaudhary at kitware.com Wed Mar 21 12:37:28 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 21 Mar 2018 12:37:28 -0400 Subject: [vtkusers] Volume Rendering Performance With Two Volumes In-Reply-To: <1521647630292-0.post@n5.nabble.com> References: <1521547203193-0.post@n5.nabble.com> <1521560486104-0.post@n5.nabble.com> <1521643007315-0.post@n5.nabble.com> <1521647630292-0.post@n5.nabble.com> Message-ID: Ianl, It looks like there is something going on with GPU determining how to handle the data well so it seems to be swapping data in-out from main-memory. You probably want to play some more with ImageSampleDistance (set it to 2.0). Also SmartVolumeMapper may help as well. - aashish On Wed, Mar 21, 2018 at 11:53 AM, ianl wrote: > Two volumes in different VTK windows > > I see the same issue with the AMD FirePro V5900 card (also 2GB) we have > here, but much less pronounced. Volumes of a smaller size seem to trigger > the problem more easily, so it seems as though the 900 slice sets are over > some threshold for that card and are generally slower so it is difficult to > tell. We don't have any NVidia cards unfortunately at the moment to test > with. > > > > -- > 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 paul_geus at hotmail.com Wed Mar 21 13:15:45 2018 From: paul_geus at hotmail.com (pauldoesntlikesurfaceextractio) Date: Wed, 21 Mar 2018 10:15:45 -0700 (MST) Subject: [vtkusers] Implicit boolean and dimensions of vtk In-Reply-To: References: <1521647471203-0.post@n5.nabble.com> Message-ID: <1521652545111-0.post@n5.nabble.com> Thanks for the reply. I have indeed used the tutorials/examples that you send me. I can't get the remote ones to install properly though. I think, especially, the poisson reconstruction seems very promising. I will retry installing them. Do you have any information on the dimensions of vtk? As in, what exactly setradius(1) means? Thanks for your help. And thanks for all the great tutorials, I am a daily visitor haha :) I will upload the Data set in half an hour. thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Mar 21 13:24:56 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Mar 2018 10:24:56 -0700 Subject: [vtkusers] Implicit boolean and dimensions of vtk In-Reply-To: <1521652545111-0.post@n5.nabble.com> References: <1521647471203-0.post@n5.nabble.com> <1521652545111-0.post@n5.nabble.com> Message-ID: The units are application defined. If your data is in mm's, then the radius will be in mm's. Looking forward to your data. On Wed, Mar 21, 2018 at 10:15 AM, pauldoesntlikesurfaceextractio wrote: > Thanks for the reply. > > I have indeed used the tutorials/examples that you send me. > I can't get the remote ones to install properly though. I think, > especially, the poisson reconstruction seems very promising. > > I will retry installing them. > > Do you have any information on the dimensions of vtk? > As in, what exactly setradius(1) means? > > Thanks for your help. > And thanks for all the great tutorials, I am a daily visitor haha > :) > > I will upload the Data set in half an hour. thanks > > > > -- > 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 paul_geus at hotmail.com Wed Mar 21 13:31:29 2018 From: paul_geus at hotmail.com (pauldoesntlikesurfaceextractio) Date: Wed, 21 Mar 2018 10:31:29 -0700 (MST) Subject: [vtkusers] Implicit boolean and dimensions of vtk In-Reply-To: References: <1521647471203-0.post@n5.nabble.com> <1521652545111-0.post@n5.nabble.com> Message-ID: <1521653489738-0.post@n5.nabble.com> PointsTest.vtp Here is the File. These points are after I tried extracting the surface. Thank you -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Wed Mar 21 16:14:30 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 21 Mar 2018 14:14:30 -0600 Subject: [vtkusers] 16Bit per color channel? In-Reply-To: References: Message-ID: If you use vtkWindowToImageFilter, the retrieved data is always 8 bits per channel. If you need higher precision, you can try directly calling the GetRGBAPixelData() method of the vtkRenderWindow, which retrieves the data as an array of floats. Whether this actually gives you the precision you desire will depend on the bit depth of the OpenGL color buffer. Also note that the vtkLookupTable and much of VTK's internal color handling assumes 8 bits per channel. - David On Wed, Mar 21, 2018 at 4:56 AM, Sophonet wrote: > Hi list, > > using OSMesa for offscreen rendering (and VTK 8.1.0) I would like to save > the renderwindow content (vtkWindowToImageFilter) with 16 bits per color > channel to file. PNG would support 16 bits per channel ( > https://en.wikipedia.org/wiki/Portable_Network_Graphics), but I am > wondering how to set things up via VTK. Any hint? > > Thanks, > > sophonet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From minpu.code at gmail.com Wed Mar 21 19:35:42 2018 From: minpu.code at gmail.com (pnt1614) Date: Wed, 21 Mar 2018 16:35:42 -0700 (MST) Subject: [vtkusers] How to set color of a clipped mesh? In-Reply-To: References: <1521599330640-0.post@n5.nabble.com> Message-ID: <1521675342895-0.post@n5.nabble.com> Thank you, it works. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Wed Mar 21 19:37:43 2018 From: minpu.code at gmail.com (pnt1614) Date: Wed, 21 Mar 2018 16:37:43 -0700 (MST) Subject: [vtkusers] Why cannot I build and run a subclass of vtkInteractorStyleTrackballActor in the debug mode? Message-ID: <1521675463280-0.post@n5.nabble.com> I use the following code (VTK and MFC) to drag a point to a new position. After click a "picking" button, I use the middle mouse button to move pick and move a point. I can build and run the release mode, but I cannot build in the debug mode because of an error. Is there anyone experienced this problem? Please help me. Thank you. The error messages are "Error (active) no instance of overloaded "InteractorStyle2::operator new" matches the argument list Error C2660 'vtkObject::operator new': function does not take 3 arguments" This my C++ code: class InteractorStyle2 : public vtkInteractorStyleTrackballActor { public: static InteractorStyle2* New(); vtkTypeMacro(InteractorStyle2, vtkInteractorStyleTrackballActor); InteractorStyle2() { this->Move = false; this->PointPicker = vtkSmartPointer::New(); // Setup ghost glyph vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(0, 0, 0); this->MovePolyData = vtkSmartPointer::New(); this->MovePolyData->SetPoints(points); this->MoveGlyphFilter = vtkSmartPointer::New(); this->MoveGlyphFilter->SetInputData(this->MovePolyData); this->MoveGlyphFilter->Update(); this->MoveMapper = vtkSmartPointer::New(); this->MoveMapper->SetInputConnection(this->MoveGlyphFilter->GetOutputPort()); this->MoveActor = vtkSmartPointer::New(); this->MoveActor->SetMapper(this->MoveMapper); this->MoveActor->VisibilityOff(); this->MoveActor->GetProperty()->SetPointSize(10); this->MoveActor->GetProperty()->SetColor(1, 0, 0); } void OnMouseMove() { if (!this->Move) return; vtkInteractorStyleTrackballActor::OnMouseMove(); } void OnMiddleButtonUp() { this->EndPan(); this->Move = false; this->MoveActor->VisibilityOff(); // Turn off rendering a red point this->Data->GetPoints()->SetPoint(this->SelectedPoint, this->MoveActor->GetPosition()); this->Data->Modified(); this->GetCurrentRenderer()->Render(); this->GetCurrentRenderer()->GetRenderWindow()->Render(); } void OnMiddleButtonDown() { // Get the selected point int x = this->Interactor->GetEventPosition()[0]; int y = this->Interactor->GetEventPosition()[1]; this->FindPokedRenderer(x, y); this->PointPicker->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, // always zero. this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()); if (this->PointPicker->GetPointId() >= 0) { this->StartPan(); this->MoveActor->VisibilityOn(); // turn on rendering a red point this->Move = true; this->SelectedPoint = this->PointPicker->GetPointId(); std::cout << "Dragging point " << this->SelectedPoint << std::endl; double p[3]; this->Data->GetPoint(this->SelectedPoint, p); std::cout << "p: " << p[0] << " " << p[1] << " " << p[2] << std::endl; this->MoveActor->SetPosition(p); this->GetCurrentRenderer()->AddActor(this->MoveActor); this->InteractionProp = this->MoveActor; } } vtkPolyData* Data; vtkPolyData* GlyphData; vtkSmartPointer MoveMapper; vtkSmartPointer MoveActor; vtkSmartPointer MovePolyData; vtkSmartPointer MoveGlyphFilter; vtkSmartPointer PointPicker; bool Move; vtkIdType SelectedPoint; }; vtkStandardNewMacro(InteractorStyle2); // error occurs in the debug mode //.... void CvtkMFCDlgExDlg::OnBnClickedButtonPicking() { vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(0, 0, 0); points->InsertNextPoint(1, 0, 0); points->InsertNextPoint(2, 0, 0); vtkSmartPointer input = vtkSmartPointer::New(); input->SetPoints(points); vtkSmartPointer glyphFilter = vtkSmartPointer::New(); glyphFilter->SetInputData(input); glyphFilter->Update(); // Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(glyphFilter->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(10); // Visualize vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(actor); m_vtkWindow->AddRenderer(renderer); m_vtkWindow->Render(); vtkSmartPointer renderWindowInteractor = m_vtkWindow->GetInteractor(); vtkSmartPointer style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle(style); style->Data = input; } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Jesse.Kinross-Smith at bentley.com Wed Mar 21 20:15:04 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Thu, 22 Mar 2018 00:15:04 +0000 Subject: [vtkusers] Why cannot I build and run a subclass of vtkInteractorStyleTrackballActor in the debug mode? In-Reply-To: <1521675463280-0.post@n5.nabble.com> References: <1521675463280-0.post@n5.nabble.com> Message-ID: Ooh.. one I can answer as I've done this! I think you're missing the line: vtkStandardNewMacro(InteractorStyle2); in your CPP file. This will create the overloaded New() for you. Jesse -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of pnt1614 Sent: Thursday, 22 March 2018 7:38 AM To: vtkusers at vtk.org Subject: [vtkusers] Why cannot I build and run a subclass of vtkInteractorStyleTrackballActor in the debug mode? I use the following code (VTK and MFC) to drag a point to a new position. After click a "picking" button, I use the middle mouse button to move pick and move a point. I can build and run the release mode, but I cannot build in the debug mode because of an error. Is there anyone experienced this problem? Please help me. Thank you. The error messages are "Error (active) no instance of overloaded "InteractorStyle2::operator new" matches the argument list Error C2660 'vtkObject::operator new': function does not take 3 arguments" This my C++ code: class InteractorStyle2 : public vtkInteractorStyleTrackballActor { public: static InteractorStyle2* New(); vtkTypeMacro(InteractorStyle2, vtkInteractorStyleTrackballActor); InteractorStyle2() { this->Move = false; this->PointPicker = vtkSmartPointer::New(); // Setup ghost glyph vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(0, 0, 0); this->MovePolyData = vtkSmartPointer::New(); this->MovePolyData->SetPoints(points); this->MoveGlyphFilter = vtkSmartPointer::New(); this->MoveGlyphFilter->SetInputData(this->MovePolyData); this->MoveGlyphFilter->Update(); this->MoveMapper = vtkSmartPointer::New(); this->MoveMapper->SetInputConnection(this->MoveGlyphFilter->GetOutputPor this->MoveMapper->t()); this->MoveActor = vtkSmartPointer::New(); this->MoveActor->SetMapper(this->MoveMapper); this->MoveActor->VisibilityOff(); this->MoveActor->GetProperty()->SetPointSize(10); this->MoveActor->GetProperty()->SetColor(1, 0, 0); } void OnMouseMove() { if (!this->Move) return; vtkInteractorStyleTrackballActor::OnMouseMove(); } void OnMiddleButtonUp() { this->EndPan(); this->Move = false; this->MoveActor->VisibilityOff(); // Turn off rendering a red point this->Data->GetPoints()->SetPoint(this->SelectedPoint, this->MoveActor->GetPosition()); this->Data->Modified(); this->GetCurrentRenderer()->Render(); this->GetCurrentRenderer()->GetRenderWindow()->Render(); } void OnMiddleButtonDown() { // Get the selected point int x = this->Interactor->GetEventPosition()[0]; int y = this->Interactor->GetEventPosition()[1]; this->FindPokedRenderer(x, y); this->PointPicker->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, // always zero. this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()) this->Interactor->; if (this->PointPicker->GetPointId() >= 0) { this->StartPan(); this->MoveActor->VisibilityOn(); // turn on rendering a red point this->Move = true; this->SelectedPoint = this->PointPicker->GetPointId(); std::cout << "Dragging point " << this->SelectedPoint << std::endl; double p[3]; this->Data->GetPoint(this->SelectedPoint, p); std::cout << "p: " << p[0] << " " << p[1] << " " << p[2] << std::endl; this->MoveActor->SetPosition(p); this->GetCurrentRenderer()->AddActor(this->MoveActor); this->InteractionProp = this->MoveActor; } } vtkPolyData* Data; vtkPolyData* GlyphData; vtkSmartPointer MoveMapper; vtkSmartPointer MoveActor; vtkSmartPointer MovePolyData; vtkSmartPointer MoveGlyphFilter; vtkSmartPointer PointPicker; bool Move; vtkIdType SelectedPoint; }; vtkStandardNewMacro(InteractorStyle2); // error occurs in the debug mode //.... void CvtkMFCDlgExDlg::OnBnClickedButtonPicking() { vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(0, 0, 0); points->InsertNextPoint(1, 0, 0); points->InsertNextPoint(2, 0, 0); vtkSmartPointer input = vtkSmartPointer::New(); input->SetPoints(points); vtkSmartPointer glyphFilter = vtkSmartPointer::New(); glyphFilter->SetInputData(input); glyphFilter->Update(); // Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(glyphFilter->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(10); // Visualize vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(actor); m_vtkWindow->AddRenderer(renderer); m_vtkWindow->Render(); vtkSmartPointer renderWindowInteractor = m_vtkWindow->GetInteractor(); vtkSmartPointer style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle(style); style->Data = input; } -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk.1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=NIAFIEDf5L0rrSS86V_zdoKoe8nSLZjmBd89F5-L2C8&e= _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=dW8JORvscqn4ODNxJQnnrv7jq-oXxJ8MLWe-GRPAvy8&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=HU0mKy-Jfjc1gWcLXUUtQsJGJnByhOKyRCcZBuFxCII&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=347P0Va3uvBfYPTHeJ1Bx1Wmt9oMUUDvFb1FNoSvVyw&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=mJn5y0rmdBLoVkg_ZmwWWO4bfTnqD6uo09EV4I0FBTE&e= From Jesse.Kinross-Smith at bentley.com Wed Mar 21 20:21:06 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Thu, 22 Mar 2018 00:21:06 +0000 Subject: [vtkusers] Why cannot I build and run a subclass of vtkInteractorStyleTrackballActor in the debug mode? In-Reply-To: <1521675463280-0.post@n5.nabble.com> References: <1521675463280-0.post@n5.nabble.com> Message-ID: Ahh.. I got too excited in trying to help that I missed the obvious. You were doing the vtkStandardNewMacro, but you were doing it further down the file. Try putting it at the top of the file BEFORE the standard MFC #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif This is mine for an example: Header file: class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleCustom : public vtkInteractorStyleRubberBand3D { public: static vtkInteractorStyleCustom *New(); ... protected: vtkInteractorStyleMOSESGui(); ~vtkInteractorStyleMOSESGui(); ... }; And then my CPP file consists of: #includes... vtkStandardNewMacro(vtkInteractorStyleCustom); #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif vtkInteractorStyleCustom:: vtkInteractorStyleCustom () : vtkInteractorStyleRubberBand3D() { ... } -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of pnt1614 Sent: Thursday, 22 March 2018 7:38 AM To: vtkusers at vtk.org Subject: [vtkusers] Why cannot I build and run a subclass of vtkInteractorStyleTrackballActor in the debug mode? I use the following code (VTK and MFC) to drag a point to a new position. After click a "picking" button, I use the middle mouse button to move pick and move a point. I can build and run the release mode, but I cannot build in the debug mode because of an error. Is there anyone experienced this problem? Please help me. Thank you. The error messages are "Error (active) no instance of overloaded "InteractorStyle2::operator new" matches the argument list Error C2660 'vtkObject::operator new': function does not take 3 arguments" This my C++ code: class InteractorStyle2 : public vtkInteractorStyleTrackballActor { public: static InteractorStyle2* New(); vtkTypeMacro(InteractorStyle2, vtkInteractorStyleTrackballActor); InteractorStyle2() { this->Move = false; this->PointPicker = vtkSmartPointer::New(); // Setup ghost glyph vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(0, 0, 0); this->MovePolyData = vtkSmartPointer::New(); this->MovePolyData->SetPoints(points); this->MoveGlyphFilter = vtkSmartPointer::New(); this->MoveGlyphFilter->SetInputData(this->MovePolyData); this->MoveGlyphFilter->Update(); this->MoveMapper = vtkSmartPointer::New(); this->MoveMapper->SetInputConnection(this->MoveGlyphFilter->GetOutputPor this->MoveMapper->t()); this->MoveActor = vtkSmartPointer::New(); this->MoveActor->SetMapper(this->MoveMapper); this->MoveActor->VisibilityOff(); this->MoveActor->GetProperty()->SetPointSize(10); this->MoveActor->GetProperty()->SetColor(1, 0, 0); } void OnMouseMove() { if (!this->Move) return; vtkInteractorStyleTrackballActor::OnMouseMove(); } void OnMiddleButtonUp() { this->EndPan(); this->Move = false; this->MoveActor->VisibilityOff(); // Turn off rendering a red point this->Data->GetPoints()->SetPoint(this->SelectedPoint, this->MoveActor->GetPosition()); this->Data->Modified(); this->GetCurrentRenderer()->Render(); this->GetCurrentRenderer()->GetRenderWindow()->Render(); } void OnMiddleButtonDown() { // Get the selected point int x = this->Interactor->GetEventPosition()[0]; int y = this->Interactor->GetEventPosition()[1]; this->FindPokedRenderer(x, y); this->PointPicker->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, // always zero. this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()) this->Interactor->; if (this->PointPicker->GetPointId() >= 0) { this->StartPan(); this->MoveActor->VisibilityOn(); // turn on rendering a red point this->Move = true; this->SelectedPoint = this->PointPicker->GetPointId(); std::cout << "Dragging point " << this->SelectedPoint << std::endl; double p[3]; this->Data->GetPoint(this->SelectedPoint, p); std::cout << "p: " << p[0] << " " << p[1] << " " << p[2] << std::endl; this->MoveActor->SetPosition(p); this->GetCurrentRenderer()->AddActor(this->MoveActor); this->InteractionProp = this->MoveActor; } } vtkPolyData* Data; vtkPolyData* GlyphData; vtkSmartPointer MoveMapper; vtkSmartPointer MoveActor; vtkSmartPointer MovePolyData; vtkSmartPointer MoveGlyphFilter; vtkSmartPointer PointPicker; bool Move; vtkIdType SelectedPoint; }; vtkStandardNewMacro(InteractorStyle2); // error occurs in the debug mode //.... void CvtkMFCDlgExDlg::OnBnClickedButtonPicking() { vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(0, 0, 0); points->InsertNextPoint(1, 0, 0); points->InsertNextPoint(2, 0, 0); vtkSmartPointer input = vtkSmartPointer::New(); input->SetPoints(points); vtkSmartPointer glyphFilter = vtkSmartPointer::New(); glyphFilter->SetInputData(input); glyphFilter->Update(); // Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(glyphFilter->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(10); // Visualize vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(actor); m_vtkWindow->AddRenderer(renderer); m_vtkWindow->Render(); vtkSmartPointer renderWindowInteractor = m_vtkWindow->GetInteractor(); vtkSmartPointer style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle(style); style->Data = input; } -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk.1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=NIAFIEDf5L0rrSS86V_zdoKoe8nSLZjmBd89F5-L2C8&e= _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=dW8JORvscqn4ODNxJQnnrv7jq-oXxJ8MLWe-GRPAvy8&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=HU0mKy-Jfjc1gWcLXUUtQsJGJnByhOKyRCcZBuFxCII&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=347P0Va3uvBfYPTHeJ1Bx1Wmt9oMUUDvFb1FNoSvVyw&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=QPUyrnKdkaGJHD0OTha3x09u1N6qkcvUsRW8n2fg59E&m=HsDAM8uSamf6yLdv9u0Y3Bz8y1PqEyqlwZRYTwGdEgY&s=mJn5y0rmdBLoVkg_ZmwWWO4bfTnqD6uo09EV4I0FBTE&e= From minpu.code at gmail.com Wed Mar 21 21:03:27 2018 From: minpu.code at gmail.com (pnt1614) Date: Wed, 21 Mar 2018 18:03:27 -0700 (MST) Subject: [vtkusers] How to use multiple vtkContourWidget on the same mesh? Message-ID: <1521680607147-0.post@n5.nabble.com> I can use one vtkContourWidget to draw a contour on a model's surface by clicking points. But I want to use multiple vtkContourWidgets to draw many contours one by one. For example, if the current vtkContourWidget is finished (closed) when the start point and the end point are the same, the next clicked point starts a new vtkContourWidget. Is there anyway to implement this idea? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Wed Mar 21 21:42:45 2018 From: minpu.code at gmail.com (pnt1614) Date: Wed, 21 Mar 2018 18:42:45 -0700 (MST) Subject: [vtkusers] Why cannot I build and run a subclass of vtkInteractorStyleTrackballActor in the debug mode? In-Reply-To: References: <1521675463280-0.post@n5.nabble.com> Message-ID: <1521682965965-0.post@n5.nabble.com> Thank for your help, it works. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Thu Mar 22 00:40:35 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Mar 2018 21:40:35 -0700 Subject: [vtkusers] Implicit boolean and dimensions of vtk In-Reply-To: <1521653489738-0.post@n5.nabble.com> References: <1521647471203-0.post@n5.nabble.com> <1521652545111-0.post@n5.nabble.com> <1521653489738-0.post@n5.nabble.com> Message-ID: To obtain the Poisson remote module place the attached file in VTK/Remote Run cmake Then edit the CMakeLists.txt file entry: //Request building PoissonReconstruction Module_PoissonReconstruction:BOOL=ON and make. This will add the PoissonReconstruction to VTK. Then, in your VTKExamples build directory, make rebuild_cache make PoissonExtractSurface On Wed, Mar 21, 2018 at 10:31 AM, pauldoesntlikesurfaceextractio wrote: > PointsTest.vtp > > Here is the File. > These points are after I tried extracting the surface. > Thank you > > > > -- > 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: PoissonReconstruction.remote.cmake Type: application/octet-stream Size: 299 bytes Desc: not available URL: From bill.lorensen at gmail.com Thu Mar 22 00:42:52 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Mar 2018 21:42:52 -0700 Subject: [vtkusers] Implicit boolean and dimensions of vtk In-Reply-To: References: <1521647471203-0.post@n5.nabble.com> <1521652545111-0.post@n5.nabble.com> <1521653489738-0.post@n5.nabble.com> Message-ID: I've run your data through most of the examples in VTKExamples/Src/Cxx/Points. I'm not sure what structure we should see. Also, do you have the original point data? On Wed, Mar 21, 2018 at 9:40 PM, Bill Lorensen wrote: > To obtain the Poisson remote module place the attached file in VTK/Remote > Run cmake > Then edit the CMakeLists.txt file entry: > //Request building PoissonReconstruction > Module_PoissonReconstruction:BOOL=ON > and make. This will add the PoissonReconstruction to VTK. > > Then, in your VTKExamples build directory, > make rebuild_cache > make PoissonExtractSurface > > > On Wed, Mar 21, 2018 at 10:31 AM, pauldoesntlikesurfaceextractio > wrote: >> PointsTest.vtp >> >> Here is the File. >> These points are after I tried extracting the surface. >> Thank you >> >> >> >> -- >> 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 -- Unpaid intern in BillsParadise at noware dot com From gavin.wheeler at kcl.ac.uk Thu Mar 22 13:45:08 2018 From: gavin.wheeler at kcl.ac.uk (Gavin) Date: Thu, 22 Mar 2018 10:45:08 -0700 (MST) Subject: [vtkusers] Using vtkExternalOpenGLCamera In-Reply-To: References: <1500472740832-5744015.post@n5.nabble.com> Message-ID: <1521740708755-0.post@n5.nabble.com> I've been using vtkExternalXXXX to try and integrate VTK into Unity, so this is a very interesting thread. However, the documentation and examples are a bit thin, and so I found myself rather confused... - I never realised a 'normal' camera and renderer can be used with the external render window - the documentation really does not point to this being a possibility. (Ditto the converse that an External Light needs to be used - I wondered why the lighting I added had no effect) I ended up deriving my own renderer class from vtkExternalOpenGLRenderer to stop it overwriting the View and Projection matrices I'd set. I'll try using the vtkOpenGLRenderer instead. I hope I can use the vtkExternalOpenGLCamera with this class - this is the one which adds the methods to set the View and Projection matrices. As I say I found it really unclear that if you use the vtkExternalOpenGLCamera to set the View and Projection Matrices they'll be overwritten if you also use vtkExternalOpenGLRenderer. - I never had any success getting vtkExternalOpenGLRenderer to acquire correct view and projection matrices I'm no OpenGL expert, so bear with me if I have totally the wrong idea here. When I look at the latest documentation for OpenGL (V4.6) the calls... glGetDoublev(GL_MODELVIEW_MATRIX,mv); glGetDoublev(GL_PROJECTION_MATRIX,p); ...as used in vtkExternalOpenGLRenderer::Render(void) don't appear to be supported. glGetDoublev is a function but GL_MODELVIEW_MATRIX and GL_PROJECTION_MATRIX are not defined - see https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGet.xhtml However, they do seem to be defined for OpenGL 2.1 https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glGet.xml Which to me makes sense as I understand the pipeline is user defined for OpenGL 3+ but was defined OpenGL 2.X So, am I wrong in thinking that vtkExternalOpenGLRenderer will only work with older versions of OpenGL? That's how it appears to me, I've found nothing to say what versions are(n't) supported. If I am wrong, please correct me and explain why - I'm keen to learn more about how this all works and to help in my future development. Thanks, G -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From goodwin.lawlor.lists at gmail.com Thu Mar 22 15:48:19 2018 From: goodwin.lawlor.lists at gmail.com (Goodwin Lawlor) Date: Thu, 22 Mar 2018 19:48:19 +0000 Subject: [vtkusers] How to clip a 3D mesh with a curve surface? In-Reply-To: <1521591864125-0.post@n5.nabble.com> References: <1521591864125-0.post@n5.nabble.com> Message-ID: Hello pnt1614, Have a look at a similar C++ example of vtkSelectPolyData (from Bill's VTK examples) https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/SelectPolyData/ FYI, the selectionPoints object defines the curves that clips yours surface. hth Goodwin On Wed, Mar 21, 2018 at 12:24 AM, pnt1614 wrote: > I have searched on the google and there is an answer > (http://vtkusers.public.kitware.narkive.com/UA15hWtq/ > mesh-cutting-using-freehand-curve) > but I do not completetly understand. > > A part of answer is > > Try out this pipeline: > (in Tcl but it's the same idea in any language) > > vtkPoints selectionPoints > selectionPoints InsertNextPoint 1.0 1.0 1.0 > # etc... > > vtkSelectPolyData select > select SetLoop selectionPoints > # connect your data here > select SetInputConnection [mydataFilter GetOutputPort] > select GenerateSelectionScalarsOn > select SetSelectionModeToLargestRegion; > > vtkClipPolyData selectclip > selectclip SetInputConnection [select GetOutputPort] > selectclip SetValue 0.0 > > I am using C++ and I do not understand "selectedPoints" part. Is there > someone using Tcl? Please help me. Thank you > > > > -- > 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 utkarsh.ayachit at kitware.com Thu Mar 22 16:18:06 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Thu, 22 Mar 2018 16:18:06 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Folks, Here's the survey summary along with a summary of responses. I'm clubbing ParaView and VTK results since they are similar and probably choose to do the same thing. Most of the negative comments seem to have one theme -- the mailing list mode. For those who want to use email client as the way to receive and respond to messages seem to have not had the best experience. However, if we simply use the activity on forum as an indicator, we notice that both ITK and Slicer saw a decent bump. Our sysadmins have also said that they'd rather move to Discourse as that'd open more hosting options as it no longer requires the project websites and mailing lists to be hosted on the same server. *VTK Voting Results (66 responses)* Yes: 59.1 % No: 24.2 % Neutral: 12.1% *ParaView Voting Results (46 responses)* Yes: 58.7 % No: 15.2 % Neutral: 21.7 % *Summary of NAY comments:* - Mailing-list mode for discourse has formatting issues. - Replies don't respect quotations forcing responders to use HTML modes. - Changes to `from` address makes off list responses impossible - replying to `from` address bounces, making `reply all` not work - discards signatures - Easier to lurk and monitor mailing list messages without having to visit website for updates *Summary of YAY comments:* - Several users on other projects have had positive experience - better code formatting/editing of posts etc. - better searching capabilities - ability to subscribe to topics - ability to organize, control, edit, attach etc - easier to filter spam (mailing list has been targeted by email spoofers in recent weeks) *Stats from Slicer/ITK migration (monthly avg. messages):* - ITK - mailing lists (itk-users + itk-developers): 148 - Discourse: 297. - Slicer - mailing lists: 247 - Discourse: 639 Given all that, my conclusion is we should move ahead with this migration. Please yell if you think that isn't a fair conclusion. Not sure of the timeline for the migration or how to organize it etc etc, but that can be a separate conversation. Thanks all for participating. Utkarsh -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Mar 22 16:37:17 2018 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 22 Mar 2018 16:37:17 -0400 Subject: [vtkusers] Using vtkExternalOpenGLCamera In-Reply-To: <1521740708755-0.post@n5.nabble.com> References: <1500472740832-5744015.post@n5.nabble.com> <1521740708755-0.post@n5.nabble.com> Message-ID: At least pieces of that code look out of date as the matrix and lighting ops definitely will no longer work with the new OpenGL2 3.2 based backend. But I have heard of people doing something like what you described, but maybe they are using the vtkGenericOpenGLRenderWindow instead. On Thu, Mar 22, 2018 at 1:45 PM, Gavin wrote: > I've been using vtkExternalXXXX to try and integrate VTK into Unity, so > this > is a very interesting thread. However, the documentation and examples are a > bit thin, and so I found myself rather confused... > > - I never realised a 'normal' camera and renderer can be used with the > external render window - the documentation really does not point to this > being a possibility. (Ditto the converse that an External Light needs to be > used - I wondered why the lighting I added had no effect) > > I ended up deriving my own renderer class from vtkExternalOpenGLRenderer to > stop it overwriting the View and Projection matrices I'd set. I'll try > using > the vtkOpenGLRenderer instead. I hope I can use the vtkExternalOpenGLCamera > with this class - this is the one which adds the methods to set the View > and > Projection matrices. As I say I found it really unclear that if you use the > vtkExternalOpenGLCamera to set the View and Projection Matrices they'll be > overwritten if you also use vtkExternalOpenGLRenderer. > > - I never had any success getting vtkExternalOpenGLRenderer to acquire > correct view and projection matrices > > I'm no OpenGL expert, so bear with me if I have totally the wrong idea > here. > When I look at the latest documentation for OpenGL (V4.6) the calls... > > glGetDoublev(GL_MODELVIEW_MATRIX,mv); > glGetDoublev(GL_PROJECTION_MATRIX,p); > > ...as used in vtkExternalOpenGLRenderer::Render(void) don't appear to be > supported. glGetDoublev is a function but GL_MODELVIEW_MATRIX and > GL_PROJECTION_MATRIX are not defined - see > https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGet.xhtml > > However, they do seem to be defined for OpenGL 2.1 > https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glGet.xml > > Which to me makes sense as I understand the pipeline is user defined for > OpenGL 3+ but was defined OpenGL 2.X > > So, am I wrong in thinking that vtkExternalOpenGLRenderer will only work > with older versions of OpenGL? That's how it appears to me, I've found > nothing to say what versions are(n't) supported. If I am wrong, please > correct me and explain why - I'm keen to learn more about how this all > works > and to help in my future development. > > Thanks, G > > > > > -- > 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 > -- 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 minpu.code at gmail.com Thu Mar 22 20:53:31 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 22 Mar 2018 17:53:31 -0700 (MST) Subject: [vtkusers] How to clip a 3D mesh with a curve surface? In-Reply-To: References: <1521591864125-0.post@n5.nabble.com> Message-ID: <1521766411466-0.post@n5.nabble.com> Thank for your help. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From minpu.code at gmail.com Thu Mar 22 21:14:05 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 22 Mar 2018 18:14:05 -0700 (MST) Subject: [vtkusers] Is there anyway to apply a transform to an actor when using a timer? Message-ID: <1521767645466-0.post@n5.nabble.com> First, I follow an example (https://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Animation) to simulate an animation. Instead of specifying a position for an actor, I want to apply a transformation to the actor but I do not know how to do it. Is there anyone knowing how to do it? Please, help me -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.stansvik at orexplore.com Fri Mar 23 03:45:46 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 23 Mar 2018 08:45:46 +0100 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Den 22 mars 2018 9:18 em skrev "Utkarsh Ayachit" < utkarsh.ayachit at kitware.com>: Folks, Here's the survey summary along with a summary of responses. I'm clubbing ParaView and VTK results since they are similar and probably choose to do the same thing. Most of the negative comments seem to have one theme -- the mailing list mode. For those who want to use email client as the way to receive and respond to messages seem to have not had the best experience. However, if we simply use the activity on forum as an indicator, we notice that both ITK and Slicer saw a decent bump. Our sysadmins have also said that they'd rather move to Discourse as that'd open more hosting options as it no longer requires the project websites and mailing lists to be hosted on the same server. *VTK Voting Results (66 responses)* Yes: 59.1 % No: 24.2 % Neutral: 12.1% *ParaView Voting Results (46 responses)* Yes: 58.7 % No: 15.2 % Neutral: 21.7 % *Summary of NAY comments:* - Mailing-list mode for discourse has formatting issues. - Replies don't respect quotations forcing responders to use HTML modes. - Changes to `from` address makes off list responses impossible - replying to `from` address bounces, making `reply all` not work - discards signatures - Easier to lurk and monitor mailing list messages without having to visit website for updates *Summary of YAY comments:* - Several users on other projects have had positive experience - better code formatting/editing of posts etc. - better searching capabilities - ability to subscribe to topics - ability to organize, control, edit, attach etc - easier to filter spam (mailing list has been targeted by email spoofers in recent weeks) *Stats from Slicer/ITK migration (monthly avg. messages):* - ITK - mailing lists (itk-users + itk-developers): 148 - Discourse: 297. - Slicer - mailing lists: 247 - Discourse: 639 Given all that, my conclusion is we should move ahead with this migration. Please yell if you think that isn't a fair conclusion. Not sure of the timeline for the migration or how to organize it etc etc, but that can be a separate conversation. Cannot be honest and say it was unfair, so I'll grudgingly accept defeat :) Hopefully the email experience is improved in the future. Thanks for doing the survey/summary Utkarsh. Elvis Thanks all for participating. Utkarsh _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 sid.murthy at gmail.com Fri Mar 23 08:25:58 2018 From: sid.murthy at gmail.com (Sid Murthy) Date: Fri, 23 Mar 2018 06:25:58 -0600 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: $100 - $300 a month or more for discourse? Who is picking up the tab? On Thu, Mar 22, 2018 at 2:18 PM, Utkarsh Ayachit < utkarsh.ayachit at kitware.com> wrote: > Folks, > > Here's the survey summary along with a summary of responses. I'm clubbing > ParaView and VTK results since they are similar and probably choose to do > the same thing. Most of the negative comments seem to have one theme -- the > mailing list mode. For those who want to use email client as the way to > receive and respond to messages seem to have not had the best experience. > However, if we simply use the activity on forum as an indicator, we notice > that both ITK and Slicer saw a decent bump. Our sysadmins have also said > that they'd rather move to Discourse as that'd open more hosting options as > it no longer requires the project websites and mailing lists to be hosted > on the same server. > > *VTK Voting Results (66 responses)* > > Yes: 59.1 % > No: 24.2 % > Neutral: 12.1% > > *ParaView Voting Results (46 responses)* > > Yes: 58.7 % > No: 15.2 % > Neutral: 21.7 % > > > *Summary of NAY comments:* > > - Mailing-list mode for discourse has formatting issues. > - Replies don't respect quotations forcing responders to use HTML > modes. > - Changes to `from` address makes off list responses impossible > - replying to `from` address bounces, making `reply all` not work > - discards signatures > - Easier to lurk and monitor mailing list messages without having to > visit website for updates > > > *Summary of YAY comments:* > > - Several users on other projects have had positive experience > - better code formatting/editing of posts etc. > - better searching capabilities > - ability to subscribe to topics > - ability to organize, control, edit, attach etc > - easier to filter spam (mailing list has been targeted by email > spoofers in recent weeks) > > *Stats from Slicer/ITK migration (monthly avg. messages):* > > - ITK > - mailing lists (itk-users + itk-developers): 148 > - Discourse: 297. > - Slicer > - mailing lists: 247 > - Discourse: 639 > > > Given all that, my conclusion is we should move ahead with this migration. > Please yell if you think that isn't a fair conclusion. Not sure of the > timeline for the migration or how to organize it etc etc, but that can be a > separate conversation. > > Thanks all for participating. > > Utkarsh > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 mathieu.westphal at kitware.com Fri Mar 23 08:31:16 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Fri, 23 Mar 2018 12:31:16 +0000 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: Discourse is an open source software. We will host it ourselves. Best, On Fri, 23 Mar 2018, 20:26 Sid Murthy, wrote: > $100 - $300 a month or more for discourse? Who is picking up the tab? > > > > On Thu, Mar 22, 2018 at 2:18 PM, Utkarsh Ayachit < > utkarsh.ayachit at kitware.com> wrote: > >> Folks, >> >> Here's the survey summary along with a summary of responses. I'm clubbing >> ParaView and VTK results since they are similar and probably choose to do >> the same thing. Most of the negative comments seem to have one theme -- the >> mailing list mode. For those who want to use email client as the way to >> receive and respond to messages seem to have not had the best experience. >> However, if we simply use the activity on forum as an indicator, we notice >> that both ITK and Slicer saw a decent bump. Our sysadmins have also said >> that they'd rather move to Discourse as that'd open more hosting options as >> it no longer requires the project websites and mailing lists to be hosted >> on the same server. >> >> *VTK Voting Results (66 responses)* >> >> Yes: 59.1 % >> No: 24.2 % >> Neutral: 12.1% >> >> *ParaView Voting Results (46 responses)* >> >> Yes: 58.7 % >> No: 15.2 % >> Neutral: 21.7 % >> >> >> *Summary of NAY comments:* >> >> - Mailing-list mode for discourse has formatting issues. >> - Replies don't respect quotations forcing responders to use HTML >> modes. >> - Changes to `from` address makes off list responses impossible >> - replying to `from` address bounces, making `reply all` not work >> - discards signatures >> - Easier to lurk and monitor mailing list messages without having to >> visit website for updates >> >> >> *Summary of YAY comments:* >> >> - Several users on other projects have had positive experience >> - better code formatting/editing of posts etc. >> - better searching capabilities >> - ability to subscribe to topics >> - ability to organize, control, edit, attach etc >> - easier to filter spam (mailing list has been targeted by email >> spoofers in recent weeks) >> >> *Stats from Slicer/ITK migration (monthly avg. messages):* >> >> - ITK >> - mailing lists (itk-users + itk-developers): 148 >> - Discourse: 297. >> - Slicer >> - mailing lists: 247 >> - Discourse: 639 >> >> >> Given all that, my conclusion is we should move ahead with this >> migration. Please yell if you think that isn't a fair conclusion. Not sure >> of the timeline for the migration or how to organize it etc etc, but that >> can be a separate conversation. >> >> Thanks all for participating. >> >> Utkarsh >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 utkarsh.ayachit at kitware.com Fri Mar 23 10:45:35 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Fri, 23 Mar 2018 10:45:35 -0400 Subject: [vtkusers] Idea: move from mailing lists to Discourse In-Reply-To: References: Message-ID: > Cannot be honest and say it was unfair, so I'll grudgingly accept defeat :) Hopefully the email experience is improved in the future. Thanks for doing the survey/summary Utkarsh. Thanks for understanding, Elvis. We may just have to push back on the Discourse team to improve their email support. I am hopefully, things will keep improving. When we migrated to Gitlab, it had quite a few idiosyncrasies too, but things seem to have improved dramatically since and today I cannot image using Gerrit or even worse, the stage-based git workflow we had before. Utkarsh From tamim.boubou at gmail.com Sun Mar 25 08:00:01 2018 From: tamim.boubou at gmail.com (Tamim) Date: Sun, 25 Mar 2018 05:00:01 -0700 (MST) Subject: [vtkusers] Drag boxwidget long a fixed axis Message-ID: <1521979201839-0.post@n5.nabble.com> Hello, I have a vtkboxwidget2 and I can do the following with it : Move it left,right, up ,down ,forward,backward with my keyboard, rotate it around one of its fixed axis at a time (Rotate it around X only,Y only, or Z only). I've been trying to apply the fixed rotation on movement with my mouse, i.e I want to be able to drag the box with mouse only along one of the axis at a time. I've tried many ways but no success so far. Any ideas? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Jesse.Kinross-Smith at bentley.com Mon Mar 26 03:42:43 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Mon, 26 Mar 2018 07:42:43 +0000 Subject: [vtkusers] Any plan to update the books? Message-ID: Are there any plans to update these books at all? I'd love to get some books to help me learn the ins and outs of VTK for the office, but anything over 5 years old in this industry is usually pretty obsolete I've found. Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th Edition - December 1, 2006 https://www.amazon.com/Visualization-Toolkit-Object-Oriented-Approach-Graphics/dp/193093419X VTK User's Guide Paperback - 11th Ed. March 18, 2010 https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 Jesse -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Mar 26 10:38:30 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 26 Mar 2018 10:38:30 -0400 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: We don't have any near term plans for an update. The books certainly do need a refresh, including a math reformat for the free online versions, however just about of the techniques described in them are still valid. Most of the code is still valid, with the important exception of a few places in need of version 5->6 changes. For those refer to https://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith < Jesse.Kinross-Smith at bentley.com> wrote: > Are there any plans to update these books at all? > > I?d love to get some books to help me learn the ins and outs of VTK for > the office, but anything over 5 years old in this industry is usually > pretty obsolete I?ve found. > > > > Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th > Edition - December 1, 2006 > > https://www.amazon.com/Visualization-Toolkit-Object- > Oriented-Approach-Graphics/dp/193093419X > > > > VTK User's Guide Paperback ? 11th Ed. March 18, 2010 > > https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 > > > > Jesse > > -- > > 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 lasso at queensu.ca Mon Mar 26 10:49:09 2018 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 26 Mar 2018 14:49:09 +0000 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: Yes, the VTK textbook is great and still up-to-date, except specific source code examples. If it was made available in editable form then I?m sure there would be volunteers to update the examples (convert Tcl to Python and update according to VTK API), and maybe describe some notable core changes (pipeline changes, etc). I have never found the VTK User?s Guide particularly suitable for a printed book format. At user guide level online resources (examples, API documentation, etc.) are easier to use, because you can search better, they are hyperlinked, you can copy-paste, etc. Online materials are also easier to keep up-to-date. Andras From: vtkusers On Behalf Of David E DeMarle Sent: Monday, March 26, 2018 10:39 AM To: Jesse Kinross-Smith Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Any plan to update the books? We don't have any near term plans for an update. The books certainly do need a refresh, including a math reformat for the free online versions, however just about of the techniques described in them are still valid. Most of the code is still valid, with the important exception of a few places in need of version 5->6 changes. For those refer to https://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith > wrote: Are there any plans to update these books at all? I?d love to get some books to help me learn the ins and outs of VTK for the office, but anything over 5 years old in this industry is usually pretty obsolete I?ve found. Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th Edition - December 1, 2006 https://www.amazon.com/Visualization-Toolkit-Object-Oriented-Approach-Graphics/dp/193093419X VTK User's Guide Paperback ? 11th Ed. March 18, 2010 https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 Jesse -- 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 berk.geveci at kitware.com Mon Mar 26 10:56:29 2018 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 26 Mar 2018 10:56:29 -0400 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: Just a quick update on this guys. We would love to provide editable versions of both books. The challenge is that they are in old Framemaker format and we have not had the time to focus on finding a way to generate some form of editable content from them. I don't believe exporting to another format from Framemaker is a good option. So we have contemplating scraping the PDF for content and generating all new images (which Bill Lorensen did to a great extent). Will Schroeder has been contemplating doing a new version that is interactive on the Web also. If there are folks out there with concrete ideas on how to move forward, we would be happy to have everyone engaged in finding a way forward. I have some ideas of my own: * Combine contents to create one book that is a hybrid textbook / user's guide, more focused on teaching visualization as covered by VTK * Generate a separate guide with lots of examples that can be translated to various languages that VTK supports leveraging content from the book as well as VTK examples online. This could be an online thing. Best, -berk On Mon, Mar 26, 2018 at 10:49 AM, Andras Lasso wrote: > Yes, the VTK textbook is great and still up-to-date, except specific > source code examples. If it was made available in editable form then I?m > sure there would be volunteers to update the examples (convert Tcl to > Python and update according to VTK API), and maybe describe some notable > core changes (pipeline changes, etc). > > > > I have never found the VTK User?s Guide particularly suitable for a > printed book format. At user guide level online resources (examples, API > documentation, etc.) are easier to use, because you can search better, they > are hyperlinked, you can copy-paste, etc. Online materials are also easier > to keep up-to-date. > > > > Andras > > > > *From:* vtkusers *On Behalf Of *David E DeMarle > *Sent:* Monday, March 26, 2018 10:39 AM > *To:* Jesse Kinross-Smith > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Any plan to update the books? > > > > We don't have any near term plans for an update. > > > > The books certainly do need a refresh, including a math reformat for the > free online versions, however just about of the techniques described in > them are still valid. > > > > Most of the code is still valid, with the important exception of a few > places in need of version 5->6 changes. For those refer to > https://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide > > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 <(518)%20881-4909> > > > > On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith < > Jesse.Kinross-Smith at bentley.com> wrote: > > Are there any plans to update these books at all? > > I?d love to get some books to help me learn the ins and outs of VTK for > the office, but anything over 5 years old in this industry is usually > pretty obsolete I?ve found. > > > > Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th > Edition - December 1, 2006 > > https://www.amazon.com/Visualization-Toolkit-Object- > Oriented-Approach-Graphics/dp/193093419X > > > > > VTK User's Guide Paperback ? 11th Ed. March 18, 2010 > > https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 > > > > > Jesse > > -- > > 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 bill.lorensen at gmail.com Mon Mar 26 11:48:14 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 26 Mar 2018 08:48:14 -0700 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: Andras, All of the examples in the VTK Book have been updated and exist here: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ Also, Andrew Maclean has provided python versions of the examples. We also update the IO Formats file here: https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ We have a project on researchgate.net that provides updates: https://www.researchgate.net/project/VTK-Examples Bill On Mon, Mar 26, 2018 at 7:56 AM, Berk Geveci wrote: > Just a quick update on this guys. We would love to provide editable versions > of both books. The challenge is that they are in old Framemaker format and > we have not had the time to focus on finding a way to generate some form of > editable content from them. I don't believe exporting to another format from > Framemaker is a good option. So we have contemplating scraping the PDF for > content and generating all new images (which Bill Lorensen did to a great > extent). Will Schroeder has been contemplating doing a new version that is > interactive on the Web also. If there are folks out there with concrete > ideas on how to move forward, we would be happy to have everyone engaged in > finding a way forward. > > I have some ideas of my own: > > * Combine contents to create one book that is a hybrid textbook / user's > guide, more focused on teaching visualization as covered by VTK > * Generate a separate guide with lots of examples that can be translated to > various languages that VTK supports leveraging content from the book as well > as VTK examples online. This could be an online thing. > > Best, > -berk > > > On Mon, Mar 26, 2018 at 10:49 AM, Andras Lasso wrote: >> >> Yes, the VTK textbook is great and still up-to-date, except specific >> source code examples. If it was made available in editable form then I?m >> sure there would be volunteers to update the examples (convert Tcl to Python >> and update according to VTK API), and maybe describe some notable core >> changes (pipeline changes, etc). >> >> >> >> I have never found the VTK User?s Guide particularly suitable for a >> printed book format. At user guide level online resources (examples, API >> documentation, etc.) are easier to use, because you can search better, they >> are hyperlinked, you can copy-paste, etc. Online materials are also easier >> to keep up-to-date. >> >> >> >> Andras >> >> >> >> From: vtkusers On Behalf Of David E DeMarle >> Sent: Monday, March 26, 2018 10:39 AM >> To: Jesse Kinross-Smith >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] Any plan to update the books? >> >> >> >> We don't have any near term plans for an update. >> >> >> >> The books certainly do need a refresh, including a math reformat for the >> free online versions, however just about of the techniques described in them >> are still valid. >> >> >> >> Most of the code is still valid, with the important exception of a few >> places in need of version 5->6 changes. For those refer to >> https://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide >> >> >> >> >> David E DeMarle >> Kitware, Inc. >> Principal Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> >> >> On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith >> wrote: >> >> Are there any plans to update these books at all? >> >> I?d love to get some books to help me learn the ins and outs of VTK for >> the office, but anything over 5 years old in this industry is usually pretty >> obsolete I?ve found. >> >> >> >> Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th >> Edition - December 1, 2006 >> >> >> https://www.amazon.com/Visualization-Toolkit-Object-Oriented-Approach-Graphics/dp/193093419X >> >> >> >> VTK User's Guide Paperback ? 11th Ed. March 18, 2010 >> >> https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 >> >> >> >> Jesse >> >> -- >> >> 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 > -- Unpaid intern in BillsParadise at noware dot com From lasso at queensu.ca Mon Mar 26 11:50:32 2018 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 26 Mar 2018 15:50:32 +0000 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: Yes, you've done a great job with all the examples, so the example updates in the book would be mostly editing work. Andras -----Original Message----- From: Bill Lorensen Sent: Monday, March 26, 2018 11:48 AM To: Berk Geveci Cc: Andras Lasso ; vtkusers at vtk.org Subject: Re: [vtkusers] Any plan to update the books? Andras, All of the examples in the VTK Book have been updated and exist here: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FVTKBookFigures%2F&data=02%7C01%7Classo%40queensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636576760974370283&sdata=zcEbtW9WleBNRqmVMekBvrLzkNb071iNrHZehmLrTKY%3D&reserved=0 Also, Andrew Maclean has provided python versions of the examples. We also update the IO Formats file here: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FVTKFileFormats%2F&data=02%7C01%7Classo%40queensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636576760974370283&sdata=7J%2FYEFzxmZ%2FfK8RFCib0bCV%2BxrDpr3qYg5Lg%2BKPzagw%3D&reserved=0 We have a project on researchgate.net that provides updates: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.researchgate.net%2Fproject%2FVTK-Examples&data=02%7C01%7Classo%40queensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636576760974370283&sdata=a5KghQtdp%2F3AcHPHDtUi2oWK0Y8Ul%2Be9bJ%2BJZKsVWvE%3D&reserved=0 Bill On Mon, Mar 26, 2018 at 7:56 AM, Berk Geveci wrote: > Just a quick update on this guys. We would love to provide editable > versions of both books. The challenge is that they are in old > Framemaker format and we have not had the time to focus on finding a > way to generate some form of editable content from them. I don't > believe exporting to another format from Framemaker is a good option. > So we have contemplating scraping the PDF for content and generating > all new images (which Bill Lorensen did to a great extent). Will > Schroeder has been contemplating doing a new version that is > interactive on the Web also. If there are folks out there with > concrete ideas on how to move forward, we would be happy to have everyone engaged in finding a way forward. > > I have some ideas of my own: > > * Combine contents to create one book that is a hybrid textbook / > user's guide, more focused on teaching visualization as covered by VTK > * Generate a separate guide with lots of examples that can be > translated to various languages that VTK supports leveraging content > from the book as well as VTK examples online. This could be an online thing. > > Best, > -berk > > > On Mon, Mar 26, 2018 at 10:49 AM, Andras Lasso wrote: >> >> Yes, the VTK textbook is great and still up-to-date, except specific >> source code examples. If it was made available in editable form then >> I?m sure there would be volunteers to update the examples (convert >> Tcl to Python and update according to VTK API), and maybe describe >> some notable core changes (pipeline changes, etc). >> >> >> >> I have never found the VTK User?s Guide particularly suitable for a >> printed book format. At user guide level online resources (examples, >> API documentation, etc.) are easier to use, because you can search >> better, they are hyperlinked, you can copy-paste, etc. Online >> materials are also easier to keep up-to-date. >> >> >> >> Andras >> >> >> >> From: vtkusers On Behalf Of David E >> DeMarle >> Sent: Monday, March 26, 2018 10:39 AM >> To: Jesse Kinross-Smith >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] Any plan to update the books? >> >> >> >> We don't have any near term plans for an update. >> >> >> >> The books certainly do need a refresh, including a math reformat for >> the free online versions, however just about of the techniques >> described in them are still valid. >> >> >> >> Most of the code is still valid, with the important exception of a >> few places in need of version 5->6 changes. For those refer to >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww. >> vtk.org%2FWiki%2FVTK%2FVTK_6_Migration_Guide&data=02%7C01%7Classo%40q >> ueensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4ef >> b2838b925c%7C1%7C0%7C636576760974370283&sdata=D3Y9oP8WxN2KdJD%2FiMjqv >> R4QYl%2BfKSSzfR1D0Z6chBI%3D&reserved=0 >> >> >> >> >> David E DeMarle >> Kitware, Inc. >> Principal Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> >> >> On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith >> wrote: >> >> Are there any plans to update these books at all? >> >> I?d love to get some books to help me learn the ins and outs of VTK >> for the office, but anything over 5 years old in this industry is >> usually pretty obsolete I?ve found. >> >> >> >> Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, >> 4th Edition - December 1, 2006 >> >> >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww. >> amazon.com%2FVisualization-Toolkit-Object-Oriented-Approach-Graphics% >> 2Fdp%2F193093419X&data=02%7C01%7Classo%40queensu.ca%7C3087ad71c9bd401 >> bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636576 >> 760974370283&sdata=TE%2FpNpGRuFjp7Rl2dNT%2F5t%2BZl6kTIN61%2FfIcbEODXz >> A%3D&reserved=0 >> >> >> >> VTK User's Guide Paperback ? 11th Ed. March 18, 2010 >> >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww. >> amazon.com%2FVTK-Users-Guide-Kitware%2Fdp%2F1930934238&data=02%7C01%7 >> Classo%40queensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b1 >> 42d582c4efb2838b925c%7C1%7C0%7C636576760974370283&sdata=fYNuBk0oMLmRo >> cdPYNjuudP1gPTOjxP4mV%2B9KM4CoVE%3D&reserved=0 >> >> >> >> Jesse >> >> -- >> >> Jesse Kinross-Smith >> >> Senior Software Engineer - BSW >> >> Bentley Systems, Fremantle >> >> >> >> >> _______________________________________________ >> Powered by >> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&da >> ta=02%7C01%7Classo%40queensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7C >> d61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636576760974370283&sdata=L >> yEjGBB2qlruuEewlJe6Yigd%2B1OW3VKlEK76iM92pcE%3D&reserved=0 >> >> Visit other Kitware open-source projects at >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.k >> itware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40quee >> nsu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb28 >> 38b925c%7C1%7C0%7C636576760974370283&sdata=78pMJGN%2F7zakWe95gQsgAB5w >> HDMjQWt%2B5YX9QsJECSQ%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.v >> tk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C3087ad71c >> 9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C >> 636576760974370283&sdata=VnG%2FPgoAEQRzWyRdNhQqR4Cqm6e7UVE92FDQIyCvUo >> g%3D&reserved=0 >> >> Search the list archives at: >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkm >> ail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca% >> 7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c >> %7C1%7C0%7C636576760974370283&sdata=KzZcwXGZVQjKkyp4Tji9GalIXScSJwN8E >> %2F8c3%2FIkClI%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 >> %7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925 >> c%7C1%7C0%7C636576760974370283&sdata=QVZKnp6W%2FER8wIJiHpZNWO3wgRMie3 >> 9UAO4xv6ZleC8%3D&reserved=0 >> >> >> >> >> _______________________________________________ >> Powered by >> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&da >> ta=02%7C01%7Classo%40queensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7C >> d61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636576760974380291&sdata=b >> KtqmOu7kJMEBnsOk%2F63zW0u506%2BRb6bYmKL6cktidw%3D&reserved=0 >> >> Visit other Kitware open-source projects at >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.k >> itware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40quee >> nsu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb28 >> 38b925c%7C1%7C0%7C636576760974380291&sdata=w4Jvb8oqub83AIYt8UggKzQWFi >> ZsKAveHe%2FI0tXTB%2Fc%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.v >> tk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C3087ad71c >> 9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C >> 636576760974380291&sdata=kULarOVUAqfxNHL5B%2FJQswDCU%2F33cuoIBt6DUrR7 >> 6P4%3D&reserved=0 >> >> Search the list archives at: >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkm >> ail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca% >> 7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c >> %7C1%7C0%7C636576760974380291&sdata=SmAWhM6RT5PDJPUe1CNs95I%2FEoeyOjl >> MlfChs9NS190%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 >> %7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925 >> c%7C1%7C0%7C636576760974380291&sdata=uv5Wj69Uw2mgFsL%2BdwwXijb8xG7il9 >> sstyuxb5gMxYM%3D&reserved=0 >> > > > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Classo%40queensu.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd6 > 1ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636576760974380291&sdata=bKtq > mOu7kJMEBnsOk%2F63zW0u506%2BRb6bYmKL6cktidw%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%7Classo%40queens > u.ca%7C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636576760974380291&sdata=w4Jvb8oqub83AIYt8UggKzQWFiZsKA > veHe%2FI0tXTB%2Fc%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%7Classo%40queensu.ca%7C3087ad71c9b > d401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636 > 576760974380291&sdata=kULarOVUAqfxNHL5B%2FJQswDCU%2F33cuoIBt6DUrR76P4% > 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%7Classo%40queensu.ca%7C > 3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7C > 1%7C0%7C636576760974380291&sdata=SmAWhM6RT5PDJPUe1CNs95I%2FEoeyOjlMlfC > hs9NS190%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%7Classo%40queensu.ca%7 > C3087ad71c9bd401bf10608d59330fd5c%7Cd61ecb3b38b142d582c4efb2838b925c%7 > C1%7C0%7C636576760974380291&sdata=uv5Wj69Uw2mgFsL%2BdwwXijb8xG7il9ssty > uxb5gMxYM%3D&reserved=0 > -- Unpaid intern in BillsParadise at noware dot com From sid.murthy at gmail.com Mon Mar 26 12:13:39 2018 From: sid.murthy at gmail.com (Sid Murthy) Date: Mon, 26 Mar 2018 10:13:39 -0600 Subject: [vtkusers] vtkGenericEnSightReader - how do I get the filename increment value for a given time set? Message-ID: In Ensight gold format a time set can have the following values: number of steps filename start number filename increment time values There can be scenarios where subsequent case file names representing each increment can skip (hence filename increment can be > 1). I was wondering how to retrieve the filename increment value? //reader is vtkGenericEnSightReader vtkSmartPointer timeSets = reader->GetTimeSets(); vtkSmartPointer times = timeSets->GetItem(someTimeSet); // get time for (vtkIdType t = 0; t < times->GetNumberOfTuples(); t++) { auto timeValue = times->GetTuple1(t) // read time value //read timeset filename increment value...?? } -------------- next part -------------- An HTML attachment was scrubbed... URL: From scbiradar at gmail.com Mon Mar 26 23:26:00 2018 From: scbiradar at gmail.com (Santosh Biradar) Date: Tue, 27 Mar 2018 08:56:00 +0530 Subject: [vtkusers] vtkMultiThreshold Filter crashing on polyhedral cells Message-ID: Hi VTKers, I am trying to use the vtkMultiThreshold filter to threshold my data by different quantities. However, the filter seems to crash when the thresholded data contains polyhedral cells. If my thresholded data does not contain polyhedral cells the filter works correctly. Here is a Python code snippet where I am just trying to extract the cells which belong to the internal mesh (this contains polyhedral cells): reader = vtk.vtkXMLUnstructuredGridReader() reader.SetFileName(r"\path\to\mesh") reader.Update() ugrid = reader.GetOutput() # Setup the multithreshold filter mthreshold = vtk.vtkMultiThreshold() mthreshold.SetInputData(ugrid); components_2to7 = mthreshold.AddIntervalSet(2,7,vtk.vtkMultiThreshold.CLOSED,vtk.vtkMultiThreshold.CLOSED, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, "component", 0, 0) # This works as the mesh does not have polyhedral cells in these regions component_1 = mthreshold.AddIntervalSet(1,1,vtk.vtkMultiThreshold.CLOSED,vtk.vtkMultiThreshold.CLOSED, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, "component", 0, 0) # This FAILS as the mesh has polyhedral cells in this region mthreshold.OutputSet(bgroup_cells_0) mthreshold.Update(); #Crashes at this point for component_1 thresholding multhithresholdedPolydata = mthreshold.GetOutput(); I'm wondering if it this is a bug in the filter. If I just use the vtkThreshold filter it works and I am able to extract the region containing the polyhedral cells I am running VTK-6.3.0 on Windows Thanks, Santosh -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Tue Mar 27 00:13:28 2018 From: david.thompson at kitware.com (David Thompson) Date: Tue, 27 Mar 2018 00:13:28 -0400 Subject: [vtkusers] vtkMultiThreshold Filter crashing on polyhedral cells In-Reply-To: References: Message-ID: Hi Santosh, The multithreshold filter was written before polyhedral cells were added to VTK and they changed the way connectivity is stored... so I am not surprised you have encountered a problem. Could you file a bug report? It would be great to have a simple polyhedral example dataset to test against, if you can provide one. Thanks, David > On Mar 26, 2018, at 23:26, Santosh Biradar wrote: > > Hi VTKers, > > I am trying to use the vtkMultiThreshold filter to threshold my data by different quantities. > However, the filter seems to crash when the thresholded data contains polyhedral cells. > If my thresholded data does not contain polyhedral cells the filter works correctly. > > Here is a Python code snippet where I am just trying to extract the cells which belong to the internal mesh (this contains polyhedral cells): > > reader = vtk.vtkXMLUnstructuredGridReader() > reader.SetFileName(r"\path\to\mesh") > reader.Update() > ugrid = reader.GetOutput() > # Setup the multithreshold filter > mthreshold = vtk.vtkMultiThreshold() > mthreshold.SetInputData(ugrid); > components_2to7 = mthreshold.AddIntervalSet(2,7,vtk.vtkMultiThreshold.CLOSED,vtk.vtkMultiThreshold.CLOSED, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, "component", 0, 0) # This works as the mesh does not have polyhedral cells in these regions > component_1 = mthreshold.AddIntervalSet(1,1,vtk.vtkMultiThreshold.CLOSED,vtk.vtkMultiThreshold.CLOSED, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, "component", 0, 0) # This FAILS as the mesh has polyhedral cells in this region > mthreshold.OutputSet(bgroup_cells_0) > mthreshold.Update(); #Crashes at this point for component_1 thresholding > multhithresholdedPolydata = mthreshold.GetOutput(); > I'm wondering if it this is a bug in the filter. > If I just use the vtkThreshold filter it works and I am able to extract the region containing the polyhedral cells > I am running VTK-6.3.0 on Windows > Thanks, > Santosh > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: 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 david at qdt.com.au Tue Mar 27 01:58:27 2018 From: david at qdt.com.au (David Stephensen) Date: Tue, 27 Mar 2018 16:58:27 +1100 Subject: [vtkusers] Any plan to update the books? Message-ID: > > Hello. I am a technical writer who uses a recent version > ? of? > FrameMaker but currently in > ?the ? > traditional not the newer XML format. > > How old is the FrameMaker version of your source documents? > > Why do you want to stop using FrameMaker? Is it because you have multiple > editors and don't want to buy several licences? The current licence > arrangement allows multiple users to share a licence if only one user is > enabled at any time (simplified version of rule). FrameMaker remains an > excellent, robust and versatile authoring tool. > > FrameMaker can output very clean, understandable and editable HTML, > especially If the source document itself is clean and tidy with good style > control. This would allow you to > ?migrate to your choice of a multitude of editing and publishing tools. > > ??David Stephensen > ?http://qdt.com.au > ? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gavin.wheeler at kcl.ac.uk Tue Mar 27 04:58:17 2018 From: gavin.wheeler at kcl.ac.uk (Gavin) Date: Tue, 27 Mar 2018 01:58:17 -0700 (MST) Subject: [vtkusers] Using vtkExternalOpenGLCamera In-Reply-To: References: <1500472740832-5744015.post@n5.nabble.com> <1521740708755-0.post@n5.nabble.com> Message-ID: <1522141097359-0.post@n5.nabble.com> Thanks for the clarification - good to know that I wasn't going crazy looking at the code. I'll try reconfiguring the external rendering, there may be a cleaner way to achieve what I've hacked in. If I meet with success I'll share my method with the community. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tamim.boubou at gmail.com Tue Mar 27 05:01:32 2018 From: tamim.boubou at gmail.com (Tamim) Date: Tue, 27 Mar 2018 02:01:32 -0700 (MST) Subject: [vtkusers] Drag a widget along an axis with mouse. Message-ID: <1522141292205-0.post@n5.nabble.com> Hello all, I have a vtk boxWidget2 and I can do the following with it: - Move it up, down, left, right, forward, backward with my keyboard. - Rotate it around one of its fixed axis (X only, Y only, Z only)and limit the movement along one of them too with the keyboard. I've been trying to limit the movement with my mouse (I want to drag it *along one of its axis* with my mouse as well) but I didn't get any results... Any ideas ? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ghodhban.amine at gmail.com Tue Mar 27 05:24:46 2018 From: ghodhban.amine at gmail.com (MMG) Date: Tue, 27 Mar 2018 02:24:46 -0700 (MST) Subject: [vtkusers] What is the best editor for vtk under Ubuntu ? Message-ID: <1522142686350-0.post@n5.nabble.com> Hello everyone, I?m trying to find an IDE under Linux ( Ubuntu ), in order to work easily with vtk library, I mean, IDE which supports gotoDefiniton functionality. please, let me know your idea Thanks again -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jmax.red at gmail.com Tue Mar 27 08:04:27 2018 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Tue, 27 Mar 2018 14:04:27 +0200 Subject: [vtkusers] [Java] Removing default shortcut Message-ID: Hello everyone, I'm trying to define my own shortcuts for my app, but I can't figure out how to remove existing shortcuts. First, I wonder if the best way to do that is using the Swing/AWT architecture or the VTK one. I tried both, both allow me to define new shortcuts, but none of them allow me to remove individual default shortcut. I tried to subclass vtkInteractorStyle as in this example : https://lorensen.github.io/VTKExamples/site/Cxx/Interaction/KeypressEvents/ The direct C++ to Java translation just do nothing. The custom interactor style is never called. But default shortcut is still registred ('q' key quits and so on...) I also tied to remove all keybord related interactor observers to make the whole shortcuts managed by Swing/AWT. To do this, I wrote : renderWindowInteractor.RemoveObservers("KeyPressEvent"); renderWindowInteractor.RemoveObservers("KeyReleaseEvent"); renderWindowInteractor.RemoveObservers("CharEvent"); but it did not work either. All this stuff seems to work properly with other languages than Java. Is there is something special with Java ? I must admit I'm a bit confused. Any help would be gratefully appreciated. Thanks. JMR -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Mar 27 10:57:13 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 27 Mar 2018 07:57:13 -0700 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: I think an online source would be very useful and doable. There are several components to the book: 1) The text (easy to convert to another format) 2) Non-vtk generated figures (I think Kitware has these in some form). 3) vtk-generated figures (almost all already exist in https://lorensen.github.io/VTKExamples/site/VTKBookFigures/) 4) Equations (need to find a reasonable converter) 5) Cross-references (might be a manual operation) 6) Index (use search technology?) 7) Remove all references to tcl. 8) Update the text to reflect modern VTK. 9) Other stuff (TBD). There are tools to convert pdf text to markdown. For example, http://pdf2md.morethan.io/ converted the entire VTK Book pdf to markdown. There are lots of decisions to make, but given the current toolsets available on the internet, an organized group effort could do it once an approach is chosen. Choosing an approach will be the most challenging part of the effort. There are tools to convert pdf to markdown. These tools could handle the "text" portion of the book. I've tried http://pdf2md.morethan.io/ and it converted the entire text of the vtk book into a simple markdown format. I can also share my experience in moving the VTK Wiki Examples to github and markdown. Auto-generation of enhanced markdown was a key. For example, the VTKExamples hyperlinks every text occurrence of a vtk class to the doxygen. VTK generated figures could be auto inserted. Just my 2 cents, Bill On Mon, Mar 26, 2018 at 7:56 AM, Berk Geveci wrote: > Just a quick update on this guys. We would love to provide editable versions > of both books. The challenge is that they are in old Framemaker format and > we have not had the time to focus on finding a way to generate some form of > editable content from them. I don't believe exporting to another format from > Framemaker is a good option. So we have contemplating scraping the PDF for > content and generating all new images (which Bill Lorensen did to a great > extent). Will Schroeder has been contemplating doing a new version that is > interactive on the Web also. If there are folks out there with concrete > ideas on how to move forward, we would be happy to have everyone engaged in > finding a way forward. > > I have some ideas of my own: > > * Combine contents to create one book that is a hybrid textbook / user's > guide, more focused on teaching visualization as covered by VTK > * Generate a separate guide with lots of examples that can be translated to > various languages that VTK supports leveraging content from the book as well > as VTK examples online. This could be an online thing. > > Best, > -berk > > > On Mon, Mar 26, 2018 at 10:49 AM, Andras Lasso wrote: >> >> Yes, the VTK textbook is great and still up-to-date, except specific >> source code examples. If it was made available in editable form then I?m >> sure there would be volunteers to update the examples (convert Tcl to Python >> and update according to VTK API), and maybe describe some notable core >> changes (pipeline changes, etc). >> >> >> >> I have never found the VTK User?s Guide particularly suitable for a >> printed book format. At user guide level online resources (examples, API >> documentation, etc.) are easier to use, because you can search better, they >> are hyperlinked, you can copy-paste, etc. Online materials are also easier >> to keep up-to-date. >> >> >> >> Andras >> >> >> >> From: vtkusers On Behalf Of David E DeMarle >> Sent: Monday, March 26, 2018 10:39 AM >> To: Jesse Kinross-Smith >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] Any plan to update the books? >> >> >> >> We don't have any near term plans for an update. >> >> >> >> The books certainly do need a refresh, including a math reformat for the >> free online versions, however just about of the techniques described in them >> are still valid. >> >> >> >> Most of the code is still valid, with the important exception of a few >> places in need of version 5->6 changes. For those refer to >> https://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide >> >> >> >> >> David E DeMarle >> Kitware, Inc. >> Principal Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> >> >> On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith >> wrote: >> >> Are there any plans to update these books at all? >> >> I?d love to get some books to help me learn the ins and outs of VTK for >> the office, but anything over 5 years old in this industry is usually pretty >> obsolete I?ve found. >> >> >> >> Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th >> Edition - December 1, 2006 >> >> >> https://www.amazon.com/Visualization-Toolkit-Object-Oriented-Approach-Graphics/dp/193093419X >> >> >> >> VTK User's Guide Paperback ? 11th Ed. March 18, 2010 >> >> https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 >> >> >> >> Jesse >> >> -- >> >> 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 > -- Unpaid intern in BillsParadise at noware dot com From sebastien.jourdain at kitware.com Tue Mar 27 11:02:07 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 27 Mar 2018 09:02:07 -0600 Subject: [vtkusers] [Java] Removing default shortcut In-Reply-To: References: Message-ID: Are you using vtkPanel or vtkCanvas or something else to bring the rendering into the Java GUI? I see hard coded key press handling within vtkPanel (r, u, w, s). Seb On Tue, Mar 27, 2018 at 6:04 AM, Jean-Max Redonnet wrote: > Hello everyone, > > I'm trying to define my own shortcuts for my app, but I can't figure out > how to remove existing shortcuts. > > First, I wonder if the best way to do that is using the Swing/AWT > architecture or the VTK one. I tried both, both allow me to define new > shortcuts, but none of them allow me to remove individual default shortcut. > > I tried to subclass vtkInteractorStyle as in this example : > https://lorensen.github.io/VTKExamples/site/Cxx/ > Interaction/KeypressEvents/ > > The direct C++ to Java translation just do nothing. The custom interactor > style is never called. But default shortcut is still registred ('q' key > quits and so on...) > > I also tied to remove all keybord related interactor observers to make the > whole shortcuts managed by Swing/AWT. To do this, I wrote : > > renderWindowInteractor.RemoveObservers("KeyPressEvent"); > renderWindowInteractor.RemoveObservers("KeyReleaseEvent"); > renderWindowInteractor.RemoveObservers("CharEvent"); > > but it did not work either. > > All this stuff seems to work properly with other languages than Java. Is > there is something special with Java ? > > I must admit I'm a bit confused. Any help would be gratefully appreciated. > Thanks. > > JMR > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 Mar 27 13:13:02 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 27 Mar 2018 10:13:02 -0700 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: I found a tool, pandoc, that converts pdf to a number of file formats including markdown and docx. It can also extract figures. I've extracted all of the VTK book figures and I'm checking out how well it did on the drawn figures. Bill On Tue, Mar 27, 2018 at 7:57 AM, Bill Lorensen wrote: > I think an online source would be very useful and doable. > > There are several components to the book: > 1) The text (easy to convert to another format) > 2) Non-vtk generated figures (I think Kitware has these in some form). > 3) vtk-generated figures (almost all already exist in > https://lorensen.github.io/VTKExamples/site/VTKBookFigures/) > 4) Equations (need to find a reasonable converter) > 5) Cross-references (might be a manual operation) > 6) Index (use search technology?) > 7) Remove all references to tcl. > 8) Update the text to reflect modern VTK. > 9) Other stuff (TBD). > > There are tools to convert pdf text to markdown. For example, > http://pdf2md.morethan.io/ converted the entire VTK Book pdf to > markdown. > > There are lots of decisions to make, but given the current toolsets > available on the internet, an organized group effort could do it once > an approach is chosen. > > Choosing an approach will be the most challenging part of the effort. > > There are tools to convert pdf to markdown. These tools could handle > the "text" portion of the book. I've tried > http://pdf2md.morethan.io/ > and it converted the entire text of the vtk book into a simple markdown format. > > I can also share my experience in moving the VTK Wiki Examples to > github and markdown. Auto-generation of enhanced markdown was a key. > For example, the VTKExamples hyperlinks every text occurrence of a vtk > class to the doxygen. VTK generated figures could be auto inserted. > > Just my 2 cents, > > Bill > > On Mon, Mar 26, 2018 at 7:56 AM, Berk Geveci wrote: >> Just a quick update on this guys. We would love to provide editable versions >> of both books. The challenge is that they are in old Framemaker format and >> we have not had the time to focus on finding a way to generate some form of >> editable content from them. I don't believe exporting to another format from >> Framemaker is a good option. So we have contemplating scraping the PDF for >> content and generating all new images (which Bill Lorensen did to a great >> extent). Will Schroeder has been contemplating doing a new version that is >> interactive on the Web also. If there are folks out there with concrete >> ideas on how to move forward, we would be happy to have everyone engaged in >> finding a way forward. >> >> I have some ideas of my own: >> >> * Combine contents to create one book that is a hybrid textbook / user's >> guide, more focused on teaching visualization as covered by VTK >> * Generate a separate guide with lots of examples that can be translated to >> various languages that VTK supports leveraging content from the book as well >> as VTK examples online. This could be an online thing. >> >> Best, >> -berk >> >> >> On Mon, Mar 26, 2018 at 10:49 AM, Andras Lasso wrote: >>> >>> Yes, the VTK textbook is great and still up-to-date, except specific >>> source code examples. If it was made available in editable form then I?m >>> sure there would be volunteers to update the examples (convert Tcl to Python >>> and update according to VTK API), and maybe describe some notable core >>> changes (pipeline changes, etc). >>> >>> >>> >>> I have never found the VTK User?s Guide particularly suitable for a >>> printed book format. At user guide level online resources (examples, API >>> documentation, etc.) are easier to use, because you can search better, they >>> are hyperlinked, you can copy-paste, etc. Online materials are also easier >>> to keep up-to-date. >>> >>> >>> >>> Andras >>> >>> >>> >>> From: vtkusers On Behalf Of David E DeMarle >>> Sent: Monday, March 26, 2018 10:39 AM >>> To: Jesse Kinross-Smith >>> Cc: vtkusers at vtk.org >>> Subject: Re: [vtkusers] Any plan to update the books? >>> >>> >>> >>> We don't have any near term plans for an update. >>> >>> >>> >>> The books certainly do need a refresh, including a math reformat for the >>> free online versions, however just about of the techniques described in them >>> are still valid. >>> >>> >>> >>> Most of the code is still valid, with the important exception of a few >>> places in need of version 5->6 changes. For those refer to >>> https://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide >>> >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> Principal Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> >>> >>> On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith >>> wrote: >>> >>> Are there any plans to update these books at all? >>> >>> I?d love to get some books to help me learn the ins and outs of VTK for >>> the office, but anything over 5 years old in this industry is usually pretty >>> obsolete I?ve found. >>> >>> >>> >>> Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th >>> Edition - December 1, 2006 >>> >>> >>> https://www.amazon.com/Visualization-Toolkit-Object-Oriented-Approach-Graphics/dp/193093419X >>> >>> >>> >>> VTK User's Guide Paperback ? 11th Ed. March 18, 2010 >>> >>> https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 >>> >>> >>> >>> Jesse >>> >>> -- >>> >>> 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 >> > > > > -- > Unpaid intern in BillsParadise at noware dot com -- Unpaid intern in BillsParadise at noware dot com From andrew.amaclean at gmail.com Tue Mar 27 18:44:04 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Wed, 28 Mar 2018 09:44:04 +1100 Subject: [vtkusers] =?utf-8?q?=E2=80=8BWhat_is_the_best_editor_for_vtk_un?= =?utf-8?q?der_Ubuntu_=3F?= Message-ID: I tend to use the latest and greatest version of kdevelop, namely the KDevelop.AppImage at https://www.kdevelop.org/download. It has a very good parser, even suggesting what includes to add. It also has ClangCheck built in and you can easily add clang-format. The text colouring is the best! The recent versions are stable and the appimage is quite a good way of using it as the Linux distributions often lag behind. It can be used in Windows also (I haven't tried it), however the latest Visual Studio IDE is probably better there. Andrew > ---------- Forwarded message ---------- > From: > ?? > MMG > To: vtkusers at vtk.org > Cc: > Bcc: > Date: Tue, 27 Mar 2018 02:24:46 -0700 (MST) > Subject: [vtkusers] > ?? > What is the best editor for vtk under Ubuntu ? > Hello everyone, > > > I?m trying to find an IDE under Linux ( Ubuntu ), in order to work easily > with vtk library, > I mean, IDE which supports gotoDefiniton functionality. > > please, let me know your idea > > Thanks again > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > > > -- > ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lorfalwit at gmail.com Wed Mar 28 02:09:58 2018 From: lorfalwit at gmail.com (=?UTF-8?B?SHVnaCBMdW8=?=) Date: Wed, 28 Mar 2018 14:09:58 +0800 (GMT+08:00) Subject: [vtkusers] one output port to multiple input ports Message-ID: <5abb31bd.1c69fb81.41704.c991@mx.google.com> An HTML attachment was scrubbed... URL: From Jesse.Kinross-Smith at bentley.com Wed Mar 28 04:04:55 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Wed, 28 Mar 2018 08:04:55 +0000 Subject: [vtkusers] =?utf-8?q?=E2=80=8BWhat_is_the_best_editor_for_vtk_un?= =?utf-8?q?der_Ubuntu_=3F?= In-Reply-To: References: Message-ID: Visual Studio Code might also be an option for you on Linux. https://code.visualstudio.com/ -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Andrew Maclean Sent: Wednesday, 28 March 2018 6:44 AM To: vtk Subject: Re: [vtkusers] ?What is the best editor for vtk under Ubuntu ? I tend to use the latest and greatest version of kdevelop, namely the KDevelop.AppImage at https://www.kdevelop.org/download. It has a very good parser, even suggesting what includes to add. It also has ClangCheck built in and you can easily add clang-format. The text colouring is the best! The recent versions are stable and the appimage is quite a good way of using it as the Linux distributions often lag behind. It can be used in Windows also (I haven't tried it), however the latest Visual Studio IDE is probably better there. Andrew ---------- Forwarded message ---------- From: ?? MMG > To: vtkusers at vtk.org Cc: Bcc: Date: Tue, 27 Mar 2018 02:24:46 -0700 (MST) Subject: [vtkusers] ?? What is the best editor for vtk under Ubuntu ? Hello everyone, I?m trying to find an IDE under Linux ( Ubuntu ), in order to work easily with vtk library, I mean, IDE which supports gotoDefiniton functionality. please, let me know your idea Thanks again -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Wed Mar 28 06:47:49 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Wed, 28 Mar 2018 10:47:49 +0000 Subject: [vtkusers] =?utf-8?q?=E2=80=8BWhat_is_the_best_editor_for_vtk_un?= =?utf-8?q?der_Ubuntu_=3F?= In-Reply-To: References: Message-ID: Yes, it's pretty good also. Andrew Maclean On Wed, 28 Mar. 2018, 19:04 Jesse Kinross-Smith, < Jesse.Kinross-Smith at bentley.com> wrote: > Visual Studio Code might also be an option for you on Linux. > > > > https://code.visualstudio.com/ > > > > -- > > Jesse Kinross-Smith > > Senior Software Engineer - BSW > > Bentley Systems, Fremantle > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Andrew > Maclean > *Sent:* Wednesday, 28 March 2018 6:44 AM > *To:* vtk > *Subject:* Re: [vtkusers] ?What is the best editor for vtk under Ubuntu ? > > > > > > I tend to use the latest and greatest version of kdevelop, namely the > KDevelop.AppImage at https://www.kdevelop.org/download > > . > > It has a very good parser, even suggesting what includes to add. It also > has ClangCheck built in and you can easily add clang-format. The text > colouring is the best! > > > > The recent versions are stable and the appimage is quite a good way of > using it as the Linux distributions often lag behind. > > > > It can be used in Windows also (I haven't tried it), however the latest > Visual Studio IDE is probably better there. > > > > Andrew > > > > > ---------- Forwarded message ---------- > From: > > ?? > > MMG > To: vtkusers at vtk.org > Cc: > Bcc: > Date: Tue, 27 Mar 2018 02:24:46 -0700 (MST) > Subject: [vtkusers] > > ?? > > What is the best editor for vtk under Ubuntu ? > Hello everyone, > > > I?m trying to find an IDE under Linux ( Ubuntu ), in order to work easily > with vtk library, > I mean, IDE which supports gotoDefiniton functionality. > > please, let me know your idea > > Thanks again > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > > > > -- > > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Wed Mar 28 08:46:30 2018 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 28 Mar 2018 08:46:30 -0400 Subject: [vtkusers] =?utf-8?q?=E2=80=8BWhat_is_the_best_editor_for_vtk_un?= =?utf-8?q?der_Ubuntu_=3F?= In-Reply-To: References: Message-ID: <7028DE3E-CE92-47F4-9DE9-618E4EF21FB5@bluequartz.net> I have used VS Code and QtCreator. Mike Jackson From: vtkusers on behalf of Andrew Maclean Reply-To: Date: Tuesday, March 27, 2018 at 6:44 PM To: vtk Subject: Re: [vtkusers] ?What is the best editor for vtk under Ubuntu ? I tend to use the latest and greatest version of kdevelop, namely the KDevelop.AppImage at https://www.kdevelop.org/download. It has a very good parser, even suggesting what includes to add. It also has ClangCheck built in and you can easily add clang-format. The text colouring is the best! The recent versions are stable and the appimage is quite a good way of using it as the Linux distributions often lag behind. It can be used in Windows also (I haven't tried it), however the latest Visual Studio IDE is probably better there. Andrew ---------- Forwarded message ---------- From: ?? MMG To: vtkusers at vtk.org Cc: Bcc: Date: Tue, 27 Mar 2018 02:24:46 -0700 (MST) Subject: [vtkusers] ?? What is the best editor for vtk under Ubuntu ? Hello everyone, I?m trying to find an IDE under Linux ( Ubuntu ), in order to work easily with vtk library, I mean, IDE which supports gotoDefiniton functionality. please, let me know your idea Thanks again -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 utkarsh.ayachit at kitware.com Wed Mar 28 09:45:24 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 28 Mar 2018 09:45:24 -0400 Subject: [vtkusers] one output port to multiple input ports In-Reply-To: <5abb31bd.1c69fb81.41704.c991@mx.google.com> References: <5abb31bd.1c69fb81.41704.c991@mx.google.com> Message-ID: > Question 1: Is this way of connecting one output port to multiple input > ports a safe way? Indeed. This is referred to as fan-out and fan-outs are indeed supported and safe in VTK pipelines. > Question 2: How can I control the vtkJPEGWriter to write image only when the > upstream filter updates its output port? It seems that vtkJPEGWriter will > write data into file as long as there is an image data on the connected > input port. This is outside the scope of what the pipeline can automatically do. Since VTK's pipeline is demand driven (or pull based), it's not typically to run something downstream when upstream changes. You're better of handling this in your application code. Whenever something that triggers the update to your source executes, then alone call writer->Writer. HTH Utkarsh From vacingforo at gmail.com Wed Mar 28 09:54:53 2018 From: vacingforo at gmail.com (vacingforo) Date: Wed, 28 Mar 2018 06:54:53 -0700 (MST) Subject: [vtkusers] Render Triangles from cell data (vtk) Message-ID: <1522245293271-0.post@n5.nabble.com> Testing the following funcion I only get one triangle of a polydata model with the following assigned ids: * triangle->GetPointIds()->InsertNextId(0); triangle->GetPointIds()->InsertNextId(1); triangle->GetPointIds()->InsertNextId(2);* I would like to render all triangles of a polydata model in funtion of * trianglePoints = polydata->GetCell(tuple)->GetPoints(); vtkSmartPointer trianglePointIds = polydata->GetCell(tuple)->GetPointIds(*); The problem is that it only render one triangle. *void Test::TestPolyData(vtkSmartPointer polydata) { auto normals = polydata->GetCellData()->GetNormals(); vtkPoints * trianglePoints{nullptr}; vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); int index = 0; for (auto tuple = 0; tuple < normals->GetNumberOfTuples(); ++tuple) { trianglePoints = polydata->GetCell(tuple)->GetPoints(); vtkSmartPointer trianglePointIds = polydata->GetCell(tuple)->GetPointIds(); vtkSmartPointer triangle = vtkSmartPointer::New(); //triangle->GetPointIds()->InsertNextId(trianglePointIds->GetId(0)); //triangle->GetPointIds()->InsertNextId(trianglePointIds->GetId(1)); //triangle->GetPointIds()->InsertNextId(trianglePointIds->GetId(2)); triangle->GetPointIds()->InsertNextId(0); triangle->GetPointIds()->InsertNextId(1); triangle->GetPointIds()->InsertNextId(2); vtkSmartPointer triangles = vtkSmartPointer::New(); triangles->InsertNextCell ( triangle ); vtkSmartPointer polydata = vtkSmartPointer::New(); polydata->SetPoints(trianglePoints); polydata->SetPolys ( triangles ); // Visualize vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(polydata); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); renderer->AddActor(actor); } renderer->SetBackground(.1, .2, .4); // Background color dark blue // Render and interact renderWindow->Render(); renderWindowInteractor->Start(); } * -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jmax.red at gmail.com Wed Mar 28 10:25:38 2018 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Wed, 28 Mar 2018 16:25:38 +0200 Subject: [vtkusers] [Java] Removing default shortcut In-Reply-To: References: Message-ID: Thanks for taking my problem into consideration I'm using vtkRenderWindowPanel which inherits from vtkCanvas which inherits from vtkPanel (as far I can believe Eclipse). Hope this may help. jMax 2018-03-27 17:02 GMT+02:00 Sebastien Jourdain < sebastien.jourdain at kitware.com>: > Are you using vtkPanel or vtkCanvas or something else to bring the > rendering into the Java GUI? > > I see hard coded key press handling within vtkPanel (r, u, w, s). > > Seb > > On Tue, Mar 27, 2018 at 6:04 AM, Jean-Max Redonnet > wrote: > >> Hello everyone, >> >> I'm trying to define my own shortcuts for my app, but I can't figure out >> how to remove existing shortcuts. >> >> First, I wonder if the best way to do that is using the Swing/AWT >> architecture or the VTK one. I tried both, both allow me to define new >> shortcuts, but none of them allow me to remove individual default shortcut. >> >> I tried to subclass vtkInteractorStyle as in this example : >> https://lorensen.github.io/VTKExamples/site/Cxx/Interaction/ >> KeypressEvents/ >> >> The direct C++ to Java translation just do nothing. The custom interactor >> style is never called. But default shortcut is still registred ('q' key >> quits and so on...) >> >> I also tied to remove all keybord related interactor observers to make >> the whole shortcuts managed by Swing/AWT. To do this, I wrote : >> >> renderWindowInteractor.RemoveObservers("KeyPressEvent"); >> renderWindowInteractor.RemoveObservers("KeyReleaseEvent"); >> renderWindowInteractor.RemoveObservers("CharEvent"); >> >> but it did not work either. >> >> All this stuff seems to work properly with other languages than Java. Is >> there is something special with Java ? >> >> I must admit I'm a bit confused. Any help would be gratefully >> appreciated. Thanks. >> >> JMR >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 Wed Mar 28 10:45:39 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 28 Mar 2018 08:45:39 -0600 Subject: [vtkusers] [Java] Removing default shortcut In-Reply-To: References: Message-ID: If you don't have any issue with (r, u, w, s), you should handle your keypress event at the Java level. You can not subclass a C++ class in Java and hope to use it. If you can not unregistered key press event on the C++ InteractorStyle with API call then you are in trouble with what you are trying to achieve unless you picked the wrong interactor style. HTH, Seb On Wed, Mar 28, 2018 at 8:25 AM, Jean-Max Redonnet wrote: > Thanks for taking my problem into consideration > > I'm using vtkRenderWindowPanel which inherits from vtkCanvas which > inherits from vtkPanel (as far I can believe Eclipse). > > Hope this may help. > > jMax > > > 2018-03-27 17:02 GMT+02:00 Sebastien Jourdain com>: > >> Are you using vtkPanel or vtkCanvas or something else to bring the >> rendering into the Java GUI? >> >> I see hard coded key press handling within vtkPanel (r, u, w, s). >> >> Seb >> >> On Tue, Mar 27, 2018 at 6:04 AM, Jean-Max Redonnet >> wrote: >> >>> Hello everyone, >>> >>> I'm trying to define my own shortcuts for my app, but I can't figure out >>> how to remove existing shortcuts. >>> >>> First, I wonder if the best way to do that is using the Swing/AWT >>> architecture or the VTK one. I tried both, both allow me to define new >>> shortcuts, but none of them allow me to remove individual default shortcut. >>> >>> I tried to subclass vtkInteractorStyle as in this example : >>> https://lorensen.github.io/VTKExamples/site/Cxx/Interaction/ >>> KeypressEvents/ >>> >>> The direct C++ to Java translation just do nothing. The custom >>> interactor style is never called. But default shortcut is still registred >>> ('q' key quits and so on...) >>> >>> I also tied to remove all keybord related interactor observers to make >>> the whole shortcuts managed by Swing/AWT. To do this, I wrote : >>> >>> renderWindowInteractor.RemoveObservers("KeyPressEvent"); >>> renderWindowInteractor.RemoveObservers("KeyReleaseEvent"); >>> renderWindowInteractor.RemoveObservers("CharEvent"); >>> >>> but it did not work either. >>> >>> All this stuff seems to work properly with other languages than Java. Is >>> there is something special with Java ? >>> >>> I must admit I'm a bit confused. Any help would be gratefully >>> appreciated. Thanks. >>> >>> JMR >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 vianamp at gmail.com Wed Mar 28 13:03:10 2018 From: vianamp at gmail.com (matheus_viana) Date: Wed, 28 Mar 2018 10:03:10 -0700 (MST) Subject: [vtkusers] vtkKdTree with custom distance function Message-ID: <1522256590982-0.post@n5.nabble.com> Hi guys. Is there a way to use a custom distance function in the class vtkKdTree? Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Mar 28 14:05:01 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 28 Mar 2018 11:05:01 -0700 Subject: [vtkusers] Any plan to update the books? In-Reply-To: References: Message-ID: I have a strawman for Chapter 6. I'll publish it as soon s I add the figures (which we already have). The figures are regression tested every night. Equations are not addressed yet. Andrew Maclean knows how to handle these I believe. Bill On Wed, Mar 28, 2018 at 9:42 AM, Berk Geveci wrote: > Wow this is great! > > On Tue, Mar 27, 2018 at 1:13 PM, Bill Lorensen > wrote: >> >> I found a tool, pandoc, that converts pdf to a number of file formats >> including markdown and docx. It can also extract figures. I've >> extracted all of the VTK book figures and I'm checking out how well it >> did on the drawn figures. >> >> Bill >> >> >> On Tue, Mar 27, 2018 at 7:57 AM, Bill Lorensen >> wrote: >> > I think an online source would be very useful and doable. >> > >> > There are several components to the book: >> > 1) The text (easy to convert to another format) >> > 2) Non-vtk generated figures (I think Kitware has these in some form). >> > 3) vtk-generated figures (almost all already exist in >> > https://lorensen.github.io/VTKExamples/site/VTKBookFigures/) >> > 4) Equations (need to find a reasonable converter) >> > 5) Cross-references (might be a manual operation) >> > 6) Index (use search technology?) >> > 7) Remove all references to tcl. >> > 8) Update the text to reflect modern VTK. >> > 9) Other stuff (TBD). >> > >> > There are tools to convert pdf text to markdown. For example, >> > http://pdf2md.morethan.io/ converted the entire VTK Book pdf to >> > markdown. >> > >> > There are lots of decisions to make, but given the current toolsets >> > available on the internet, an organized group effort could do it once >> > an approach is chosen. >> > >> > Choosing an approach will be the most challenging part of the effort. >> > >> > There are tools to convert pdf to markdown. These tools could handle >> > the "text" portion of the book. I've tried >> > http://pdf2md.morethan.io/ >> > and it converted the entire text of the vtk book into a simple markdown >> > format. >> > >> > I can also share my experience in moving the VTK Wiki Examples to >> > github and markdown. Auto-generation of enhanced markdown was a key. >> > For example, the VTKExamples hyperlinks every text occurrence of a vtk >> > class to the doxygen. VTK generated figures could be auto inserted. >> > >> > Just my 2 cents, >> > >> > Bill >> > >> > On Mon, Mar 26, 2018 at 7:56 AM, Berk Geveci >> > wrote: >> >> Just a quick update on this guys. We would love to provide editable >> >> versions >> >> of both books. The challenge is that they are in old Framemaker format >> >> and >> >> we have not had the time to focus on finding a way to generate some >> >> form of >> >> editable content from them. I don't believe exporting to another format >> >> from >> >> Framemaker is a good option. So we have contemplating scraping the PDF >> >> for >> >> content and generating all new images (which Bill Lorensen did to a >> >> great >> >> extent). Will Schroeder has been contemplating doing a new version that >> >> is >> >> interactive on the Web also. If there are folks out there with concrete >> >> ideas on how to move forward, we would be happy to have everyone >> >> engaged in >> >> finding a way forward. >> >> >> >> I have some ideas of my own: >> >> >> >> * Combine contents to create one book that is a hybrid textbook / >> >> user's >> >> guide, more focused on teaching visualization as covered by VTK >> >> * Generate a separate guide with lots of examples that can be >> >> translated to >> >> various languages that VTK supports leveraging content from the book as >> >> well >> >> as VTK examples online. This could be an online thing. >> >> >> >> Best, >> >> -berk >> >> >> >> >> >> On Mon, Mar 26, 2018 at 10:49 AM, Andras Lasso >> >> wrote: >> >>> >> >>> Yes, the VTK textbook is great and still up-to-date, except specific >> >>> source code examples. If it was made available in editable form then >> >>> I?m >> >>> sure there would be volunteers to update the examples (convert Tcl to >> >>> Python >> >>> and update according to VTK API), and maybe describe some notable core >> >>> changes (pipeline changes, etc). >> >>> >> >>> >> >>> >> >>> I have never found the VTK User?s Guide particularly suitable for a >> >>> printed book format. At user guide level online resources (examples, >> >>> API >> >>> documentation, etc.) are easier to use, because you can search better, >> >>> they >> >>> are hyperlinked, you can copy-paste, etc. Online materials are also >> >>> easier >> >>> to keep up-to-date. >> >>> >> >>> >> >>> >> >>> Andras >> >>> >> >>> >> >>> >> >>> From: vtkusers On Behalf Of David E DeMarle >> >>> Sent: Monday, March 26, 2018 10:39 AM >> >>> To: Jesse Kinross-Smith >> >>> Cc: vtkusers at vtk.org >> >>> Subject: Re: [vtkusers] Any plan to update the books? >> >>> >> >>> >> >>> >> >>> We don't have any near term plans for an update. >> >>> >> >>> >> >>> >> >>> The books certainly do need a refresh, including a math reformat for >> >>> the >> >>> free online versions, however just about of the techniques described >> >>> in them >> >>> are still valid. >> >>> >> >>> >> >>> >> >>> Most of the code is still valid, with the important exception of a few >> >>> places in need of version 5->6 changes. For those refer to >> >>> https://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide >> >>> >> >>> >> >>> >> >>> >> >>> David E DeMarle >> >>> Kitware, Inc. >> >>> Principal Engineer >> >>> 21 Corporate Drive >> >>> Clifton Park, NY 12065-8662 >> >>> Phone: 518-881-4909 >> >>> >> >>> >> >>> >> >>> On Mon, Mar 26, 2018 at 3:42 AM, Jesse Kinross-Smith >> >>> wrote: >> >>> >> >>> Are there any plans to update these books at all? >> >>> >> >>> I?d love to get some books to help me learn the ins and outs of VTK >> >>> for >> >>> the office, but anything over 5 years old in this industry is usually >> >>> pretty >> >>> obsolete I?ve found. >> >>> >> >>> >> >>> >> >>> Visualization Toolkit: An Object-Oriented Approach to 3D Graphics, 4th >> >>> Edition - December 1, 2006 >> >>> >> >>> >> >>> >> >>> https://www.amazon.com/Visualization-Toolkit-Object-Oriented-Approach-Graphics/dp/193093419X >> >>> >> >>> >> >>> >> >>> VTK User's Guide Paperback ? 11th Ed. March 18, 2010 >> >>> >> >>> https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238 >> >>> >> >>> >> >>> >> >>> Jesse >> >>> >> >>> -- >> >>> >> >>> 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 >> >> >> > >> > >> > >> > -- >> > Unpaid intern in BillsParadise at noware dot com >> >> >> >> -- >> Unpaid intern in BillsParadise at noware dot com > > -- Unpaid intern in BillsParadise at noware dot com From minpu.code at gmail.com Thu Mar 29 06:58:23 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 29 Mar 2018 03:58:23 -0700 (MST) Subject: [vtkusers] Why does not OnMouseMove() event work? Message-ID: <1522321103952-0.post@n5.nabble.com> I follow an example (https://www.vtk.org/Wiki/VTK/Examples/Cxx/Picking/HighlightPickedActor) to highlight a picked actor. Now I want to extend it by overriding the OnMouseMoveEvent() function with the following code. But a hovered actor's color is not changed. class MouseInteractorHighLightActor : public vtkInteractorStyleTrackballCamera { public: static MouseInteractorHighLightActor* New(); vtkTypeMacro(MouseInteractorHighLightActor, vtkInteractorStyleTrackballCamera); MouseInteractorHighLightActor() { LastPickedActor = NULL; LastPickedProperty = vtkProperty::New(); } virtual ~MouseInteractorHighLightActor() { LastPickedProperty->Delete(); } virtual void OnLeftButtonDown() { int* clickPos = this->GetInteractor()->GetEventPosition(); // Pick from this location. vtkSmartPointer picker = vtkSmartPointer::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->GetDefaultRenderer()); // If we picked something before, reset its property if (this->LastPickedActor) { this->LastPickedActor->GetProperty()->DeepCopy(this->LastPickedProperty); } this->LastPickedActor = picker->GetActor(); if (this->LastPickedActor) { // Save the property of the picked actor so that we can // restore it next time this->LastPickedProperty->DeepCopy(this->LastPickedActor->GetProperty()); // Highlight the picked actor by changing its properties this->LastPickedActor->GetProperty()->SetColor(1.0, 0.0, 0.0); this->LastPickedActor->GetProperty()->SetDiffuse(1.0); this->LastPickedActor->GetProperty()->SetSpecular(0.0); } // Forward events vtkInteractorStyleTrackballCamera::OnLeftButtonDown(); } private: vtkActor *LastPickedActor; vtkProperty *LastPickedProperty; }; vtkStandardNewMacro(MouseInteractorHighLightActor); //.... int numberOfSpheres = 10; // A renderer and render window vtkSmartPointer renderer = m_vtkWindow->GetRenderers()->GetFirstRenderer(); m_vtkWindow->AddRenderer(renderer); // An interactor vtkSmartPointer renderWindowInteractor = m_vtkWindow->GetInteractor(); // Set the custom type to use for interaction. vtkSmartPointer style = vtkSmartPointer::New(); style->SetDefaultRenderer(renderer); renderWindowInteractor->SetInteractorStyle(style); for (int i = 0; i < numberOfSpheres; ++i) { vtkSmartPointer source = vtkSmartPointer::New(); double x, y, z, radius; x = vtkMath::Random(-5, 5); y = vtkMath::Random(-5, 5); z = vtkMath::Random(-5, 5); radius = vtkMath::Random(.5, 1.0); source->SetRadius(radius); source->SetCenter(x, y, z); source->SetPhiResolution(11); source->SetThetaResolution(21); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(source->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); double r, g, b; r = vtkMath::Random(.4, 1.0); g = vtkMath::Random(.4, 1.0); b = vtkMath::Random(.4, 1.0); actor->GetProperty()->SetDiffuseColor(r, g, b); actor->GetProperty()->SetDiffuse(.8); actor->GetProperty()->SetSpecular(.5); actor->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); actor->GetProperty()->SetSpecularPower(30.0); renderer->AddActor(actor); } renderer->SetBackground(.3, .4, .5); // Render and interact m_vtkWindow->Render(); renderWindowInteractor->Initialize(); renderWindowInteractor->Start(); Is there anyone experienced such a problem? Please, help me. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From pkrebs at amberg.cz Thu Mar 29 07:16:59 2018 From: pkrebs at amberg.cz (Pavel Krebs/AMBERG) Date: Thu, 29 Mar 2018 13:16:59 +0200 Subject: [vtkusers] Crash in vtkOpenGLRenderTimer::ReusableStart() Message-ID: Hello, after update to VTK 8 we have a crash in vtkOpenGLRenderTimer::ReusableStart() during rendering on line with glQueryCounter in block: if (this->StartQuery == 0) { glGenQueries(1, static_cast(&this->StartQuery)); glQueryCounter(static_cast(this->StartQuery), GL_TIMESTAMP); this->ReusableStarted = true; this->ReusableEnded = false; } Access violation reading location is happened inside of ati driver (atio6axx.dll). The computer (HP zBook 15 G3 notebook) is relatively new and it contains GPU - 2048MB ATI AMD Firepro W5170M (HP). Our environment is Windows 10 x64 and VTK is built with Visual Studio 2017 (x64 target platform). It happens after the second initialisation of vtkRenderWindow and adding and enabling of vtkOrientationMarkerWidget in a scene. Unfortunately it doesn't happen always and it is related to HW or driver. For example Nvidia GPU works OK. I also checked last VTK 8.1 and there is same behaviour. I haven't isolated this problem because of time and because I was able to override it with definition of NO_TIMESTAMP_QUERIES in the vtkOpenGLRenderTimer source. I report this to know that there can be a problem on some hardware configuration. Kind regards Pavel Krebs Software Engineer AMBERG Engineering Brno, a.s. Pta??nsk?ho 10 602 00 Brno - Czech Republic -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bertram.Sabrowsky-Hirsch at risc-software.at Thu Mar 29 07:45:52 2018 From: Bertram.Sabrowsky-Hirsch at risc-software.at (Bertram Sabrowsky-Hirsch) Date: Thu, 29 Mar 2018 11:45:52 +0000 Subject: [vtkusers] vtkProjectedTetrahedraMapper to map one component only Message-ID: <2FAC7B9E487D2C478AB8E83F062AF680072E2BA5@doug.risc.local> From: Bertram Sabrowsky-Hirsch Sent: 29 March 2018 13:29 To: 'vtkusers at vtk.org' Subject: vtkProjectedTetrahedraMapper to map one component only Hi everyone, I have troubles implementing a similar feature found in Paraview: I do have a vtkUnstructuredGrid where the PointData contains 4 different (Float) Arrays (e.g. "Pressure", "Velocity", ...). One of those Arrays has 3 components and I want to let the user decide which one of the components is used for the color mapping. What I do: - Set the active Attribute of the grid to select the array that is visualized: grid->SetActiveAttribute(grid->GetInformation(), vtkDataObject::FIELD_ASSOCIATION_POINTS, "Velocity", vtkDataSetAttributes::SCALARS); - Use a vtkDataSetTriangleFilter and connect it with a vtkProjectedTetrahedraMapper and finally set the mapper to a vtkVolume that is rendered - Set a custom vtkColorTransferFunction in the volumes properties to map the scalar values to colors Now, for single component arrays, this works just fine. For arrays with multiple components - as I understand it - this will always use the magnitude of the components to map the scalar values. vtkColorTransferFunction does offer to set the vector components using the functions (SetVectorModeToComponent(), SetVectorComponent(idx), SetVectorSize(1)) and I tried this, however, after inspecting the source code of vtkProjectedTetrahedraMapper I think that this feature is ignored by the mapper. Also, I didn't find any way to adjust the grid in a way that a specific component is used (I figured there might be something like SetActiveComponent as it exists for attributes with SetActiveAttribute). I also looked into using vtkArrayCalculator and vtkExtractBlock but I don't understand the VTK data concept well enough to find a solution on my own. Is there a simple way to get the vtkProjectedTetrahedraMapper to use one specific component? Thanks in advance, Kind regards, Bertram -------------- next part -------------- An HTML attachment was scrubbed... URL: From drbwts at gmail.com Thu Mar 29 08:12:27 2018 From: drbwts at gmail.com (drbwts) Date: Thu, 29 Mar 2018 05:12:27 -0700 (MST) Subject: [vtkusers] VTK build using CMake, MinGW & Code::Blocks Win 10 Message-ID: <1522325547959-0.post@n5.nabble.com> Win 10, x64 Hi I'm trying to build the VTK 8.1.0 using CMake, MinGW & Code::Blocks CMake runs with no issues & creates a Code::Blocks project for building but when I build I get the following compilation errors */||=== Build: all in VTK (compiler: GNU GCC Compiler) ===| C:\Users\qrb17230\Documents\OpenGL\VTK-8.1.0\Utilities\KWSys\vtksys\Directory.cxx||In member function 'bool vtksys::Directory::Load(const string&)':| C:\Users\qrb17230\Documents\OpenGL\VTK-8.1.0\Utilities\KWSys\vtksys\Directory.cxx|118|error: aggregate 'vtksys::Directory::Load(const string&)::_wfinddata_t data' has incomplete type and cannot be defined| C:\Users\qrb17230\Documents\OpenGL\VTK-8.1.0\Utilities\KWSys\vtksys\Directory.cxx|122|error: '_wfindfirst' was not declared in this scope| C:\Users\qrb17230\Documents\OpenGL\VTK-8.1.0\Utilities\KWSys\vtksys\Directory.cxx|132|error: '_wfindnext' was not declared in this scope| C:\Users\qrb17230\Documents\OpenGL\VTK-8.1.0\Utilities\KWSys\vtksys\Directory.cxx|154|error: aggregate 'vtksys::Directory::GetNumberOfFilesInDirectory(const string&)::_wfinddata_t data' has incomplete type and cannot be defined| C:\Users\qrb17230\Documents\OpenGL\VTK-8.1.0\Utilities\KWSys\vtksys\Directory.cxx|158|error: '_wfindfirst' was not declared in this scope| C:\Users\qrb17230\Documents\OpenGL\VTK-8.1.0\Utilities\KWSys\vtksys\Directory.cxx|169|error: '_wfindnext' was not declared in this scope| Utilities\KWSys\vtksys\CMakeFiles\vtksys.dir\build.make|187|recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.obj' failed| CMakeFiles\Makefile2|226|recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all' failed| C:\Users\qrb17230\Documents\OpenGL\VTK-bin\Makefile|128|recipe for target 'all' failed| ||=== Build failed: 9 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===| /* I'm guessing that */_wfinddata_t/* needs declaring in a header file? I'm at the edge of my technical competence here so any help will be much appreciated. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jayavardhanravi at outlook.com Thu Mar 29 12:54:44 2018 From: jayavardhanravi at outlook.com (Jay) Date: Thu, 29 Mar 2018 09:54:44 -0700 (MST) Subject: [vtkusers] Get actual position of actor from an assembly after applying transforms Message-ID: <1522342484646-0.post@n5.nabble.com> I am trying to obtain the position of the actor after the adding to assembly and making transforms. After each transformation I try to print the position and center but I always get the initial values or the values don't update as the transforms updates. Do I miss something ? The pseudo code: vtkSmartPointer cyl = vtkSmartPointer::New(); cyl->SetRadius(10); cyl->SetHeight(50); cyl->Update(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(cyl->GetOutputPort()); vtkSmartPointer act1 = vtkSmartPointer::New(); act1->SetMapper(mapper); vtkSmartPointer trans1 = vtkSmartPointer::New(); act1->SetUserTransform(trans1); vtkSmartPointer cyl1 = vtkSmartPointer::New(); cyl1->SetRadius(10); cyl1->SetHeight(50); cyl1->Update(); vtkSmartPointer mapper1 = vtkSmartPointer::New(); mapper1->SetInputConnection(cyl1->GetOutputPort()); vtkSmartPointer act2 = vtkSmartPointer::New(); act2->SetMapper(mapper1); vtkSmartPointer trans2 = vtkSmartPointer::New(); act2->SetUserTransform(trans2); vtkSmartPointer assembly = vtkSmartPointer::New(); assembly->AddPart(act1); assembly->AddPart(act2); int count = 0; while(count < 100) { trans2->Identity(); trans2->RotateX(30); trans2->RotateY(90); trans2->RotateZ(10); trans2->Update(); renderer->AddActor(assembly); renderer->Render(); count++; std::cout << "Center : " << act2->GetCenter()[0] << " & " << act2->GetCenter()[1] << " & " << act2->GetCenter()[2]; std::cout << "Position : " << act2->GetPosition()[0] << " & " << act2->GetPosition()[1] << " & " << act2->GetPosition()[2]; } Any help or suggestions would be appreciated Regards, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Thu Mar 29 12:58:21 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 29 Mar 2018 16:58:21 +0000 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: If you can provide a compilable example we can take a look. On Thu, Mar 29, 2018, 9:54 AM Jay wrote: > I am trying to obtain the position of the actor after the adding to > assembly and making transforms. > > After each transformation I try to print the position and center but I > always get the initial values or the values don't update as the transforms > updates. > > Do I miss something ? > > The pseudo code: > > vtkSmartPointer cyl = > vtkSmartPointer::New(); > cyl->SetRadius(10); > cyl->SetHeight(50); > cyl->Update(); > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(cyl->GetOutputPort()); > vtkSmartPointer act1 = vtkSmartPointer::New(); > act1->SetMapper(mapper); > vtkSmartPointer trans1 = > vtkSmartPointer::New(); > act1->SetUserTransform(trans1); > > vtkSmartPointer cyl1 = > vtkSmartPointer::New(); > cyl1->SetRadius(10); > cyl1->SetHeight(50); > cyl1->Update(); > vtkSmartPointer mapper1 = > vtkSmartPointer::New(); > mapper1->SetInputConnection(cyl1->GetOutputPort()); > vtkSmartPointer act2 = vtkSmartPointer::New(); > act2->SetMapper(mapper1); > vtkSmartPointer trans2 = > vtkSmartPointer::New(); > act2->SetUserTransform(trans2); > > vtkSmartPointer assembly = > vtkSmartPointer::New(); > assembly->AddPart(act1); > assembly->AddPart(act2); > int count = 0; > while(count < 100) > { > trans2->Identity(); > trans2->RotateX(30); > trans2->RotateY(90); > trans2->RotateZ(10); > trans2->Update(); > renderer->AddActor(assembly); > renderer->Render(); > count++; > std::cout << "Center : " << act2->GetCenter()[0] << " & " > << > act2->GetCenter()[1] << " & " << act2->GetCenter()[2]; > std::cout << "Position : " << act2->GetPosition()[0] << " > & " << > act2->GetPosition()[1] << " & " << act2->GetPosition()[2]; > } > > Any help or suggestions would be appreciated > > Regards, > Jay > > > > -- > 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 Thu Mar 29 13:18:07 2018 From: jayavardhanravi at outlook.com (Jay) Date: Thu, 29 Mar 2018 10:18:07 -0700 (MST) Subject: [vtkusers] Get actual position of actor from an assembly after applying transforms In-Reply-To: References: <1522342484646-0.post@n5.nabble.com> Message-ID: <1522343887698-0.post@n5.nabble.com> I had attached the sample working code TestCode.cc -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Thu Mar 29 15:22:31 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 29 Mar 2018 12:22:31 -0700 Subject: [vtkusers] Request for Feedback: VTK Textbook Strawman Message-ID: 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 From lasso at queensu.ca Thu Mar 29 15:34:03 2018 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 29 Mar 2018 19:34:03 +0000 Subject: [vtkusers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Thank you Bill, this is looks awesome! It is nicely readable - even on portrait screen orientation (e-readers, phones), searchable, hyperlinkable section titles. One nice improvement would be to make figure reference (e.g., Figure6-39) hyperlinked to the figure, so that if I click on it then the page scrolls there. Would be nice to make biblio references (e.g., [Wyszecki82]) hyperlinked, too, but only if it's easy to do. Andras -----Original Message----- From: Bill Lorensen Sent: Thursday, March 29, 2018 3:23 PM To: VTK Developers ; VTK Users Cc: Will ; Ken ; Berk Geveci ; Andras Lasso ; Andrew Maclean Subject: Request for Feedback: VTK Textbook Strawman 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FVTKBook%2FChapter6%2F&data=02%7C01%7Classo%40queensu.ca%7Cd69312dd725d4229c7a608d595aa6c11%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636579481544635694&sdata=PctmleYfeo8Xkda2fsRZJlcybPoe7DgT5E2LtG%2FNnIY%3D&reserved=0 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FVTKBookFigures%2F&data=02%7C01%7Classo%40queensu.ca%7Cd69312dd725d4229c7a608d595aa6c11%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636579481544635694&sdata=y2MzDqU%2FIuambSesKZRlGMneBsTtc3JiOVQo5jN1Un0%3D&reserved=0). 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FVTKBookFigures%2F&data=02%7C01%7Classo%40queensu.ca%7Cd69312dd725d4229c7a608d595aa6c11%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636579481544635694&sdata=y2MzDqU%2FIuambSesKZRlGMneBsTtc3JiOVQo5jN1Un0%3D&reserved=0). 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 From bill.lorensen at gmail.com Thu Mar 29 15:45:53 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 29 Mar 2018 12:45:53 -0700 Subject: [vtkusers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Andras, I think I could automate link between figure references and the figures. I'll take a look. On Thu, Mar 29, 2018, 12:34 PM Andras Lasso wrote: > Thank you Bill, this is looks awesome! It is nicely readable - even on > portrait screen orientation (e-readers, phones), searchable, hyperlinkable > section titles. > > One nice improvement would be to make figure reference (e.g., Figure6-39) > hyperlinked to the figure, so that if I click on it then the page scrolls > there. > > Would be nice to make biblio references (e.g., [Wyszecki82]) hyperlinked, > too, but only if it's easy to do. > > Andras > > -----Original Message----- > From: Bill Lorensen > Sent: Thursday, March 29, 2018 3:23 PM > To: VTK Developers ; VTK Users > Cc: Will ; Ken ; Berk > Geveci ; Andras Lasso ; Andrew > Maclean > Subject: Request for Feedback: VTK Textbook Strawman > > 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://na01.safelinks.protection.outlook.com/?url= > https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite% > 2FVTKBook%2FChapter6%2F&data=02%7C01%7Classo%40queensu.ca% > 7Cd69312dd725d4229c7a608d595aa6c11%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636579481544635694&sdata=PctmleYfeo8Xkda2fsRZJlcybPoe7D > gT5E2LtG%2FNnIY%3D&reserved=0 > > 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://na01.safelinks. > protection.outlook.com/?url=https%3A%2F%2Florensen.github. > io%2FVTKExamples%2Fsite%2FVTKBookFigures%2F&data=02% > 7C01%7Classo%40queensu.ca%7Cd69312dd725d4229c7a608d595aa6c11% > 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636579481544635694&sdata= > y2MzDqU%2FIuambSesKZRlGMneBsTtc3JiOVQo5jN1Un0%3D&reserved=0). 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://na01.safelinks.protection.outlook.com/?url= > https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite% > 2FVTKBookFigures%2F&data=02%7C01%7Classo%40queensu.ca% > 7Cd69312dd725d4229c7a608d595aa6c11%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636579481544635694&sdata=y2MzDqU% > 2FIuambSesKZRlGMneBsTtc3JiOVQo5jN1Un0%3D&reserved=0). > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Mar 29 16:11:31 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 29 Mar 2018 14:11:31 -0600 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: If you don't yet have a way to extract figures from the text, the "poppler" package has a "pdfimages" tool for this: pdfimages -j book.pdf /outdir/prefix With the "-j" flag, all jpegs in the pdf are dumped as prefix-xxxx.jpg, and all other figures as prefix-xxxx.pbm. - David On Thu, Mar 29, 2018 at 1:45 PM, Bill Lorensen wrote: > Andras, > > I think I could automate link between figure references and the figures. > I'll take a look. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Mar 29 16:33:09 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 29 Mar 2018 13:33:09 -0700 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: pandoc extracts them. The problem is the pdf was created from framemaker output and the drawn figures are not made up of one thing. On Thu, Mar 29, 2018 at 1:11 PM, David Gobbi wrote: > If you don't yet have a way to extract figures from the text, the "poppler" > package has a "pdfimages" tool for this: > > pdfimages -j book.pdf /outdir/prefix > > With the "-j" flag, all jpegs in the pdf are dumped as prefix-xxxx.jpg, and > all other figures as prefix-xxxx.pbm. > > - David > > > > On Thu, Mar 29, 2018 at 1:45 PM, Bill Lorensen > wrote: >> >> Andras, >> >> I think I could automate link between figure references and the figures. >> I'll take a look. -- Unpaid intern in BillsParadise at noware dot com From bill.lorensen at gmail.com Thu Mar 29 16:34:27 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 29 Mar 2018 13:34:27 -0700 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Turns out I can auto-generate links to figures during the scraping process. I'll try tonight. Bill On Thu, Mar 29, 2018 at 1:33 PM, Bill Lorensen wrote: > pandoc extracts them. The problem is the pdf was created from > framemaker output and the drawn figures are not made up of one thing. > > On Thu, Mar 29, 2018 at 1:11 PM, David Gobbi wrote: >> If you don't yet have a way to extract figures from the text, the "poppler" >> package has a "pdfimages" tool for this: >> >> pdfimages -j book.pdf /outdir/prefix >> >> With the "-j" flag, all jpegs in the pdf are dumped as prefix-xxxx.jpg, and >> all other figures as prefix-xxxx.pbm. >> >> - David >> >> >> >> On Thu, Mar 29, 2018 at 1:45 PM, Bill Lorensen >> wrote: >>> >>> Andras, >>> >>> I think I could automate link between figure references and the figures. >>> I'll take a look. > > > > -- > Unpaid intern in BillsParadise at noware dot com -- Unpaid intern in BillsParadise at noware dot com From andrew.amaclean at gmail.com Thu Mar 29 19:02:41 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Thu, 29 Mar 2018 23:02:41 +0000 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: I'll look at the equations in the next week or so. Looks pretty good so far. I guess the key thing is that it should be easy to update so the book can be modernised. Andrew Maclean On 30 Mar 2018 07:34, "Bill Lorensen" wrote: Turns out I can auto-generate links to figures during the scraping process. I'll try tonight. Bill On Thu, Mar 29, 2018 at 1:33 PM, Bill Lorensen wrote: > pandoc extracts them. The problem is the pdf was created from > framemaker output and the drawn figures are not made up of one thing. > > On Thu, Mar 29, 2018 at 1:11 PM, David Gobbi wrote: >> If you don't yet have a way to extract figures from the text, the "poppler" >> package has a "pdfimages" tool for this: >> >> pdfimages -j book.pdf /outdir/prefix >> >> With the "-j" flag, all jpegs in the pdf are dumped as prefix-xxxx.jpg, and >> all other figures as prefix-xxxx.pbm. >> >> - David >> >> >> >> On Thu, Mar 29, 2018 at 1:45 PM, Bill Lorensen >> wrote: >>> >>> Andras, >>> >>> I think I could automate link between figure references and the figures. >>> I'll take a look. > > > > -- > Unpaid intern in BillsParadise at noware dot com -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Thu Mar 29 20:59:48 2018 From: nztoddler at yahoo.com (Todd Martin) Date: Fri, 30 Mar 2018 00:59:48 +0000 (UTC) Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: <1155151590.1098355.1522371588064@mail.yahoo.com> This looks great Bill! On Friday, March 30, 2018, 12:02:58 PM GMT+13, Andrew Maclean wrote: I'll look at the equations in the next week or so.Looks pretty good so far.I guess the key thing is that it should be easy to update so the book can be modernised. Andrew Maclean On 30 Mar 2018 07:34, "Bill Lorensen" wrote: Turns out I can auto-generate links to figures during the scraping process. I'll try tonight. Bill On Thu, Mar 29, 2018 at 1:33 PM, Bill Lorensen wrote: > pandoc extracts them. The problem is the pdf was created from > framemaker output and the drawn figures are not made up of one thing. > > On Thu, Mar 29, 2018 at 1:11 PM, David Gobbi wrote: >> If you don't yet have a way to extract figures from the text, the "poppler" >> package has a "pdfimages" tool for this: >> >>? pdfimages -j book.pdf /outdir/prefix >> >> With the "-j" flag, all jpegs in the pdf are dumped as prefix-xxxx.jpg, and >> all other figures as prefix-xxxx.pbm. >> >>? - David >> >> >> >> On Thu, Mar 29, 2018 at 1:45 PM, Bill Lorensen >> wrote: >>> >>> Andras, >>> >>> I think I could automate link between figure references and the figures. >>> I'll take a look. > > > > -- > Unpaid intern in BillsParadise at noware dot com -- 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 will.schroeder at kitware.com Fri Mar 30 06:43:18 2018 From: will.schroeder at kitware.com (Will Schroeder) Date: Fri, 30 Mar 2018 06:43:18 -0400 Subject: [vtkusers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: This is a really great work, thanks Bill! It would be great to get the book out there so the community can fix, improve and extend it. To ask a dumb question. and I don't have skin this game either, is markdown the best way to go? Is a LaTeX book better? From what I understand here are tools that convert framemaker to LaTeX etc. I suspect that with LaTeX you'd end up with a better quality result, including things like indexing, cross referencing, etc. And are there other options we should consider? Best, Will On Thu, Mar 29, 2018 at 3:22 PM, 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 > -- 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 Fri Mar 30 08:04:37 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 30 Mar 2018 12:04:37 +0000 Subject: [vtkusers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: I would seriously consider LaTeX for the reasons mentioned. Additionally, it is really well suited for rendering equations. Andrew Maclean On Fri, 30 Mar. 2018, 21:43 Will Schroeder, wrote: > This is a really great work, thanks Bill! It would be great to get the > book out there so the community can fix, improve and extend it. > > To ask a dumb question. and I don't have skin this game either, is > markdown the best way to go? Is a LaTeX book better? From what I understand > here are tools that convert framemaker to LaTeX etc. I suspect that with > LaTeX you'd end up with a better quality result, including things like > indexing, cross referencing, etc. And are there other options we should > consider? > > Best, > Will > > > > > > On Thu, Mar 29, 2018 at 3:22 PM, 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 >> > > > > -- > 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 matthew.brett at gmail.com Fri Mar 30 08:29:40 2018 From: matthew.brett at gmail.com (Matthew Brett) Date: Fri, 30 Mar 2018 13:29:40 +0100 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Hi, On Fri, Mar 30, 2018 at 1:04 PM, Andrew Maclean wrote: > I would seriously consider LaTeX for the reasons mentioned. Additionally, it > is really well suited for rendering equations. I don't know much about mkdocs, but I believe you can configure it to render LaTeX equations: https://github.com/mkdocs/mkdocs/issues/253#issuecomment-196486412 Cheers, Matthew From bill.lorensen at gmail.com Fri Mar 30 09:09:30 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 30 Mar 2018 13:09:30 +0000 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Will, I guess I did not envision a traditional book. This is a web site that is alive. It will present well on all platforms including mobile. Things like indexes aren't really needed. That said if folks want latex so be it. Not me. I can fill my time with other stuff. In the meantime, I'll do some more experiments. Bill On Fri, Mar 30, 2018, 5:30 AM Matthew Brett wrote: > Hi, > > On Fri, Mar 30, 2018 at 1:04 PM, Andrew Maclean > wrote: > > I would seriously consider LaTeX for the reasons mentioned. > Additionally, it > > is really well suited for rendering equations. > > I don't know much about mkdocs, but I believe you can configure it to > render LaTeX equations: > > https://github.com/mkdocs/mkdocs/issues/253#issuecomment-196486412 > > Cheers, > > Matthew > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 berk.geveci at kitware.com Fri Mar 30 09:34:16 2018 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 30 Mar 2018 09:34:16 -0400 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Wouldn't a tool like pandoc allow us to maintain some sort of markdown that can be converted to both something online and LaTeX at the same time? It would be great to support both as we would be interested in support a print-on-demand kind of book on Amazon. There are still people out there that like printed books (like me :-) ). On Fri, Mar 30, 2018 at 9:09 AM, Bill Lorensen wrote: > Will, I guess I did not envision a traditional book. This is a web site > that is alive. It will present well on all platforms including mobile. > Things like indexes aren't really needed. > > That said if folks want latex so be it. Not me. I can fill my time with > other stuff. > > In the meantime, I'll do some more experiments. > > Bill > > On Fri, Mar 30, 2018, 5:30 AM Matthew Brett > wrote: > >> Hi, >> >> On Fri, Mar 30, 2018 at 1:04 PM, Andrew Maclean >> wrote: >> > I would seriously consider LaTeX for the reasons mentioned. >> Additionally, it >> > is really well suited for rendering equations. >> >> I don't know much about mkdocs, but I believe you can configure it to >> render LaTeX equations: >> >> https://github.com/mkdocs/mkdocs/issues/253#issuecomment-196486412 >> >> Cheers, >> >> Matthew >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 berk.geveci at kitware.com Fri Mar 30 09:34:55 2018 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 30 Mar 2018 09:34:55 -0400 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Btw, I meant to say that this is fantastic and I am super thrilled. I am also kicking myself for not suggesting this to Bill earlier! On Fri, Mar 30, 2018 at 9:34 AM, Berk Geveci wrote: > Wouldn't a tool like pandoc allow us to maintain some sort of markdown > that can be converted to both something online and LaTeX at the same time? > It would be great to support both as we would be interested in support a > print-on-demand kind of book on Amazon. There are still people out there > that like printed books (like me :-) ). > > On Fri, Mar 30, 2018 at 9:09 AM, Bill Lorensen > wrote: > >> Will, I guess I did not envision a traditional book. This is a web site >> that is alive. It will present well on all platforms including mobile. >> Things like indexes aren't really needed. >> >> That said if folks want latex so be it. Not me. I can fill my time with >> other stuff. >> >> In the meantime, I'll do some more experiments. >> >> Bill >> >> On Fri, Mar 30, 2018, 5:30 AM Matthew Brett >> wrote: >> >>> Hi, >>> >>> On Fri, Mar 30, 2018 at 1:04 PM, Andrew Maclean >>> wrote: >>> > I would seriously consider LaTeX for the reasons mentioned. >>> Additionally, it >>> > is really well suited for rendering equations. >>> >>> I don't know much about mkdocs, but I believe you can configure it to >>> render LaTeX equations: >>> >>> https://github.com/mkdocs/mkdocs/issues/253#issuecomment-196486412 >>> >>> Cheers, >>> >>> Matthew >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 Fri Mar 30 09:58:00 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 30 Mar 2018 06:58:00 -0700 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: pandoc is not perfect, but I did use it to convert the book's pdf to markdown doc, docx and txt. On Fri, Mar 30, 2018 at 6:34 AM, Berk Geveci wrote: > Btw, I meant to say that this is fantastic and I am super thrilled. I am > also kicking myself for not suggesting this to Bill earlier! > > On Fri, Mar 30, 2018 at 9:34 AM, Berk Geveci > wrote: >> >> Wouldn't a tool like pandoc allow us to maintain some sort of markdown >> that can be converted to both something online and LaTeX at the same time? >> It would be great to support both as we would be interested in support a >> print-on-demand kind of book on Amazon. There are still people out there >> that like printed books (like me :-) ). >> >> On Fri, Mar 30, 2018 at 9:09 AM, Bill Lorensen >> wrote: >>> >>> Will, I guess I did not envision a traditional book. This is a web site >>> that is alive. It will present well on all platforms including mobile. >>> Things like indexes aren't really needed. >>> >>> That said if folks want latex so be it. Not me. I can fill my time with >>> other stuff. >>> >>> In the meantime, I'll do some more experiments. >>> >>> Bill >>> >>> On Fri, Mar 30, 2018, 5:30 AM Matthew Brett >>> wrote: >>>> >>>> Hi, >>>> >>>> On Fri, Mar 30, 2018 at 1:04 PM, Andrew Maclean >>>> wrote: >>>> > I would seriously consider LaTeX for the reasons mentioned. >>>> > Additionally, it >>>> > is really well suited for rendering equations. >>>> >>>> I don't know much about mkdocs, but I believe you can configure it to >>>> render LaTeX equations: >>>> >>>> https://github.com/mkdocs/mkdocs/issues/253#issuecomment-196486412 >>>> >>>> Cheers, >>>> >>>> Matthew >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> 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 bill.lorensen at gmail.com Fri Mar 30 10:00:26 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 30 Mar 2018 07:00:26 -0700 Subject: [vtkusers] Links to Figures Message-ID: Now auto-generated links to figures are here: https://lorensen.github.io/VTKExamples/site/VTKBook/Chapter6/ If a figure exists in the chapter, references in the text will link to the figure. Bill -- Unpaid intern in BillsParadise at noware dot com From lasso at queensu.ca Fri Mar 30 11:26:03 2018 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 30 Mar 2018 15:26:03 +0000 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Despite all its limitations, Markdown is becoming one of the most widely used standard in technical writing. You can get books authored in Markdown published as hardcopy, see for example http://docs.atlas.oreilly.com/writing_in_markdown.html. If we can live without sophisticated typesetting then we could save a lot of time and be ?compatible? with many more potential authors and online publishing services by using Markdown instead of Latex. ITK software guide is written in Latex, we could ask ITK folks about how happy they are with it. Andras From: vtk-developers On Behalf Of Berk Geveci Sent: Friday, March 30, 2018 9:34 AM To: Bill Lorensen Cc: VTK Developers ; VTK Users ; Andrew Maclean ; Will Schroeder Subject: Re: [vtk-developers] [vtkusers] Request for Feedback: VTK Textbook Strawman Wouldn't a tool like pandoc allow us to maintain some sort of markdown that can be converted to both something online and LaTeX at the same time? It would be great to support both as we would be interested in support a print-on-demand kind of book on Amazon. There are still people out there that like printed books (like me :-) ). On Fri, Mar 30, 2018 at 9:09 AM, Bill Lorensen > wrote: Will, I guess I did not envision a traditional book. This is a web site that is alive. It will present well on all platforms including mobile. Things like indexes aren't really needed. That said if folks want latex so be it. Not me. I can fill my time with other stuff. In the meantime, I'll do some more experiments. Bill On Fri, Mar 30, 2018, 5:30 AM Matthew Brett > wrote: Hi, On Fri, Mar 30, 2018 at 1:04 PM, Andrew Maclean > wrote: > I would seriously consider LaTeX for the reasons mentioned. Additionally, it > is really well suited for rendering equations. I don't know much about mkdocs, but I believe you can configure it to render LaTeX equations: https://github.com/mkdocs/mkdocs/issues/253#issuecomment-196486412 Cheers, Matthew _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 matthew.brett at gmail.com Fri Mar 30 12:07:57 2018 From: matthew.brett at gmail.com (Matthew Brett) Date: Fri, 30 Mar 2018 17:07:57 +0100 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Hi, On Fri, Mar 30, 2018 at 4:26 PM, Andras Lasso wrote: > Despite all its limitations, Markdown is becoming one of the most widely > used standard in technical writing. You can get books authored in Markdown > published as hardcopy, see for example > http://docs.atlas.oreilly.com/writing_in_markdown.html. > > > > If we can live without sophisticated typesetting then we could save a lot of > time and be ?compatible? with many more potential authors and online > publishing services by using Markdown instead of Latex. You probably saw the warning on the O'Reilly Markdown page: """ Markdown is best for simple content. It does not support many standard technical book elements, including parts, admonitions, sidebars, and cross references. """ Some of that might be called "typsetting" but maybe not parts or cross-references. Matthew From bill.lorensen at gmail.com Fri Mar 30 12:15:04 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 30 Mar 2018 16:15:04 +0000 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: Mkdocs does contain admonitions. Also I process the markdown and create the cross references automatically. On Fri, Mar 30, 2018, 9:08 AM Matthew Brett wrote: > Hi, > > On Fri, Mar 30, 2018 at 4:26 PM, Andras Lasso wrote: > > Despite all its limitations, Markdown is becoming one of the most widely > > used standard in technical writing. You can get books authored in > Markdown > > published as hardcopy, see for example > > http://docs.atlas.oreilly.com/writing_in_markdown.html. > > > > > > > > If we can live without sophisticated typesetting then we could save a > lot of > > time and be ?compatible? with many more potential authors and online > > publishing services by using Markdown instead of Latex. > > You probably saw the warning on the O'Reilly Markdown page: > > """ > Markdown is best for simple content. It does not support many standard > technical book elements, including parts, admonitions, sidebars, and > cross references. > """ > > Some of that might be called "typsetting" but maybe not parts or > cross-references. > > Matthew > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Fri Mar 30 12:55:16 2018 From: david.thompson at kitware.com (David Thompson) Date: Fri, 30 Mar 2018 12:55:16 -0400 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: > pandoc is not perfect, but I did use it to convert the book's pdf to > markdown doc, docx and txt. I believe pandoc also deals with restructured text (rst), which is similar to markdown. It is what https://readthedocs.org/ uses (via the python Sphinx tool). We use it for some other projects at Kitware (SMTK and CMB) and it works well. Unlike markdown, it is extensible (you can write python code to inject HTML/JS/LaTeX etc. into the output). It also has some hooks to include portions of external files. We use this to directly include source code (that gets tested!) into the documentation. I am working toward using image tests as part of the documentation. Of course, it's not perfect (there's no guarantee all the documentation makes sense anymore if you change the source). I also want to use it to inject interactive vtk-js content into the online version of the docs (and a screenshot into the offline version), which is possible via an extension if not directly. David From bill.lorensen at gmail.com Fri Mar 30 13:21:26 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 30 Mar 2018 17:21:26 +0000 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: We also do the testing every night. Since I already have the infrastructure in place I hope to keep using mkdocs with the material look and feel. On Fri, Mar 30, 2018, 9:55 AM David Thompson wrote: > > pandoc is not perfect, but I did use it to convert the book's pdf to > > markdown doc, docx and txt. > > I believe pandoc also deals with restructured text (rst), which is similar > to markdown. It is what https://readthedocs.org/ uses (via the python > Sphinx tool). We use it for some other projects at Kitware (SMTK and CMB) > and it works well. Unlike markdown, it is extensible (you can write python > code to inject HTML/JS/LaTeX etc. into the output). > > It also has some hooks to include portions of external files. We use this > to directly include source code (that gets tested!) into the documentation. > I am working toward using image tests as part of the documentation. Of > course, it's not perfect (there's no guarantee all the documentation makes > sense anymore if you change the source). I also want to use it to inject > interactive vtk-js content into the online version of the docs (and a > screenshot into the offline version), which is possible via an extension if > not directly. > > David -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Mar 30 13:24:50 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 30 Mar 2018 17:24:50 +0000 Subject: [vtkusers] [vtk-developers] Request for Feedback: VTK Textbook Strawman In-Reply-To: References: Message-ID: I also process the markdown and insert code, images, doxygen links to all mentions of vtk classes. So I guess markdown is extensible with my own python code. On Fri, Mar 30, 2018, 10:21 AM Bill Lorensen wrote: > We also do the testing every night. Since I already have the > infrastructure in place I hope to keep using mkdocs with the material look > and feel. > > On Fri, Mar 30, 2018, 9:55 AM David Thompson > wrote: > >> > pandoc is not perfect, but I did use it to convert the book's pdf to >> > markdown doc, docx and txt. >> >> I believe pandoc also deals with restructured text (rst), which is >> similar to markdown. It is what https://readthedocs.org/ uses (via the >> python Sphinx tool). We use it for some other projects at Kitware (SMTK and >> CMB) and it works well. Unlike markdown, it is extensible (you can write >> python code to inject HTML/JS/LaTeX etc. into the output). >> >> It also has some hooks to include portions of external files. We use this >> to directly include source code (that gets tested!) into the documentation. >> I am working toward using image tests as part of the documentation. Of >> course, it's not perfect (there's no guarantee all the documentation makes >> sense anymore if you change the source). I also want to use it to inject >> interactive vtk-js content into the online version of the docs (and a >> screenshot into the offline version), which is possible via an extension if >> not directly. >> >> David > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chihebz at hotmail.com Fri Mar 30 16:14:43 2018 From: chihebz at hotmail.com (ZACK) Date: Fri, 30 Mar 2018 13:14:43 -0700 (MST) Subject: [vtkusers] vtkProjectedTetrahedraMapper to map one component only In-Reply-To: <2FAC7B9E487D2C478AB8E83F062AF680072E2BA5@doug.risc.local> References: <2FAC7B9E487D2C478AB8E83F062AF680072E2BA5@doug.risc.local> Message-ID: <1522440883890-0.post@n5.nabble.com> 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 From chihebz at hotmail.com Fri Mar 30 16:45:32 2018 From: chihebz at hotmail.com (ZACK) Date: Fri, 30 Mar 2018 13:45:32 -0700 (MST) Subject: [vtkusers] Problem with vtkContourFilter with unstructured grid In-Reply-To: <363835878.734473.1520245408737@mail.virgilio.it> References: <363835878.734473.1520245408737@mail.virgilio.it> Message-ID: <1522442732294-0.post@n5.nabble.com> Hi Luca, I have an unstructured grid and When I create the vtkContourFilter I do the following and it works for me // convert from unstructuredGrid to PolyData vtkSmartPointer extract = vtkSmartPointer::New(); extract->SetInputConnection(c2p->GetOutputPort()); extract->Modified(); // CONTOUR FILTER vtkSmartPointer contourFilter = vtkSmartPointer::New(); contourFilter->SetInputConnection(extract->GetOutputPort()); //get unstructured grid values range double* pRange = new double[2]; c2p->GetScalarRange(pRange); contourFilter->GenerateValues(10, pRange); contourFilter->Modified(); // VISUALIZATION vtkSmartPointer contourActor {vtkSmartPointer::New()}; contourActor->SetMapper(contourMapper); vtkSmartPointer renderer {vtkSmartPointer::New()}; contourActor->SetMapper(contourMapper); renderer->AddActor(contourActor); Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chihebz at hotmail.com Fri Mar 30 17:55:53 2018 From: chihebz at hotmail.com (ZACK) Date: Fri, 30 Mar 2018 14:55:53 -0700 (MST) Subject: [vtkusers] How to control clipping updates when using vtkImplicitPlaneWidget2? In-Reply-To: <1513909210192-0.post@n5.nabble.com> References: <1513905880036-0.post@n5.nabble.com> <1513909210192-0.post@n5.nabble.com> Message-ID: <1522446953472-0.post@n5.nabble.com> Hi Doug, I have a question concerning the implicit plane widget, I migrated recently from vtk 5.4 to vtk 8.1.0 and my plane widget is not working anymore!! it's not visible at all I will appreciate a small example of how you made your widget working and user interactive plane clipping movement Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From M.O.Heller at soton.ac.uk Sat Mar 31 12:40:19 2018 From: M.O.Heller at soton.ac.uk (Heller M.O.) Date: Sat, 31 Mar 2018 16:40:19 +0000 Subject: [vtkusers] suggestion for a tweak in Cxx example: ReadAllPolyDataTypes.cxx / ReadAllPolyDataTypesDemo.cxx Message-ID: Dear all, I used the ReadAllPolyDataTypes.cxx example to create a little command-line tool for file conversion and noted that a small change may make the example code more robust against funny filenames i.e. filenames including multiple dots. I think it could help to make the example a tad more robust if line 70 of the ReadAllPolyDataTypes.cxx file was changed from: std::string extension = vtksys::SystemTools::GetFilenameExtension(std::string(fileName)); to: std::string extension = vtksys::SystemTools::GetFilenameLastExtension(std::string(fileName)); It took me as an absolute Cxx idiot a while to figure out what the problem was and how to address it. (A similar change may also be useful for the ReadAllPolyDataTypesDemo.cxx example) Best wishes, Markus Arthritis Research UK Centre for Sport, Exercise and Osteoarthritis www.sportsarthritisresearchuk.org ------------------------------------------------------------------- Prof. Dr. Markus O. Heller Full Professor of Biomechanics University of Southampton Department of Mechanical Engineering Southampton SO17 1BJ United Kingdom Tel. : +44 (0) 23 8059 4909 Fax : +44 (0) 23 8059 3016 email: m.o.heller at soton.ac.uk ------------------------------------------------------------------- 8th World Congress of Biomechanics, 8-12 July 2018, Dublin, Ireland http://wcb2018.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat Mar 31 15:33:55 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 31 Mar 2018 12:33:55 -0700 Subject: [vtkusers] suggestion for a tweak in Cxx example: ReadAllPolyDataTypes.cxx / ReadAllPolyDataTypesDemo.cxx In-Reply-To: References: Message-ID: Sounds like a good idea, but give me an example of a filename that fails with the current example. I tried a file named Torso.new.vtp an it was read fine. Bill On Sat, Mar 31, 2018 at 9:40 AM, Heller M.O. wrote: > Dear all, > > > > I used the ReadAllPolyDataTypes.cxx example to create a little command-line > tool for file conversion and noted that a small change may make the example > code more robust against funny filenames i.e. filenames including multiple > dots. > > > > I think it could help to make the example a tad more robust if > line 70 of the ReadAllPolyDataTypes.cxx file was changed from: > > > > std::string extension = > vtksys::SystemTools::GetFilenameExtension(std::string(fileName)); > > > > to: > > > > std::string extension = > vtksys::SystemTools::GetFilenameLastExtension(std::string(fileName)); > > > > > > It took me as an absolute Cxx idiot a while to figure out what the problem > was and how to address it. > > (A similar change may also be useful for the ReadAllPolyDataTypesDemo.cxx > example) > > > > Best wishes, Markus > > > > Arthritis Research UK Centre for Sport, Exercise and Osteoarthritis > > www.sportsarthritisresearchuk.org > > ------------------------------------------------------------------- > > Prof. Dr. Markus O. Heller > > Full Professor of Biomechanics > > University of Southampton > > Department of Mechanical Engineering > > Southampton > > SO17 1BJ > > United Kingdom > > > > Tel. : +44 (0) 23 8059 4909 > > Fax : +44 (0) 23 8059 3016 > > email: m.o.heller at soton.ac.uk > > ------------------------------------------------------------------- > > 8th World Congress of Biomechanics, 8-12 July 2018, Dublin, Ireland > > http://wcb2018.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 > -- Unpaid intern in BillsParadise at noware dot com From M.O.Heller at soton.ac.uk Sat Mar 31 15:42:47 2018 From: M.O.Heller at soton.ac.uk (Heller M.O.) Date: Sat, 31 Mar 2018 19:42:47 +0000 Subject: [vtkusers] suggestion for a tweak in Cxx example: ReadAllPolyDataTypes.cxx / ReadAllPolyDataTypesDemo.cxx In-Reply-To: References: Message-ID: Interesting - I tried e.g. test1.A.ply for which the current method (GetFilenameExtension) returned .A.ply as extension. On the other hand, using GetFilenameLastExtension resulted in the correct identification of just .ply as extension. This was on windows 8.1 with vtk 8.0 - maybe there is variation between platforms? Best wishes, Markus Arthritis Research UK Centre for Sport, Exercise and Osteoarthritis www.sportsarthritisresearchuk.org ------------------------------------------------------------------- Prof. Dr. Markus O. Heller Full Professor of Biomechanics University of Southampton Department of Mechanical Engineering Southampton SO17 1BJ United Kingdom Tel. : +44 (0) 23 8059 4909 Fax : +44 (0) 23 8059 3016 email: m.o.heller at soton.ac.uk ------------------------------------------------------------------- 8th World Congress of Biomechanics, 8-12 July 2018, Dublin, Ireland http://wcb2018.com -----Original Message----- From: Bill Lorensen [mailto:bill.lorensen at gmail.com] Sent: 31 March 2018 20:34 To: Heller M.O. Cc: vtkusers at vtk.org Subject: Re: [vtkusers] suggestion for a tweak in Cxx example: ReadAllPolyDataTypes.cxx / ReadAllPolyDataTypesDemo.cxx Sounds like a good idea, but give me an example of a filename that fails with the current example. I tried a file named Torso.new.vtp an it was read fine. Bill On Sat, Mar 31, 2018 at 9:40 AM, Heller M.O. wrote: > Dear all, > > > > I used the ReadAllPolyDataTypes.cxx example to create a little > command-line tool for file conversion and noted that a small change > may make the example code more robust against funny filenames i.e. > filenames including multiple dots. > > > > I think it could help to make the example a tad more robust if line 70 > of the ReadAllPolyDataTypes.cxx file was changed from: > > > > std::string extension = > vtksys::SystemTools::GetFilenameExtension(std::string(fileName)); > > > > to: > > > > std::string extension = > vtksys::SystemTools::GetFilenameLastExtension(std::string(fileName)); > > > > > > It took me as an absolute Cxx idiot a while to figure out what the > problem was and how to address it. > > (A similar change may also be useful for the > ReadAllPolyDataTypesDemo.cxx > example) > > > > Best wishes, Markus > > > > Arthritis Research UK Centre for Sport, Exercise and Osteoarthritis > > www.sportsarthritisresearchuk.org > > ------------------------------------------------------------------- > > Prof. Dr. Markus O. Heller > > Full Professor of Biomechanics > > University of Southampton > > Department of Mechanical Engineering > > Southampton > > SO17 1BJ > > United Kingdom > > > > Tel. : +44 (0) 23 8059 4909 > > Fax : +44 (0) 23 8059 3016 > > email: m.o.heller at soton.ac.uk > > ------------------------------------------------------------------- > > 8th World Congress of Biomechanics, 8-12 July 2018, Dublin, Ireland > > http://wcb2018.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 > -- Unpaid intern in BillsParadise at noware dot com From bill.lorensen at gmail.com Sat Mar 31 16:28:32 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 31 Mar 2018 13:28:32 -0700 Subject: [vtkusers] suggestion for a tweak in Cxx example: ReadAllPolyDataTypes.cxx / ReadAllPolyDataTypesDemo.cxx In-Reply-To: References: Message-ID: Could be a platform diff. I'll make the change. Thanks, Bill On Sat, Mar 31, 2018 at 12:42 PM, Heller M.O. wrote: > Interesting - I tried e.g. test1.A.ply for which the current method (GetFilenameExtension) returned .A.ply as extension. > On the other hand, using GetFilenameLastExtension resulted in the correct identification of just .ply as extension. > > This was on windows 8.1 with vtk 8.0 - maybe there is variation between platforms? > > Best wishes, > Markus > > > Arthritis Research UK Centre for Sport, Exercise and Osteoarthritis > www.sportsarthritisresearchuk.org > ------------------------------------------------------------------- > Prof. Dr. Markus O. Heller > Full Professor of Biomechanics > University of Southampton > Department of Mechanical Engineering > Southampton > SO17 1BJ > United Kingdom > > Tel. : +44 (0) 23 8059 4909 > Fax : +44 (0) 23 8059 3016 > email: m.o.heller at soton.ac.uk > ------------------------------------------------------------------- > 8th World Congress of Biomechanics, 8-12 July 2018, Dublin, Ireland > http://wcb2018.com > > > -----Original Message----- > From: Bill Lorensen [mailto:bill.lorensen at gmail.com] > Sent: 31 March 2018 20:34 > To: Heller M.O. > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] suggestion for a tweak in Cxx example: ReadAllPolyDataTypes.cxx / ReadAllPolyDataTypesDemo.cxx > > Sounds like a good idea, but give me an example of a filename that fails with the current example. I tried a file named Torso.new.vtp an it was read fine. > > Bill > > On Sat, Mar 31, 2018 at 9:40 AM, Heller M.O. wrote: >> Dear all, >> >> >> >> I used the ReadAllPolyDataTypes.cxx example to create a little >> command-line tool for file conversion and noted that a small change >> may make the example code more robust against funny filenames i.e. >> filenames including multiple dots. >> >> >> >> I think it could help to make the example a tad more robust if line 70 >> of the ReadAllPolyDataTypes.cxx file was changed from: >> >> >> >> std::string extension = >> vtksys::SystemTools::GetFilenameExtension(std::string(fileName)); >> >> >> >> to: >> >> >> >> std::string extension = >> vtksys::SystemTools::GetFilenameLastExtension(std::string(fileName)); >> >> >> >> >> >> It took me as an absolute Cxx idiot a while to figure out what the >> problem was and how to address it. >> >> (A similar change may also be useful for the >> ReadAllPolyDataTypesDemo.cxx >> example) >> >> >> >> Best wishes, Markus >> >> >> >> Arthritis Research UK Centre for Sport, Exercise and Osteoarthritis >> >> www.sportsarthritisresearchuk.org >> >> ------------------------------------------------------------------- >> >> Prof. Dr. Markus O. Heller >> >> Full Professor of Biomechanics >> >> University of Southampton >> >> Department of Mechanical Engineering >> >> Southampton >> >> SO17 1BJ >> >> United Kingdom >> >> >> >> Tel. : +44 (0) 23 8059 4909 >> >> Fax : +44 (0) 23 8059 3016 >> >> email: m.o.heller at soton.ac.uk >> >> ------------------------------------------------------------------- >> >> 8th World Congress of Biomechanics, 8-12 July 2018, Dublin, Ireland >> >> http://wcb2018.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 >> > > > > -- > Unpaid intern in BillsParadise at noware dot com -- Unpaid intern in BillsParadise at noware dot com