[vtkusers] vtkusers Digest, Vol 78, Issue 18

Cartik Sharma cartik_sharma at yahoo.com
Wed Oct 13 16:52:59 EDT 2010


Hi:

Please direct me to the link for vtk 5.6 with the Tcl release. I'm trying to create some 
image reslicing tests which might best be executable in Tcl.

Best regards,

Cartik

--- On Tue, 10/12/10, vtkusers-request at vtk.org <vtkusers-request at vtk.org> wrote:

From: vtkusers-request at vtk.org <vtkusers-request at vtk.org>
Subject: vtkusers Digest, Vol 78, Issue 18
To: vtkusers at vtk.org
Date: Tuesday, October 12, 2010, 12:00 PM

Send vtkusers mailing list submissions to
    vtkusers at vtk.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://www.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. Re: saving the window to a file (Bill Chivas)
   2. Re: saving the window to a file (David Doria)
   3. Re: vtkImageData to C array (Michael Jackson)
   4. Re: saving the window to a file (Bill Chivas)
   5. Re: [Insight-users] Error building InsightApplications
      (Ravi Samala)
   6. Re: 3D point cloud nearest neighbor search (G. Allegri)
   7. Re: Question about contour widget (Jonathan Morra)


----------------------------------------------------------------------

Message: 1
Date: Tue, 12 Oct 2010 12:01:51 +0000
From: Bill Chivas <billno123 at hotmail.com>
Subject: Re: [vtkusers] saving the window to a file
To: <daviddoria at gmail.com>
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
Message-ID: <BLU146-W153003C859F9D983BEA191F5540 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"


sorry, i meant 
"For example i have a window 230x250, it goes to 690x750?"

From: billno123 at hotmail.com
To: daviddoria at gmail.com
Date: Tue, 12 Oct 2010 11:59:59 +0000
CC: vtkusers at vtk.org
Subject: Re: [vtkusers] saving the window to a file








Thanks David.
So, when i set 
windowToImageFilter->SetMagnification(3); 
it sets the resolution to 3 times the resolution of the vtk window?
For example i have a window 230x250, it goes to 460x500?

> Date: Tue, 12 Oct 2010 07:38:51 -0400
> From: daviddoria at gmail.com
> To: billno123 at hotmail.com
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] saving the window to a file
> 
> On Tue, Oct 12, 2010 at 6:00 AM, Bill Chivas <billno123 at hotmail.com> wrote:
> > Hello,
> >
> > i want to save the window to a file (e.g. tiff format). I know there is the
> > vtkTIFFWriter but i wanted also to have an option for the resolution of the
> > saved image.
> > Any ideas?
> >
> > Thanks
> 
> I believe you're looking for vtkWindowToImageFilter.
> 
> There is an example here:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot
> 
> Note this line:
>   windowToImageFilter->SetMagnification(3); //set the resolution of
> the output image
> 
> David
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers                           
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101012/79585754/attachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 12 Oct 2010 08:02:50 -0400
From: David Doria <daviddoria at gmail.com>
Subject: Re: [vtkusers] saving the window to a file
To: Bill Chivas <billno123 at hotmail.com>
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
Message-ID:
    <AANLkTimaBN5xPeECo4krwkPAPSkxKJFJFw0KrssFM=M8 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Tue, Oct 12, 2010 at 8:01 AM, Bill Chivas <billno123 at hotmail.com> wrote:
> sorry, i meant
> "For example i have a window 230x250, it goes to 690x750?"

I believe so, but I'm not sure. Please test it out and add a note
describing the behavior to the wiki :)

David


------------------------------

Message: 3
Date: Tue, 12 Oct 2010 08:21:33 -0400
From: Michael Jackson <mike.jackson at bluequartz.net>
Subject: Re: [vtkusers] vtkImageData to C array
To: Jothy <jothybasu at gmail.com>
Cc: VTK Mailing List <vtkusers at vtk.org>
Message-ID: <-3138763548994922783 at unknownmsgid>
Content-Type: text/plain; charset=ISO-8859-1

You can use getscalarpointer(0) which will return a pointer to the
first element of the array. You can then use regular pointer semantics
to process the data.

-----
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       mike.jackson at bluequartz.net
BlueQuartz Software               Dayton, Ohio

On Oct 12, 2010, at 7:21, Jothy <jothybasu at gmail.com> wrote:

> Hi all,
>
> I want to convert a vtkImageData to a C array.
>
> I don't like to use imgData->hgetScalarPointer(i,j,k), because it will be too slow for my purpose.
>
> How to do this?
>
> Any hints?
>
> --
> Research Scholar
> Dept. of Medical Physics
> Clatterbridge Centre for Oncology
> UK
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


------------------------------

Message: 4
Date: Tue, 12 Oct 2010 12:47:03 +0000
From: Bill Chivas <billno123 at hotmail.com>
Subject: Re: [vtkusers] saving the window to a file
To: <daviddoria at gmail.com>
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
Message-ID: <BLU146-W32E7CF294AF69D2792E401F5540 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"


I test it and it works as i had supposed.
I also add a note in wiki in screenshot example (a comment at line "windowToImageFilter->SetMagnification(3);").

http://www.cmake.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot

> Date: Tue, 12 Oct 2010 08:02:50 -0400
> From: daviddoria at gmail.com
> To: billno123 at hotmail.com
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] saving the window to a file
> 
> On Tue, Oct 12, 2010 at 8:01 AM, Bill Chivas <billno123 at hotmail.com> wrote:
> > sorry, i meant
> > "For example i have a window 230x250, it goes to 690x750?"
> 
> I believe so, but I'm not sure. Please test it out and add a note
> describing the behavior to the wiki :)
> 
> David
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
                           
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101012/a1f898d9/attachment-0001.htm>

------------------------------

Message: 5
Date: Tue, 12 Oct 2010 07:36:14 -0600
From: Ravi Samala <rksamala at miners.utep.edu>
Subject: Re: [vtkusers] [Insight-users] Error building
    InsightApplications
To: ITK <insight-users at itk.org>, VTK <vtkusers at vtk.org>
Message-ID: <BLU123-W27BC052C503EBDC11CACDD9E540 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"





I was able to figure it out.

namespace itk in \Code\Common\itkinttypes.h file is causing the problem.

regards,
RS.
From: rksamala at miners.utep.edu
To: insight-users at itk.org; vtkusers at vtk.org
Date: Mon, 11 Oct 2010 22:10:59 -0600
Subject: [Insight-users] Error building InsightApplications














Hello Everyone,

I am trying to build InsightApplications and I keep getting the following error. I am using ITK, ITKApps, VTK (all nightly-master) compiled with CMake 2.8.2 and FLTK 1.1.10.

C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(590) : error C2872: 'uintptr_t' : ambiguous symbol
        could be 'C:\Program Files\Microsoft Visual Studio 8\VC\include\vadefs.h(52) : __w64 unsigned int uintptr_t'
        or 'c:\msysgit\msysgit\git\itk\code\common\itkIntTypes.h(115) : itk::uintptr_t'
        C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(566) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,void *&) const'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>,
            _InIt=std::istreambuf_iterator<char,std::char_traits<char>>
        ]
        C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1367) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
        with
        [
            _Elem=char,
            _InIt=std::istreambuf_iterator<char,std::char_traits<char>>
        ]



Thanks,
RS.
                           

_____________________________________
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.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users                           
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101012/f514c6be/attachment-0001.htm>

------------------------------

Message: 6
Date: Tue, 12 Oct 2010 15:58:03 +0200
From: "G. Allegri" <giohappy at gmail.com>
Subject: Re: [vtkusers] 3D point cloud nearest neighbor search
To: David Doria <daviddoria at gmail.com>
Cc: vtkusers at vtk.org
Message-ID:
    <AANLkTik06aa4ZGiuTmdnPU3LvOM21UrZrtjWXvVzPK8L at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Thanks David, I will give it a try and I'll let you know.

2010/10/12 David Doria <daviddoria at gmail.com>:
> On Tue, Oct 12, 2010 at 4:23 AM, G. Allegri <giohappy at gmail.com> wrote:
>> Hello. I'm new to VTK and this list, so forgive my trivial questions.
>>
>> I'm considering to use VTK to solve a conceptually simple problem, but
>> that require efficient 3D algorithms and data structures. I have a csv
>> file which represents a 3D grid of points (SET1). In this specific
>> case their regularly spaced on the three axes, but the general case
>> can be an irregular point cloud. The dataset is made of a couple of
>> millions of points. I also have another set of 3D points (SET2). I
>> need to set attributes in SET2 "sampling" the NN from SET1.
>>
>> I've chosen VTK having seen the various kd-tree and locator classes,
>> but I wonder what is the most efficient way to achieve my goal, and
>> what data structured is best for this. I'm considering vtkPolyData or
>> vtkUnstructuredGrid. What would you suggest for my datas and problem?
>> Are there efficient classes to read csv input streams to fill my data
>> structures?
>>
>> Thanks a lot,
>> Giovanni
>
> You can modify this to read your csv file into a vtkPolyData:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/InfoVis/ReadDelimitedFile
>
> Then build a vtkKdTreePointLocator to do the NN queries:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/DataStructures/KdTreePointLocator/ClosestPoint
>
> Let us know if you have any trouble once you give it a shot.
>
> David
>


------------------------------

Message: 7
Date: Tue, 12 Oct 2010 08:34:54 -0700
From: Jonathan Morra <jonmorra at gmail.com>
Subject: Re: [vtkusers] Question about contour widget
To: Karthik Krishnan <karthik.krishnan at kitware.com>
Cc: VTK Mailing List <vtkusers at vtk.org>
Message-ID:
    <AANLkTi=BQn6azearpyZqHrnYUaaZZETcd+0oFR8V9Vz0 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Thanks for your help, I replaced the placer as you suggested, and now my
code looks like the following

vtkBoundedPlanePointPlacer placer = new vtkBoundedPlanePointPlacer();
        placer.SetProjectionNormalToZAxis();

 placer.SetProjectionPosition(panel.getImageViewer().GetImageActor().GetCenter()[2]);
        rep.SetPointPlacer(placer);

This is almost right.  The contour now appears on the plane that I drew it
on and the plane above it and that is it.  I just want the contour on the
plane I drew it on.  I tried playing around with placer.SetPixelTolerance()
but that didn't make a difference.

On Tue, Oct 12, 2010 at 2:33 AM, Karthik Krishnan <
karthik.krishnan at kitware.com> wrote:

> On Tue, Oct 12, 2010 at 10:33 AM, Jonathan Morra <jonmorra at gmail.com>wrote:
>
>> I have a vtkImageViewer2 and wish to use vtkContourWidget to draw a
>> contour on the image.  The data I'm loading is a 3D DICOM CT volume.  I have
>> found the following question
>> http://vtk.1045678.n5.nabble.com/vtkContourWidget-with-vtkImageViewer2-td1236295.html and
>> created the following code as a result (in Java)
>>
>>         vtkContourWidget contourWidget = new vtkContourWidget();
>>         contourWidget.SetInteractor(panel.getRenWin().getIren());
>>         contourWidget.FollowCursorOn();
>>
>>         vtkOrientedGlyphContourRepresentation rep = new
>> vtkOrientedGlyphContourRepresentation();
>>         contourWidget.SetRepresentation(rep);
>>
>>         vtkImageActorPointPlacer placer = new vtkImageActorPointPlacer();
>>         placer.SetImageActor(panel.getImageViewer().GetImageActor());
>>         rep.SetPointPlacer(placer);
>>
>
> What this point placer does is to constrain the contour to the plane
> defined by the ImageActor. However, given that the same image actor is used
> for multiple slices, when you change the slice, the position of the image
> actor effectively changes and the contour updates itself to lie on the new
> plane.
>
> What you need is to use a vtkBoundedPlanePointPlacer with the bounding
> planes de-lienating the bounds of the image actor when the contour is
> defined. That way it won't change when you change the slice.
>
> Also to manage visibility of the contour (the contour will be visible for
> all slices in front of the defined slice), you could subclass the contour
> representation, insert a clipper that clips the polydata based on the
> bounding planes, that way, visibility is implicitly managed by the
> representation.
>
> --
> karthik
>
>         contourWidget.EnabledOn();
>>         contourWidget.ProcessEventsOn();
>>
>> When I do this and draw a contour and then scroll through the image planes
>> the same contour appears on every plane.  Ideally I'd like a different
>> contour on every plane.  If I don't use the vtkImageActorPointPlacer then
>> the contour only appears on one plane but it's the same plane regardless of
>> which plane is being viewed, which is also wrong.
>>
>> Any suggestions about how to do this correctly would be greatly
>> appreciated.
>>
>> Thanks
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101012/50438f94/attachment-0001.htm>

------------------------------

_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers


End of vtkusers Digest, Vol 78, Issue 18
****************************************



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101013/48a89ad9/attachment.htm>


More information about the vtkusers mailing list