Hi.
I created vtkDistanceWidget to measure distance on my reslice image. and it works fine but when I scroll through slices, the distanceWidget also appears.I want to display the measure tool only for current slice not all slices and also want to save the measure tool (points) to meta file.
So I don’t know how to add the widget to my image data and save to meta file and restore from.
Here is my snippet:
Note that this feature (and all the others that you have asked about in recent months) is already implemented in standard, free, open-source medical image viewers, such as 3D Slicer and MITK. There is no need to waste time with redeveloping all the basic features from scratch because you can customize and extend this applications to fulfill your needs.
You run your script within 3D Slicer’s Python interpreter. If you have further questions about how to use VTK in Slicer’s environment, how to customize and extend the application, etc. then post to the Slicer forum.
If you are developing a phone or tablet app then I don’t have a helpful suggestion (other than you probably need to implement features that are not available in VTK).
If you are developing a desktop application then see this topic.
I’m developing desktop app and I understand what you mean. You are right but I have some issue about it and right now cannot do that.
could you please help me with my question for now?
I want to save the start and end point of ruler (vtkDistanceWidget) in meta file.I don’t know what class should I use and how to save each ruler points for each image slice all in one mhd file.
I created vtkArray and added to image’s fieldData then pass vtkPassArrays output as input of vtkDataSetWriter. but it writes each slice in one file.I want something that can write all slices data in one mhd file.