vtk zoom indicator

classic Classic list List threaded Threaded
7 messages Options
ran
Reply | Threaded
Open this post in threaded view
|

vtk zoom indicator

ran
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
Reply | Threaded
Open this post in threaded view
|

Re: vtk zoom indicator

Sankhesh Jhaveri-2

Take a look at vtkLegendScaleActor. It uses vtkAxisActor internally.

Hth,
Sankhesh


On Fri, Jun 23, 2017 at 1:55 AM K O ranjith <[hidden email]> 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 | (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
ran
Reply | Threaded
Open this post in threaded view
|

Re: vtk zoom indicator

ran
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 <[hidden email]> wrote:

Take a look at vtkLegendScaleActor. It uses vtkAxisActor internally.

Hth,
Sankhesh


On Fri, Jun 23, 2017 at 1:55 AM K O ranjith <[hidden email]> 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 | (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
Reply | Threaded
Open this post in threaded view
|

Re: vtk zoom indicator

Sankhesh Jhaveri-2

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 <[hidden email]> 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 <[hidden email]> wrote:

Take a look at vtkLegendScaleActor. It uses vtkAxisActor internally.

Hth,
Sankhesh


On Fri, Jun 23, 2017 at 1:55 AM K O ranjith <[hidden email]> 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 | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417

--
Sankhesh Jhaveri
Sr. Research & Development Engineer | Kitware | (518) 881-4417

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtk zoom indicator

Duster
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 &lt;

> kor1581@

> &gt; 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
>>> &lt;http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LegendScaleActor&gt;.
>>> It uses vtkAxisActor
>>> &lt;http://www.vtk.org/doc/nightly/html/classvtkAxisActor.html&gt;
>>> internally.
>>>
>>> Hth,
>>> Sankhesh
>>> ​
>>>
>>> On Fri, Jun 23, 2017 at 1:55 AM K O ranjith &lt;

> kor1581@

> &gt; 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
>>> &lt;http://www.kitware.com/&gt; | (518) 881-4417
>>> ​
>>>
>>
>> --
> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
> &lt;http://www.kitware.com/&gt; | (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
_______________________________________________
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
ran
Reply | Threaded
Open this post in threaded view
|

Re: vtk zoom indicator

ran
In reply to this post by Sankhesh Jhaveri-2
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

On Tue, Nov 7, 2017 at 9:37 PM, Sankhesh Jhaveri <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:

Take a look at vtkLegendScaleActor. It uses vtkAxisActor internally.

Hth,
Sankhesh


On Fri, Jun 23, 2017 at 1:55 AM K O ranjith <[hidden email]> 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 | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417

--
Sankhesh Jhaveri
Sr. Research & Development Engineer | Kitware | (518) 881-4417


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtk zoom indicator

Sankhesh Jhaveri-2

I don’t think so. You could directly use the vtkAxisActor API instead of using vtkLegendScaleActor to set the position coordinates of the two endpoints.


On Mon, Nov 13, 2017 at 4:14 AM K O ranjith <[hidden email]> wrote:
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

On Tue, Nov 7, 2017 at 9:37 PM, Sankhesh Jhaveri <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:

Take a look at vtkLegendScaleActor. It uses vtkAxisActor internally.

Hth,
Sankhesh


On Fri, Jun 23, 2017 at 1:55 AM K O ranjith <[hidden email]> 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 | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417

--
Sankhesh Jhaveri
Sr. Research & Development Engineer | Kitware | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417

--
Sankhesh Jhaveri
Sr. Research & Development Engineer | Kitware | (518) 881-4417

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers