chensiqi | 1 Aug 03:35 2009
Picon

all nearest neighbors

 
Hi, VTKers.
 
My problem is:  for every point in pointset A, find the closest point in pointset B. ( B is a subset of A ).
 
Is there any better way than iterating every point in A using vtkPointLocator class?
 
Thanks
Siqi

与任何您希望的人分享您的回忆。 任何您希望的人。
_______________________________________________
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
扬帆 | 1 Aug 06:25 2009

adding VTK_TRIANGLE_STRIP cells to vtkUnstructuredGrid, when I zoom the view, the triangles at some view distant will disapear.why?

Hi,everyone.
    this problem has bothered me a lot.I don't know if this is related to anti-aliasing issues.or other problems ?please give some advice.
   Thanks a lot.
_______________________________________________
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
Gururajan | 1 Aug 08:41 2009
Picon

Read and Writer Dicom Series

Hi
with the reference of the below link. i have got some idea, even now am
not able to view my written .vtk file after reading dicom series. the
bug says there is no data to smooth.

Please any one can help. be low i pasted my code.
Since am trying this in java
    http://www.vtk.org/pipermail/vtkusers/2006-December/088806.html

         vtkDICOMImageReader dicomreader = new vtkDICOMImageReader();

 //dicomreader.SetFileName("/home/gururaj/MANIX/MANIX/CER-CT/ANGIO
CT/IM-0001-0001.dcm");

 dicomreader.SetDirectoryName("/home/gururaj/MANIX/MANIX/CER-CT/AVEC I.V.");
         dicomreader.Update();
         System.out.println("Image Writer wrting file");

       
         vtkImageReader imgreader = new vtkImageReader();
         //imgreader.SetFilePattern("%s-%04d.dcm");
         imgreader.SetInput(dicomreader.GetOutput());
         imgreader.SetDataByteOrderToBigEndian();
         imgreader.Update();

       

         vtkImageWriter writer = new vtkImageWriter();
         writer.SetInput(imgreader.GetOutput());
         System.out.println("Image reader Output " + imgreader.GetOutput());
         writer.SetFilePattern("%s.0%3d");
         writer.Write();

         vtkVolume16Reader v16 = new vtkVolume16Reader();
         v16.SetDataDimensions(256, 256);
         v16.SetDataByteOrderToLittleEndian();
         v16.SetInput(imgreader.GetOutput());
         v16.SetImageRange(1,93);
         v16.SetDataSpacing(1.0,1.0, 2);

         
         vtkImageGaussianSmooth GauSmooth = new vtkImageGaussianSmooth();
         GauSmooth.SetInput(v16.GetOutput());
         System.out.println("Volume 16 Reader output : " + v16.GetOutput());
         GauSmooth.SetDimensionality(3);
         GauSmooth.SetStandardDeviation(0.0, 4.0);

         vtkContourFilter skinExtractor = new vtkContourFilter();
         skinExtractor.SetInput(GauSmooth.GetOutput());
         System.out.println("Gaussian Smooth output : " +
GauSmooth.GetOutput());
         skinExtractor.SetValue(0,500);
         skinExtractor.Update();

         vtkSmoothPolyDataFilter smoother = new vtkSmoothPolyDataFilter();
         smoother.SetInput(skinExtractor.GetOutput());
         System.out.println("Skin Extractor  output : " +
skinExtractor.GetOutput());
         smoother.SetNumberOfIterations(78);

         vtkPolyDataNormals polyNormal = new vtkPolyDataNormals();
         polyNormal.SetInput(smoother.GetOutput());
         System.out.println("Smoother   output : " + smoother.GetOutput());
         polyNormal.SetFeatureAngle(60.0);

         vtkPolyDataWriter polyWriter = new vtkPolyDataWriter();
         polyWriter.SetInput(polyNormal.GetOutput());
         System.out.println("Normals  output : " + smoother.GetOutput());
         polyWriter.SetFileName("/home/gururaj/eclipse
Project/SimpleVTK/SimpleVtk/CardiacCT/Dicom.vtk");
         polyWriter.Write();

        
Thanks
Guru
_______________________________________________
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

扬帆 | 1 Aug 09:11 2009

very narrow and long rectangle drawn with VTK_TRIANGLE_STRIP .when zooming small to make the rectangle seems like a line , it shows and disapears while zooming.why

 
Hi,everyone.
    I want to know what may cause this and how to fix it?
   Thanks a lot.
_______________________________________________
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
Dominik Szczerba | 1 Aug 09:28 2009
Picon

QT_QTCORE_LIBRARY_DEBUG-NOTFOUND

Hi,

I want to build vtk with cmake using QT in debug mode on linux. I have 
tried both installing the system QT debug symbols package (Ubuntu) as 
well as compiling QT myself with (debug-and-release mode), but cmake 
keeps displaying:

QT_QTCORE_LIBRARY_DEBUG-NOTFOUND

My CMAKE_BUILD_TYPE is DEBUG. How can I force the use of QT debug version?

- Dominik

--

-- 
d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
. . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
. . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch

_______________________________________________
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

Dominik Szczerba | 1 Aug 13:01 2009
Picon

Re: [Paraview] qvtk problems with the pipeline

Many thanks for the feedback. Pls see below:

Clinton Stimpson wrote:
> Dominik Szczerba wrote:
>> My pipeline works all right and gets updated on demand properly. I 
>> achieve it by connecting spinboxes/lineedits etc. to functions that 
>> set parameters of my filters before I explicitly hit the final 'apply' 
>> button. The annoying problem is that the pipeline gets executed also 
>> when I interact with the render window (click to rotate etc.). I did 
>> not (intend to) set up such functionality, I want the pipeline to 
>> execute only after an explicit button click (like in paraview). How do 
>> I find out who is triggering the pipeline behind my back?
>>
>> - Dominik
>>
> ParaView queues up the changes, and only applies them to the filters 
> when the apply button is pressed.
> If you're applying them on the filters when spinboxes/lineedits change, 
> and a menu comes and goes over the graphics view, that could trigger an 
> update you might not want.
> 
> How about your apply button gathering the parameters from the widgets on 
> the form and applying them?

That was my original idea and implementation: However, this way the 
WHOLE pipeline ALWAYS gets re-executed. Concrete example pipeline: 
extractVOI->GaussianSmooth. If Apply button gathers the parameters and 
sets them to the filters every time, changing e.g. only smoothing params 
(while keeping the same VOI) still causes both filters to re-execute. 
This should not happen, as VOI should be up to date. The same is true 
for more filters, e.g. Threshold: re-feeding the same parameters and/or 
arrays to process somehow fools the up-to-date'ness of the filter. Am I 
expected to walk around the problem by bookkeeping the changing params 
and the up-to-date'ness myself?

Note that this is different to paraview, where you have only one filter 
per menu entry and can explicitly request changes. Here I have one 
meta-filter, consisting of several atomic ones.

After your remark I feel the original approach was the right one. But 
then how do I only request the update if a REAL CHANGE and not only a 
FORMAL SET of parameters is the case?

regards,
Dominik

> 
> Clint
> 

--

-- 
d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
. . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
. . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch

_______________________________________________
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

Clinton Stimpson | 1 Aug 16:56 2009

Re: [Paraview] qvtk problems with the pipeline

On 08/01/2009 05:01 AM, Dominik Szczerba wrote:
> Many thanks for the feedback. Pls see below:
>
> Clinton Stimpson wrote:
>> Dominik Szczerba wrote:
>>> My pipeline works all right and gets updated on demand properly. I 
>>> achieve it by connecting spinboxes/lineedits etc. to functions that 
>>> set parameters of my filters before I explicitly hit the final 
>>> 'apply' button. The annoying problem is that the pipeline gets 
>>> executed also when I interact with the render window (click to 
>>> rotate etc.). I did not (intend to) set up such functionality, I 
>>> want the pipeline to execute only after an explicit button click 
>>> (like in paraview). How do I find out who is triggering the pipeline 
>>> behind my back?
>>>
>>> - Dominik
>>>
>> ParaView queues up the changes, and only applies them to the filters 
>> when the apply button is pressed.
>> If you're applying them on the filters when spinboxes/lineedits 
>> change, and a menu comes and goes over the graphics view, that could 
>> trigger an update you might not want.
>>
>> How about your apply button gathering the parameters from the widgets 
>> on the form and applying them?
>
> That was my original idea and implementation: However, this way the 
> WHOLE pipeline ALWAYS gets re-executed. Concrete example pipeline: 
> extractVOI->GaussianSmooth. If Apply button gathers the parameters and 
> sets them to the filters every time, changing e.g. only smoothing 
> params (while keeping the same VOI) still causes both filters to 
> re-execute. This should not happen, as VOI should be up to date. The 
> same is true for more filters, e.g. Threshold: re-feeding the same 
> parameters and/or arrays to process somehow fools the up-to-date'ness 
> of the filter. Am I expected to walk around the problem by bookkeeping 
> the changing params and the up-to-date'ness myself?
>
> Note that this is different to paraview, where you have only one 
> filter per menu entry and can explicitly request changes. Here I have 
> one meta-filter, consisting of several atomic ones.
>
> After your remark I feel the original approach was the right one. But 
> then how do I only request the update if a REAL CHANGE and not only a 
> FORMAL SET of parameters is the case?
>

vtkSetMacro checks for changes before calling this->Modified();  But are 
you saying its a problem because not all Set functions check for changes?

To do your own bookkeeping, one idea is to connect to the QWidget's user 
property's notify signal (see QMetaObject::userPropery), and anytime one 
of those fires, you add to a list of widgets that have changed.  Then at 
apply time, just push those values down.

Clint

_______________________________________________
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

Dominik Szczerba | 1 Aug 19:42 2009
Picon

Re: [CMake] QT_QTCORE_LIBRARY_DEBUG-NOTFOUND

Yes indeed, I was confused by Windows where one has separate libs e.g. 
QtCore and QtCored. Still, I do not have any /usr/lib/libQt*debug files 
(I DID install the qt-dbg pacgages) but the symbols are somehow there in 
the debugger backtrace despite debug versions NOTFOUND. It's a quite 
confusing. But many thanks for clarifications!
-- Dominik

Clinton Stimpson wrote:
> On 08/01/2009 01:28 AM, Dominik Szczerba wrote:
>> Hi,
>>
>> I want to build vtk with cmake using QT in debug mode on linux. I have 
>> tried both installing the system QT debug symbols package (Ubuntu) as 
>> well as compiling QT myself with (debug-and-release mode), but cmake 
>> keeps displaying:
>>
>> QT_QTCORE_LIBRARY_DEBUG-NOTFOUND
>>
>> My CMAKE_BUILD_TYPE is DEBUG. How can I force the use of QT debug 
>> version?
>>
>> - Dominik
>>
> 
> Qt typically gives a .debug file for debug symbols.  So that would be a 
> libQtCore.so and libQtCore.so.debug instead of libQtCore.so and 
> libQtCored.so.  Its fine for QT_QTCORE_LIBRARY_DEBUG to be NOTFOUND, if 
> you have a .debug file.  Or if you configured Qt with -debug and it gave 
> you a debug library with the name of a release library, you can ignore 
> that QT_QTCORE_LIBRARY_DEBUG is NOTFOUND.
> 
> Clint
> 
> 

--

-- 
d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
. . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
. . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch

_______________________________________________
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

Dominik Szczerba | 1 Aug 19:52 2009
Picon

Re: [Paraview] qvtk problems with the pipeline

Clinton Stimpson wrote:
> On 08/01/2009 05:01 AM, Dominik Szczerba wrote:
>> Many thanks for the feedback. Pls see below:
>>
>> Clinton Stimpson wrote:
>>> Dominik Szczerba wrote:
>>>> My pipeline works all right and gets updated on demand properly. I 
>>>> achieve it by connecting spinboxes/lineedits etc. to functions that 
>>>> set parameters of my filters before I explicitly hit the final 
>>>> 'apply' button. The annoying problem is that the pipeline gets 
>>>> executed also when I interact with the render window (click to 
>>>> rotate etc.). I did not (intend to) set up such functionality, I 
>>>> want the pipeline to execute only after an explicit button click 
>>>> (like in paraview). How do I find out who is triggering the pipeline 
>>>> behind my back?
>>>>
>>>> - Dominik
>>>>
>>> ParaView queues up the changes, and only applies them to the filters 
>>> when the apply button is pressed.
>>> If you're applying them on the filters when spinboxes/lineedits 
>>> change, and a menu comes and goes over the graphics view, that could 
>>> trigger an update you might not want.
>>>
>>> How about your apply button gathering the parameters from the widgets 
>>> on the form and applying them?
>> That was my original idea and implementation: However, this way the 
>> WHOLE pipeline ALWAYS gets re-executed. Concrete example pipeline: 
>> extractVOI->GaussianSmooth. If Apply button gathers the parameters and 
>> sets them to the filters every time, changing e.g. only smoothing 
>> params (while keeping the same VOI) still causes both filters to 
>> re-execute. This should not happen, as VOI should be up to date. The 
>> same is true for more filters, e.g. Threshold: re-feeding the same 
>> parameters and/or arrays to process somehow fools the up-to-date'ness 
>> of the filter. Am I expected to walk around the problem by bookkeeping 
>> the changing params and the up-to-date'ness myself?
>>
>> Note that this is different to paraview, where you have only one 
>> filter per menu entry and can explicitly request changes. Here I have 
>> one meta-filter, consisting of several atomic ones.
>>
>> After your remark I feel the original approach was the right one. But 
>> then how do I only request the update if a REAL CHANGE and not only a 
>> FORMAL SET of parameters is the case?
>>
> 
> vtkSetMacro checks for changes before calling this->Modified();  But are 
> you saying its a problem because not all Set functions check for changes?

I am saying that (e.g.) setting VOI in vtkExtractVOI or 
InputArrayToProcess in vtkThreshold to the already previously set values 
(no factual change, just re-feed of the old ones) triggers the pipeline 
to re-execute. I do not understand this behavior as I was - as you point 
out - hoping for the set macros to take care of that.

> 
> To do your own bookkeeping, one idea is to connect to the QWidget's user 
> property's notify signal (see QMetaObject::userPropery), and anytime one 
> of those fires, you add to a list of widgets that have changed.  Then at 
> apply time, just push those values down.
> 

A little above my knowledge level but many thanks for the pointers to 
start with!

Overall, many thanks for valuable insights.

-- Dominik

> Clint
> 
> 

--

-- 
d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
. . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
. . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch

_______________________________________________
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

Dominik Szczerba | 1 Aug 20:35 2009
Picon

Re: [CMake] QT_QTCORE_LIBRARY_DEBUG-NOTFOUND

Many thanks, I did not know that... (But then again, how could I?) That 
explains NOTFOUND, if a human user can not find it... But as posted 
before, accepting NOTFOUND with no action like 
-DQT_QTCORE_LIBRARY_DEBUG=/usr/lib/libQtCore.so.4.5.0 I still get the 
debugging symbols in the backtrace. I have no *.debug files mentioned 
before... I do not like this because it leaves me uncertain if I am 
doing the right thing or confusing the debugger (and yes, at the moment 
my backtrace is rather enigmatic). I will probably compile QT myself and 
recompile my VTK build to have a bigger control.
Many thanks for valuable remarks,
Dominik

Pau Garcia i Quiles wrote:
> Hello,
> 
> Check /usr/lib/debug/usr/lib
> 
> On Sat, Aug 1, 2009 at 7:42 PM, Dominik Szczerba<dominik <at> itis.ethz.ch> wrote:
>> Yes indeed, I was confused by Windows where one has separate libs e.g.
>> QtCore and QtCored. Still, I do not have any /usr/lib/libQt*debug files (I
>> DID install the qt-dbg pacgages) but the symbols are somehow there in the
>> debugger backtrace despite debug versions NOTFOUND. It's a quite confusing.
>> But many thanks for clarifications!
>> -- Dominik
>>
>> Clinton Stimpson wrote:
>>> On 08/01/2009 01:28 AM, Dominik Szczerba wrote:
>>>> Hi,
>>>>
>>>> I want to build vtk with cmake using QT in debug mode on linux. I have
>>>> tried both installing the system QT debug symbols package (Ubuntu) as well
>>>> as compiling QT myself with (debug-and-release mode), but cmake keeps
>>>> displaying:
>>>>
>>>> QT_QTCORE_LIBRARY_DEBUG-NOTFOUND
>>>>
>>>> My CMAKE_BUILD_TYPE is DEBUG. How can I force the use of QT debug
>>>> version?
>>>>
>>>> - Dominik
>>>>
>>> Qt typically gives a .debug file for debug symbols.  So that would be a
>>> libQtCore.so and libQtCore.so.debug instead of libQtCore.so and
>>> libQtCored.so.  Its fine for QT_QTCORE_LIBRARY_DEBUG to be NOTFOUND, if you
>>> have a .debug file.  Or if you configured Qt with -debug and it gave you a
>>> debug library with the name of a release library, you can ignore that
>>> QT_QTCORE_LIBRARY_DEBUG is NOTFOUND.
>>>
>>> Clint
>>>
>>>
>>
>> --
>> d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
>> c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
>> . . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
>> . . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch
>>
>> _______________________________________________
>> 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 CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
> 
> 
> 

--

-- 
d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
. . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
. . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch

_______________________________________________
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


Gmane