[vtkusers] vtk zoom indicator
Aravinth
aralol2015 at gmail.com
Thu Nov 9 01:37:39 EST 2017
Hello,
Thanks for the tips it helped me.I would like to know if the length of axes
of the legendactor can be modified.I used the corneroffsetfactor value to
change it.Can it be changed using any other means.
Thanks in Advance
Sankhesh Jhaveri-2 wrote
> There’s no direct API but you can calculate it. All you have to do is
> compute the length of the axis in world coordinates.
>
> Something like this:
>
> double * leftPoint =
> axis->GetPositionCoordinate()->GetComputedWorldValue(renderer);double
> * rightPoint =
> axis->GetPosition2Coordinate()->GetComputedWorldValue(renderer);double
> distance = vtkMath::sqrt(vtkMath::Distance2BetweenPoints(leftPoint,
> rightPoint));// Scale is 1 : distance
>
> Hope that helps.
>
> Best,
> Sankhesh
>
>
> On Tue, Nov 7, 2017 at 4:30 AM K O ranjith <
> kor1581@
> > wrote:
>
>> Hello,
>> Thanks, it's working.
>> Can I get the measured value (which is displayed as label axis) from
>> vtkLegendScaleActor object.
>>
>> Ranjith KO
>>
>> On Fri, Jun 23, 2017 at 7:52 PM, Sankhesh Jhaveri <
>>
> sankhesh.jhaveri@
>> wrote:
>>
>>> Take a look at vtkLegendScaleActor
>>> <http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LegendScaleActor>.
>>> It uses vtkAxisActor
>>> <http://www.vtk.org/doc/nightly/html/classvtkAxisActor.html>
>>> internally.
>>>
>>> Hth,
>>> Sankhesh
>>>
>>>
>>> On Fri, Jun 23, 2017 at 1:55 AM K O ranjith <
> kor1581@
> > wrote:
>>>
>>>> I'm using vtk for developing a MRI DICOM Image viewer in Qt.
>>>> The viewer uses vtkDICOMImageReader, vtkImageViewer2 & QVTKWidget.
>>>> I need to show a zoom indicator line which varies length with zoom
>>>> value and need not affect other operation like rotate, pan( which is
>>>> used
>>>> for DICOM image in same window). It's position should be fixed at side
>>>> of
>>>> viewer and should not alter with zoom, pan, rotate.
>>>> I added an line as an vtkactor to the renderer using vtkLineSource.
>>>> Its length altering with zoom as I intended, but problem is its
>>>> position also altering with the zoom, also rotate and Pan affecting on
>>>> it.
>>>> How can I make the position of the line fixed at side of the viewer.
>>>> Have any option in vtk for visual indication of zoom factor something
>>>> like vtkOrientationMarkerWidget for orientation...
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>
>>> --
>>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
>>> <http://www.kitware.com/> | (518) 881-4417
>>>
>>>
>>
>> --
> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
> <http://www.kitware.com/> | (518) 881-4417
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list