[vtkusers] vtkusers Digest, Vol 71, Issue 53
hermadi
hermadi at avocet.co.id
Thu Apr 1 05:39:07 EDT 2010
thanks
-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of vtkusers-request at vtk.org
Sent: Tuesday, March 30, 2010 4:51 AM
To: vtkusers at vtk.org
Subject: vtkusers Digest, Vol 71, Issue 53
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: Busted Qt Examples (Scott Johnson)
2. Re: Busted Qt Examples (John Drescher)
3. Re: Busted Qt Examples (Scott Johnson)
4. Re: DCMTK + VTK or ITK (Xiaofeng Z)
5. vtkImageImport (Erik T?rke)
6. Re: vtkImageImport (Jothybasu K Selvaraj)
7. Re: vtkImageImport (Erik T?rke)
8. Rounding error in visualization pipline with a vtkCursor2D
(Xiaofeng Z)
9. Re: Busted Qt Examples (Takuya OSHIMA)
10. Re: Busted Qt Examples (David Doria)
11. Re: 3D-position of vtkImageReslice (Henning Meyer)
12. Re: Busted Qt Examples (John Drescher)
13. Re: Busted Qt Examples (David Doria)
14. Re: Busted Qt Examples (John Drescher)
15. Re: vtkImageImport (David Gobbi)
16. Re: vtkImageImport (Erik T?rke)
17. Re: octree visualization example (Francois Bertel)
18. Re: Qt-Chart vs Chart vs Hybrid-XYPlot (Jeff Baumes)
19. Re: Textured IcicleView & Hardware Selector (Jeff Baumes)
20. FindClosestPointWithinRadius issue in vtkKdTree (Andy Bauer)
21. VTK-5-6 branch created, CVS Unlocked (Dave Partyka)
22. Re: VTK-5-6 branch created, CVS Unlocked (Dave Partyka)
23. Re: vtkImageImport (Erik T?rke)
24. Re: VTK-5-6 branch created, CVS Unlocked (Dave Partyka)
25. Re: VTK-5-6 branch created, CVS Unlocked (Xiaofeng Z)
26. Re: vtkImageImport (David Gobbi)
27. Re: VTKImageActor->SetZSlice (z) fails to update
(Dr. Philip Julian Broser)
28. Re: octree visualization example (David Doria)
29. Re: octree visualization example (Francois Bertel)
----------------------------------------------------------------------
Message: 1
Date: Mon, 29 Mar 2010 11:23:40 -0500
From: "Scott Johnson" <Scott.Johnson at neuwave.com>
Subject: Re: [vtkusers] Busted Qt Examples
To: "David Doria" <daviddoria+vtk at gmail.com>
Cc: vtkusers at vtk.org
Message-ID:
<942932CB2E536546BC756D005EBB08A128A7E8 at NWMSBS01.nwm.local>
Content-Type: text/plain; charset="us-ascii"
Hi Folks,
Thanks for the help. I'm attempting to build this on Windows under
Visual Studio 2008.
It turns out that the ui_SimpleView.h file is being generated, but I had
to add '.' to the search path for include files for it to compile. I'm
not familiar enough with CMake to know how to modify CMakeLists.txt to
modify the search path from there.
Once it compiles, it works like a champ. No complaints about the icon
when the application is run either. That seems to only occur when
loading into Qt Designer.
Thanks again.
-- Scott
From: daviddoria at gmail.com [mailto:daviddoria at gmail.com] On Behalf Of
David Doria
Sent: Monday, March 29, 2010 10:06 AM
Cc: Scott Johnson; vtkusers at vtk.org
Subject: Re: [vtkusers] Busted Qt Examples
On Mon, Mar 29, 2010 at 11:02 AM, Michael Jackson
<mike.jackson at bluequartz.net> wrote:
ui_SimpleView.h should be generated by the CMake base build system of
the example by using the "uic" program. Not sure about the icon.
___________________________________________________________
Mike Jackson www.bluequartz.net
Principal Software Engineer mike.jackson at bluequartz.net
BlueQuartz Software Dayton, Ohio
Mike is correct - that files gets created and put in the bin directory
when the program is compiled.
Scott, are you using the CMakeLists.txt file that is with the example?
http://www.vtk.org/Wiki/VTK/Examples/Qt/SideBySideRenderWindows#CMakeLis
ts.txt
I have this working on my system, so I can try to help with this.
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/f26c6b2f/attachm
ent-0001.htm>
------------------------------
Message: 2
Date: Mon, 29 Mar 2010 12:27:46 -0400
From: John Drescher <drescherjm at gmail.com>
Subject: Re: [vtkusers] Busted Qt Examples
To: Scott Johnson <Scott.Johnson at neuwave.com>
Cc: vtkusers at vtk.org
Message-ID:
<387ee2021003290927p3710e5e4r3f164fe0bef52304 at mail.gmail.com>
Content-Type: text/plain; charset=windows-1252
On Mon, Mar 29, 2010 at 12:23 PM, Scott Johnson
<Scott.Johnson at neuwave.com> wrote:
> Hi Folks,
>
>
>
> Thanks for the help.? I?m attempting to build this on Windows under Visual
> Studio 2008.
>
>
>
> It turns out that the ui_SimpleView.h file is being generated, but I had
to
> add ?.? to the search path for include files for it to compile.? I?m not
> familiar enough with CMake to know how to modify CMakeLists.txt to modify
> the search path from there.
>
>
Hmm. In my copy of the vtk example I have:
# Use the include path and library for Qt that is used by VTK.
INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
I must have had that problem as well..
John
------------------------------
Message: 3
Date: Mon, 29 Mar 2010 11:39:19 -0500
From: "Scott Johnson" <Scott.Johnson at neuwave.com>
Subject: Re: [vtkusers] Busted Qt Examples
To: "John Drescher" <drescherjm at gmail.com>
Cc: vtkusers at vtk.org
Message-ID:
<942932CB2E536546BC756D005EBB08A128A7EA at NWMSBS01.nwm.local>
Content-Type: text/plain; charset="iso-8859-1"
I grabbed my CMakeLists.txt from
http://www.cmake.org/Wiki/VTK/Examples/Qt/SideBySideRenderWindows.
If I make your modification and re-run CMake, everything works out of the
box. Your include statement should be added to the example.
Thanks again.
-- Scott
-----Original Message-----
From: John Drescher [mailto:drescherjm at gmail.com]
Sent: Monday, March 29, 2010 11:28 AM
To: Scott Johnson
Cc: David Doria; vtkusers at vtk.org
Subject: Re: [vtkusers] Busted Qt Examples
On Mon, Mar 29, 2010 at 12:23 PM, Scott Johnson
<Scott.Johnson at neuwave.com> wrote:
> Hi Folks,
>
>
>
> Thanks for the help.? I'm attempting to build this on Windows under Visual
> Studio 2008.
>
>
>
> It turns out that the ui_SimpleView.h file is being generated, but I had
to
> add '.' to the search path for include files for it to compile.? I'm not
> familiar enough with CMake to know how to modify CMakeLists.txt to modify
> the search path from there.
>
>
Hmm. In my copy of the vtk example I have:
# Use the include path and library for Qt that is used by VTK.
INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
I must have had that problem as well..
John
------------------------------
Message: 4
Date: Mon, 29 Mar 2010 12:37:50 -0400
From: Xiaofeng Z <xf10036 at hotmail.com>
Subject: Re: [vtkusers] DCMTK + VTK or ITK
To: <michael.knopke at gmx.de>, VTK <vtkusers at vtk.org>
Message-ID: <COL123-W5436865A4E9F94348F09F8E5200 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"
Michael,
I just checked and you are right! Although I am using statically linked
dcmtk, the run-time library is Multi-Threaded DLL (/MD) as the setting in
VTK.
Somehow I had an impression that /MD cannot be used when building statically
linked library. It is probably something got stuck in my mind from
MFC/VC++6 days.
Thanks!
Xiaofeng Z
From: Michael.Knopke at gmx.de
To: vtkusers at vtk.org
Date: Mon, 29 Mar 2010 17:13:51 +0200
Subject: Re: [vtkusers] DCMTK + VTK or ITK
Hi Xiaofeng Z,
are you sure you are talking about mixing static/dynamic c-runtime
(determined via the compiler setting) and not the libraries itself
(Build_shared_libs)? The latter one is no problem at all.
If you mixed the c-runtime you are probably just lucky:
http://support.microsoft.com/?scid=kb;en-us;140584&x=11&y=9
Regards,
Michael
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850553/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/6673fb67/attachm
ent-0001.htm>
------------------------------
Message: 5
Date: Mon, 29 Mar 2010 18:46:26 +0200
From: Erik T?rke <tuerke at cbs.mpg.de>
Subject: [vtkusers] vtkImageImport
To: vtkusers at vtk.org
Message-ID: <4BB0D962.3010409 at cbs.mpg.de>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Hi!
I am new to vtk.
I am using the vtkImageImport class to view a non vtk object:
importer->SetImportVoidPointer(&myAdapter->m_ImageISIS->voxel<short>(0,0,0,0
));
importer->SetWholeExtent(0,dimensions[0]-1,0,dimensions[1]-1,0,dimensions[2]
-1);
importer->SetDataExtentToWholeExtent();
importer->SetDataScalarTypeToShort();
importer->Update();
viewer->SetInputConnection(importer->GetOutputPort());
viewer->SetZSlice(100);
viewer->Render();
sleep(5);
This works fine. The second thing i want to do is safe the data as a vtk
image and open it with paraview:
vtkImageWriter* writer = vtkImageWriter::New();
writer->SetFileDimensionality(3);
writer->SetInputConnection(importer->GetOutputPort());
writer->SetFileName("test.vtk");
writer->UpdateWholeExtent();
writer->Write();
The file is safed, but i can not open it with paraview. There is always
a message: "a reader for ... could not be found. please choose one".
And when i choose vtk image reader the message:
"
index 0: not well-formed (invalid token)
ERROR: In /build/buildd/paraview-3.4.0/VTK/IO/vtkXMLReader.cxx, line 360
vtkXMLImageDataReader (0x24b7720): Error parsing input file.
ReadXMLInformation aborting.
ERROR: In /build/buildd/paraview-3.4.0/VTK/Filtering/vtkExecutive.cxx,
line 757
vtkCompositeDataPipeline (0x24c2030): Algorithm
vtkXMLImageDataReader(0x24b7720) returned failure for request:
vtkInformation (0x24dc890)
Debug: Off
Modified Time: 79214
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0"
appears.
The third thing i want to do is store the data to a vtkImageData object.
Is there any possibility to directly forward the vtkImageImport (or
pointer of the first element of the data array) to the vtkImageData, so
i do not have to do it voxel by voxel? Because this needs a lot of time
for big data.
Thanks for your help!
cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/59c42d21/attachm
ent-0001.htm>
------------------------------
Message: 6
Date: Mon, 29 Mar 2010 18:01:26 +0100
From: Jothybasu K Selvaraj <jothybasu at gmail.com>
Subject: Re: [vtkusers] vtkImageImport
To: Erik T?rke <tuerke at cbs.mpg.de>
Cc: vtkusers at vtk.org
Message-ID:
<1dd3c8b21003291001p6b4093a0n1b02ac47f5447d71 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
It seems like paraview is expecting vtkXMLImageData, so you are getting
vtkXMLReader related error.Try using vtkXMLImageDataWriter and
vtkXMLImageDataReader.
Jothy
On Mon, Mar 29, 2010 at 5:46 PM, Erik T?rke <tuerke at cbs.mpg.de> wrote:
> Hi!
>
> I am new to vtk.
>
> I am using the vtkImageImport class to view a non vtk object:
>
>
>
importer->SetImportVoidPointer(&myAdapter->m_ImageISIS->voxel<short>(0,0,0,0
));
>
>
importer->SetWholeExtent(0,dimensions[0]-1,0,dimensions[1]-1,0,dimensions[2]
-1);
> importer->SetDataExtentToWholeExtent();
> importer->SetDataScalarTypeToShort();
> importer->Update();
> viewer->SetInputConnection(importer->GetOutputPort());
> viewer->SetZSlice(100);
> viewer->Render();
> sleep(5);
>
> This works fine. The second thing i want to do is safe the data as a vtk
> image and open it with paraview:
>
> vtkImageWriter* writer = vtkImageWriter::New();
> writer->SetFileDimensionality(3);
> writer->SetInputConnection(importer->GetOutputPort());
> writer->SetFileName("test.vtk");
> writer->UpdateWholeExtent();
> writer->Write();
>
> The file is safed, but i can not open it with paraview. There is always a
> message: "a reader for ... could not be found. please choose one".
> And when i choose vtk image reader the message:
> "
>
> index 0: not well-formed (invalid token)
>
> ERROR: In /build/buildd/paraview-3.4.0/VTK/IO/vtkXMLReader.cxx, line 360
>
> vtkXMLImageDataReader (0x24b7720): Error parsing input file.
> ReadXMLInformation aborting.
>
> ERROR: In /build/buildd/paraview-3.4.0/VTK/Filtering/vtkExecutive.cxx,
> line 757
>
> vtkCompositeDataPipeline (0x24c2030): Algorithm
> vtkXMLImageDataReader(0x24b7720) returned failure for request:
> vtkInformation (0x24dc890)
>
> Debug: Off
>
> Modified Time: 79214
>
> Reference Count: 1
>
> Registered Events: (none)
>
> Request: REQUEST_INFORMATION
>
> ALGORITHM_AFTER_FORWARD: 1
>
> FORWARD_DIRECTION: 0"
>
>
>
> appears.
>
> The third thing i want to do is store the data to a vtkImageData object.
> Is there any possibility to directly forward the vtkImageImport (or
pointer
> of the first element of the data array) to the vtkImageData, so i do not
> have to do it voxel by voxel? Because this needs a lot of time for big
data.
>
> Thanks for your help!
>
> cheers
>
>
> _______________________________________________
> 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/20100329/b7961c72/attachm
ent-0001.htm>
------------------------------
Message: 7
Date: Mon, 29 Mar 2010 19:18:56 +0200
From: Erik T?rke <tuerke at cbs.mpg.de>
Subject: Re: [vtkusers] vtkImageImport
To: vtkusers at vtk.org
Message-ID: <4BB0E100.1060508 at cbs.mpg.de>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
On 03/29/2010 07:01 PM, Jothybasu K Selvaraj wrote:
> It seems like paraview is expecting vtkXMLImageData, so you are
> getting vtkXMLReader related error.Try using vtkXMLImageDataWriter and
> vtkXMLImageDataReader.
>
> Jothy
>
> On Mon, Mar 29, 2010 at 5:46 PM, Erik T?rke <tuerke at cbs.mpg.de
> <mailto:tuerke at cbs.mpg.de>> wrote:
>
> Hi!
>
> I am new to vtk.
>
> I am using the vtkImageImport class to view a non vtk object:
>
>
importer->SetImportVoidPointer(&myAdapter->m_ImageISIS->voxel<short>(0,0,0,0
));
>
importer->SetWholeExtent(0,dimensions[0]-1,0,dimensions[1]-1,0,dimensions[2]
-1);
> importer->SetDataExtentToWholeExtent();
> importer->SetDataScalarTypeToShort();
> importer->Update();
> viewer->SetInputConnection(importer->GetOutputPort());
> viewer->SetZSlice(100);
> viewer->Render();
> sleep(5);
>
> This works fine. The second thing i want to do is safe the data as
> a vtk image and open it with paraview:
>
> vtkImageWriter* writer = vtkImageWriter::New();
> writer->SetFileDimensionality(3);
> writer->SetInputConnection(importer->GetOutputPort());
> writer->SetFileName("test.vtk");
> writer->UpdateWholeExtent();
> writer->Write();
>
> The file is safed, but i can not open it with paraview. There is
> always a message: "a reader for ... could not be found. please
> choose one".
> And when i choose vtk image reader the message:
> "
>
> index 0: not well-formed (invalid token)
>
> ERROR: In /build/buildd/paraview-3.4.0/VTK/IO/vtkXMLReader.cxx,
> line 360
>
> vtkXMLImageDataReader (0x24b7720): Error parsing input file.
> ReadXMLInformation aborting.
>
> ERROR: In
> /build/buildd/paraview-3.4.0/VTK/Filtering/vtkExecutive.cxx, line 757
>
> vtkCompositeDataPipeline (0x24c2030): Algorithm
> vtkXMLImageDataReader(0x24b7720) returned failure for request:
> vtkInformation (0x24dc890)
>
> Debug: Off
>
> Modified Time: 79214
>
> Reference Count: 1
>
> Registered Events: (none)
>
> Request: REQUEST_INFORMATION
>
> ALGORITHM_AFTER_FORWARD: 1
>
> FORWARD_DIRECTION: 0"
>
>
>
> appears.
>
> The third thing i want to do is store the data to a vtkImageData
> object.
> Is there any possibility to directly forward the vtkImageImport
> (or pointer of the first element of the data array) to the
> vtkImageData, so i do not have to do it voxel by voxel? Because
> this needs a lot of time for big data.
>
> Thanks for your help!
>
> cheers
>
>
> _______________________________________________
> Powered by www.kitware.com <http://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
>
>
Ahh very thanks....visualization is working now (at least slice-wise). I
guess 3d rendering is a bit more complicated.
So the problem which remains is the storage in a vtkImageData object.
My approach is:
vtkImage->SetDimensions(dimensions[0],
dimensions[1],
dimensions[2]);
vtkImage->SetWholeExtent(0,dimensions[0]-1,0,dimensions[1]-1,0,dimensions[2]
-1);
vtkImage->SetSpacing(1,1,1);
vtkImage->SetNumberOfScalarComponents(1);
vtkImage->SetOrigin(0,0,0);
vtkImage->AllocateScalars();
short* scalarPtr = static_cast<short*>(vtkImage->GetScalarPointer());
scalarPtr = &myAdapter->m_ImageISIS->voxel<short>(0,0,0,0);
vtkImage->Update();
But if i hand the vtkImage to the viewer by:
viewer->SetInput(vtkImage);
the shown image is black :-(
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/2ef25e10/attachm
ent-0001.htm>
------------------------------
Message: 8
Date: Mon, 29 Mar 2010 13:16:15 -0400
From: Xiaofeng Z <xf10036 at hotmail.com>
Subject: [vtkusers] Rounding error in visualization pipline with a
vtkCursor2D
To: VTK <vtkusers at vtk.org>
Message-ID: <COL123-W538427EDAC68377DBF3A30E5200 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"
Hello VTK users,
I'm using a visualization pipeline as the following:
vtkImageData->vtkImageReslice->...->vtkImageActor
for a multi-planar rendering of CT image and use vtkCursor2D to display the
focus point by first converting the display coordinate to world coordinate
in vtkImageData:
vtkRenderer& rndr =
*interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer();
rndr.SetDisplayPoint(currPos[0], currPos[1], 0);
rndr.DisplayToWorld();
double point[4];
rndr.GetWorldPoint(point);
// the value in the third component is fake, why???
//point[2] = 0.0;
// next, convert back to the original vtkImageData coordinate system
vtkImageReslice* reslice = ImageReslice;
reslice->GetOutput()->UpdateInformation();
vtkImageData& slice = *reslice->GetOutput();
vtkMatrix4x4 *matrix = reslice->GetResliceAxes();
double center[4];
matrix->MultiplyPoint(point, center);
Then convert it back screen coordinate to vtkCursor2D (this is neccessary to
synchronize the multiple views). In the following, "center" is the world
coordinate based on vtkImageData.
vtkMatrix4x4* invert = vtkMatrix4x4::New();
vtkMatrix4x4::Invert(&xform, invert);
double world[4];
invert->MultiplyPoint(center, world);
vtkRendererCollection* rc = renWin->GetRenderers();
assert(rc && rc->GetNumberOfItems() == 1);
vtkRenderer& rndr = *rc->GetFirstRenderer();
rndr.SetWorldPoint(world);
rndr.WorldToDisplay();
rndr.GetDisplayPoint(display);
vtkCursor2D& cursor = *callback->GetCursor2D();
int* size = renWin->GetSize();
cursor.SetModelBounds(1, size[0], 1, size[1], 0, 0);
cursor.SetFocalPoint(display);
The problems is the Cursor2D so placed is slightly off from where the mouse
is clicked, towards the center of the display. Is it caused by rounding
error somewhere? Does anyone know of a fix?
Thanks!
Xiaofeng Z
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:W
L:en-US:WM_HMP:032010_3
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/17bead7d/attachm
ent-0001.htm>
------------------------------
Message: 9
Date: Tue, 30 Mar 2010 00:57:53 +0900 (?? (???))
From: Takuya OSHIMA <oshima at eng.niigata-u.ac.jp>
Subject: Re: [vtkusers] Busted Qt Examples
To: vtkusers at vtk.org
Message-ID: <20100330.005753.76241646.oshima at eng.niigata-u.ac.jp>
Content-Type: Text/Plain; charset=utf-8
Hi Scott,
I once had the ui_*.h not found problem as well regarding the Qt
examples on the wiki under Ubuntu 9.10, CMake 2.8, VTK 5.4.2, if I
remember correctly. I somehow needed to add
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
to CMakeFiles.txt. Not sure about the missing icon though.
Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
From: "Scott Johnson" <Scott.Johnson at neuwave.com>
Subject: [vtkusers] Busted Qt Examples
Date: Mon, 29 Mar 2010 10:00:41 -0500
> Hi Folks,
>
> I was looking at using Qt to build a UI which has 3 resliced displays
(Axial,
> Coronal, and Sagittal), and a render display. I grabbed the
> SideBySideRenderWindows example, but can?t get it to build. It?s missing
the
> ui_SimpleView.h file. If I load SimpleView.ui into Qt Designer, it also
calls
> out a missing icon file.
>
> Any pointers as to where to find those files?
>
> Thanks
>
> -- Scott
>
------------------------------
Message: 10
Date: Mon, 29 Mar 2010 13:53:16 -0400
From: David Doria <daviddoria+vtk at gmail.com>
Subject: Re: [vtkusers] Busted Qt Examples
Cc: vtkusers at vtk.org
Message-ID:
<c19fcadc1003291053s12e91763te63895bd4428af4e at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
2010/3/29 Takuya OSHIMA <oshima at eng.niigata-u.ac.jp>
> Hi Scott,
>
> I once had the ui_*.h not found problem as well regarding the Qt
> examples on the wiki under Ubuntu 9.10, CMake 2.8, VTK 5.4.2, if I
> remember correctly. I somehow needed to add
>
> INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
>
> to CMakeFiles.txt. Not sure about the missing icon though.
>
> Takuya OSHIMA, Ph.D.
>
>
All,
When you find something missing in the examples, please add it! Or at least
bring it to our attention! The whole point of the examples is so that things
like this do not have be figured out repeatedly.
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/0e21e1fe/attachm
ent-0001.htm>
------------------------------
Message: 11
Date: Mon, 29 Mar 2010 13:53:27 -0400
From: Henning Meyer <tutmann at gmail.com>
Subject: Re: [vtkusers] 3D-position of vtkImageReslice
To: Xiaofeng Z <xf10036 at hotmail.com>
Cc: VTK <vtkusers at vtk.org>
Message-ID:
<e8f400181003291053q4ce7c094te45347144c4e017d at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hello,
another thing regarding this is bugging me:
When setting a large zoom factor by vtkImageReslice::SetResliceAxes -
the OutputExtent is not adjusted correctly - so a way to large image
is displayed (basically the whole image - with a huge size). What
would be the proper way to adjust the OutputExtent? Could this be seen
as a bug in vtkImageResclice?
Henning
2010/3/25 Xiaofeng Z <xf10036 at hotmail.com>:
> It took me a day to figure out:
>
> // first convert from display to world in the resliced coordinate
> vtkRenderer& rndr =
> *interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer();
> rndr.SetDisplayPoint(currPos[0], currPos[1], 0);
> rndr.DisplayToWorld();
> double point[4];
> rndr.GetWorldPoint(point);
> // the value in the third component is fake, why???
> point[2] = 0.0;
>
> // next, convert back to the original vtkImageData coordinate system
> vtkImageReslice* reslice = ImageReslice;
> reslice->GetOutput()->UpdateInformation();
> vtkImageData& slice = *reslice->GetOutput();
> vtkMatrix4x4 *matrix = reslice->GetResliceAxes();
> double center[4];
> matrix->MultiplyPoint(point, center);
>
>
> Hope this works!
>
> Xiaofeng Zhao
>
>
>
>> Date: Wed, 24 Mar 2010 16:09:57 -0400
>> From: tutmann at gmail.com
>> To: vtkusers at vtk.org
>> Subject: [vtkusers] 3D-position of vtkImageReslice
>>
>> Hello,
>>
>> I'm building an application based on
ImageProcessing/Cxx/ImageSlicing.cxx.
>> Currently I'm on my way of writing my own interactor style in order to
>> have more flexible interaction freedom.
>>
>> Rotation, windowing and zoom works fine - but now I want to move my
>> Volume by dragging the mouse. The movement should be in sync with the
>> mouse motion.
>> Therefore I'd like to find out the real 3D-Position (in the volume) of
>> the EventPosition and the LastEventPosition.
>> But I don't know how to do that. The Display chain is like:
>>
>> vtkImageData -> vtkImageReslice -> vtkImageMapToColors ->
>> vtkImageActor -> vtkRenderer -> vtkViewPort
>>
>>
>> How can I find out the amount of translation that has to be applied to
>> the ResliceAxes-Matrix? (I already have the right direction - am just
>> missing the scaling value of the translation).
>>
>>
>> Thank you for your help!
>>
>> Henning
>> _______________________________________________
>> 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
>
> ________________________________
> Hotmail is redefining busy with tools for the New Busy. Get more from your
> inbox. Sign up now.
------------------------------
Message: 12
Date: Mon, 29 Mar 2010 14:01:27 -0400
From: John Drescher <drescherjm at gmail.com>
Subject: Re: [vtkusers] Busted Qt Examples
To: David Doria <daviddoria+vtk at gmail.com>, VTK <vtkusers at vtk.org>
Message-ID:
<387ee2021003291101y3390e129q27930465c2b1c7af at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
> All,
> When you find something missing in the examples, please add it! Or at
least
> bring it to our attention! The whole point of the examples is so that
things
> like this do not have be figured out repeatedly.
> Thanks,
>
Okay, will try in the future. Normally, should we try to contact the
original author of the example first? I always worry about changing
someone else's work without them knowing.
John
------------------------------
Message: 13
Date: Mon, 29 Mar 2010 14:03:42 -0400
From: David Doria <daviddoria+vtk at gmail.com>
Subject: Re: [vtkusers] Busted Qt Examples
To: John Drescher <drescherjm at gmail.com>
Cc: VTK <vtkusers at vtk.org>
Message-ID:
<c19fcadc1003291103m61ffcf7fu6f8427d696e5784 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On Mon, Mar 29, 2010 at 2:01 PM, John Drescher <drescherjm at gmail.com> wrote:
> > All,
> > When you find something missing in the examples, please add it! Or at
> least
> > bring it to our attention! The whole point of the examples is so that
> things
> > like this do not have be figured out repeatedly.
> > Thanks,
> >
> Okay, will try in the future. Normally, should we try to contact the
> original author of the example first? I always worry about changing
> someone else's work without them knowing.
>
> John
>
I'd say if something is definitely wrong, then go ahead and change it. If it
is an opinion-based thing ("I think the background should be blue instead of
black") I'd say it'd be nice to have a discussion with the author. I always
click "watch" at the top of the examples I write - the wiki then informs me
via email when someone has edited the page. I'd definitely recommend
everyone do this when they create or edit pages.
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/f9122c97/attachm
ent-0001.htm>
------------------------------
Message: 14
Date: Mon, 29 Mar 2010 14:15:03 -0400
From: John Drescher <drescherjm at gmail.com>
Subject: Re: [vtkusers] Busted Qt Examples
To: David Doria <daviddoria+vtk at gmail.com>
Cc: vtkusers at vtk.org
Message-ID:
<387ee2021003291115x3bda8ae5p329fec0732fd182f at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
> All,
> When you find something missing in the examples, please add it! Or at
least
> bring it to our attention! The whole point of the examples is so that
things
> like this do not have be figured out repeatedly.
> Thanks,
>
BTW, I just updated the code for this example.
John
------------------------------
Message: 15
Date: Mon, 29 Mar 2010 11:52:44 -0600
From: David Gobbi <david.gobbi at gmail.com>
Subject: Re: [vtkusers] vtkImageImport
To: Erik T?rke <tuerke at cbs.mpg.de>
Cc: vtkusers at vtk.org
Message-ID:
<48a17b781003291052m4ed41180ta9945e875fd4ab5c at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Erik,
Can't you just do viewer->SetInput(importer->GetOutput ())? You
shouldn't have to do anything directly with the image data. Once the
importer has updated, the image data should directly use the memory at
the void pointer that you provided. Nothing else should be necessary.
David
On Mon, Mar 29, 2010 at 11:18 AM, Erik T?rke <tuerke at cbs.mpg.de> wrote:
>
> Ahh very thanks....visualization is working now (at least slice-wise). I
> guess 3d rendering is a bit more complicated.
>
> So the problem which remains is the storage in a vtkImageData object.
> My approach is:
>
> vtkImage->SetDimensions(dimensions[0],
> ??? ??? ??? ??? dimensions[1],
> ??? ??? ??? ??? dimensions[2]);
>
vtkImage->SetWholeExtent(0,dimensions[0]-1,0,dimensions[1]-1,0,dimensions[2]
-1);
>
> vtkImage->SetSpacing(1,1,1);
> vtkImage->SetNumberOfScalarComponents(1);
> vtkImage->SetOrigin(0,0,0);
> vtkImage->AllocateScalars();
> short* scalarPtr = static_cast<short*>(vtkImage->GetScalarPointer());
> scalarPtr = &myAdapter->m_ImageISIS->voxel<short>(0,0,0,0);
> vtkImage->Update();
>
> But if i hand the vtkImage to the viewer by:
>
> viewer->SetInput(vtkImage);
>
> the shown image is black :-(
------------------------------
Message: 16
Date: Mon, 29 Mar 2010 20:26:27 +0200
From: Erik T?rke <tuerke at cbs.mpg.de>
Subject: Re: [vtkusers] vtkImageImport
To: vtkusers at vtk.org
Message-ID: <4BB0F0D3.7040206 at cbs.mpg.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 03/29/2010 07:52 PM, David Gobbi wrote:
> Hi Erik,
>
> Can't you just do viewer->SetInput(importer->GetOutput ())? You
> shouldn't have to do anything directly with the image data. Once the
> importer has updated, the image data should directly use the memory at
> the void pointer that you provided. Nothing else should be necessary.
>
> David
>
>
> On Mon, Mar 29, 2010 at 11:18 AM, Erik T?rke<tuerke at cbs.mpg.de> wrote:
>
>> Ahh very thanks....visualization is working now (at least slice-wise). I
>> guess 3d rendering is a bit more complicated.
>>
>> So the problem which remains is the storage in a vtkImageData object.
>> My approach is:
>>
>> vtkImage->SetDimensions(dimensions[0],
>> dimensions[1],
>> dimensions[2]);
>>
vtkImage->SetWholeExtent(0,dimensions[0]-1,0,dimensions[1]-1,0,dimensions[2]
-1);
>>
>> vtkImage->SetSpacing(1,1,1);
>> vtkImage->SetNumberOfScalarComponents(1);
>> vtkImage->SetOrigin(0,0,0);
>> vtkImage->AllocateScalars();
>> short* scalarPtr = static_cast<short*>(vtkImage->GetScalarPointer());
>> scalarPtr =&myAdapter->m_ImageISIS->voxel<short>(0,0,0,0);
>> vtkImage->Update();
>>
>> But if i hand the vtkImage to the viewer by:
>>
>> viewer->SetInput(vtkImage);
>>
>> the shown image is black :-(
>>
Hi!
Well, this should be part of an adapter...so the user should get a list
of pointers to vtkImageData objects (i return a list since the adapter
also gets 4d data as input).
But it seems, this is not possible, so i have to return a list of
pointers to vtkImageImport objects, what imho is a little odd for the
user of the adapter.
cheers
------------------------------
Message: 17
Date: Mon, 29 Mar 2010 14:40:27 -0400
From: Francois Bertel <francois.bertel at kitware.com>
Subject: Re: [vtkusers] octree visualization example
To: vtkusers at vtk.org
Message-ID:
<d9819a911003291140u3bedb102y2b6d4a259159889e at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hello,
vtkHyperOctree is the class to represent a dataset as an octree.
point/cell Locators are just spatial structure to speed-up search but
there are not made to store datasets.
For example, see VTK/Graphics/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx
The source vtkHyperOctreeSampleFunction is used to create a
vtkHyperOctree dataset from a sphere implicit function.
vtkHyperOctreeSampleFunction is then plugged to a
vtkHyperOctreeSurfaceFilter to display the outer bounding box of the
octree.
ref: http://www.vtk.org/doc/nightly/html/classvtkHyperOctree.html
The other filters or source related to HyperOctree datasets are:
* vtkHyperOctreeFractalSource
* vtkHyperOctreeToUniformGridFilter
* vtkClipHyperOctree
* vtkHyperOctreeCutter
* vtkHyperOctreeDualGridContourFilter
* vtkHyperOctreeLimiter
* vtkHyperOctreeDepth
* vtkXMLHyperOctreeWriter
* vtkXMLHyperOctreeReader
Regards.
On Sun, Mar 28, 2010 at 2:03 PM, Anders Wallin
<anders.e.e.wallin at gmail.com> wrote:
> Hi group, David,
>
> Here's the kind of thing I want to do:
> http://www.youtube.com/watch?v=38LdfiMTVw0
>
> here I have created my own octree data-structure, and "by hand" I am
> drawing each of the lines for each of the cubes with a vtkLineSource.
> This becomes quite slow when there are 10 000 or more cubes(80 000
> lines!).
> I was wondering if there already are objects in VTK for doing this
> faster/better?
> At some point I am going to be interested only in the surface of my
> object, i.e. the border between the red cubes and the grey ones in the
> video. I know there are graph-algorithms for extracting these out
> there, but are there any in VTK?
>
> thanks,
> Anders
>
>
>>> Hi all,
>>> I want to represent solid (complicated) objects with an octree (which
>>> can be refined to the desired level).
>> Anders,
>> The vtkCellLocator and vtkPointLocator classes are the VTK octrees.
>> Here is an example of how to visualize it:
>> http://www.vtk.org/Wiki/VTK/Examples/PointLocatorVisualization
>> Thanks,
>>
>> 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
>
--
Fran?ois Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA
------------------------------
Message: 18
Date: Mon, 29 Mar 2010 15:01:57 -0400
From: Jeff Baumes <jeff.baumes at kitware.com>
Subject: Re: [vtkusers] Qt-Chart vs Chart vs Hybrid-XYPlot
To: skific <skific at riteh.hr>
Cc: vtkusers at vtk.org
Message-ID:
<2137e33e1003291201jfbb2c65g50b87275457af013 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Excellent question. The best I can do is explain how used each is,
which will give you an idea of how they may be extended and supported
in the future.
The charts in GUISupport\Qt\Charts were being used by the ParaView
application up until very recently, when it switched to the new charts
being built in VTK\Chart. Don't expect to see much in the way of fixes
in the former (and they may be removed entirely in the near future),
but you should see lots of activity in the latter in the coming years.
The chart classes in Hybrid predate anything else, and are used
heavily in at least a few applications, especially ones with
dependencies to older versions of VTK. They are simpler, but may not
have as many features. I'd like to see these migrated to VTK\Chart at
some point, but they have more likelihood of sticking around for a
while.
Hope that gives you some sense of the current state of things.
Jeff
On Mon, Mar 29, 2010 at 3:38 AM, skific <skific at riteh.hr> wrote:
> Hi,
> I'm new to VTK, and while browsing the docs, I was wondering why three 2D
> plotting classes(modules) exist within VTK?
> What is their purpose? Will all three of them be maintained in the future?
> best regards,
> s
>
>
>
> _______________________________________________
> 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: 19
Date: Mon, 29 Mar 2010 15:03:50 -0400
From: Jeff Baumes <jeff.baumes at kitware.com>
Subject: Re: [vtkusers] Textured IcicleView & Hardware Selector
To: "Eric E. Monson" <emonson at cs.duke.edu>
Cc: VTK Mailing List <vtkusers at vtk.org>
Message-ID:
<2137e33e1003291203i2939417docd7453693f8f413c at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
This sounds like a bug in the hardware selector. Can you create a bug
report with a simple test case attached to reproduce?
Thanks,
Jeff
On Mon, Mar 29, 2010 at 9:44 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
> Hello,
>
> Last week I worked up a modified version of the Icicle View which displays
a texture image over the polygons. I thought I was doing something wrong
because selections would sometimes highlight the correct tree elements, and
sometimes not, in a seemingly random way, and depending on the texture image
I used.
>
> After a week of bashing my head against it, I finally figured out that
since the vtkRenderView classes use the hardware selector I was getting
unreliable results when the image I was using as a texture was too dark. As
long as I have at least a small band of white all around the perimeter of my
image the selector returns the correct cell IDs, and if not, then I get
unpredictable results.
>
> Is this the expected behavior? The doxygen for vtkHardwareSelector
mentions invalid results when using anti-aliasing, but should it also
mention potential problems with textured PolyData? Or, is there something I
could do to get reliable results with textured polydata? I'm too ignorant of
the OpenGL inner workings to understand why this is happening or how to get
around it.
>
> Thanks for the help,
> -Eric
>
> ------------------------------------------------------
> Eric E Monson
> Duke Visualization Technology Group
>
>
> _______________________________________________
> 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: 20
Date: Mon, 29 Mar 2010 15:07:44 -0400
From: Andy Bauer <andy.bauer at kitware.com>
Subject: [vtkusers] FindClosestPointWithinRadius issue in vtkKdTree
To: vtkusers at vtk.org, xabivtk at gmail.com
Message-ID:
<c9010c7d1003291207x79487f08qf8f0543c781008bf at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Thanks for the bug report. I just fixed it and it should go into the new
vtk release.
Andy
>
> Message: 1
> Date: Thu, 25 Mar 2010 14:44:44 +0100
> From: xabi riobe <xabivtk at gmail.com>
> Subject: [vtkusers] FindClosestPointWithinRadius issue in vtkKdTree
> To: vtkusers at vtk.org
> Message-ID:
> <b38cd42e1003250644x1a70b70bm65234f02d22ef219 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I was trying to use vtkKdTreePointLocator to find closest points but from
> the results i obtain i'm wondering wheather there is an issue with the
> method FindClosestPointWithinRadius, because sometimes it returns some
> points with a distance bigger than the radius.
>
> This method calls vtkKdTree::FindClosestPointWithinRadius which calls
> vtkKdTree::FindClosestPointInSphere, but here the point returned can be
out
> of the sphere.
> I think there must be an additional test in one of these two methods to
> compare the distance and the given radius.
>
> here is a program test, with a comparison with vtkPointLocator that works
> well.
>
> PS: i also want to bring back this problem:
>
>
http://old.nabble.com/vtkCellLocator-precision-issue-td27453637.html#a274536
37
> which can maybe solve this one
>
>
http://old.nabble.com/vtkCell::IntersectWithLine-issues-td18225442.html#a182
34362
>
>
> #include <vtk/vtkActor.h>
> #include <vtk/vtkCleanPolyData.h>
> #include <vtk/vtkCubeSource.h>
> #include <vtk/vtkPolyData.h>
> #include <vtk/vtkPolyDataMapper.h>
> #include <vtk/vtkProperty.h>
> #include <vtk/vtkRenderer.h>
> #include <vtk/vtkRenderWindow.h>
> #include <vtk/vtkRenderWindowInteractor.h>
> #include <vtk/vtkSmartPointer.h>
>
> #define MY_SP(class, variable)\
> vtkSmartPointer<class> variable = vtkSmartPointer<class>::New();
>
> const double cst_dRadius = 1.2;
>
> #include <vtk/vtkKdTreePointLocator.h>
> #include <vtk/vtkPointLocator.h>
>
> bool ComputePointDistances(vtkKdTreePointLocator *locator, vtkPolyData
*in)
> {
> int num = in->GetNumberOfPoints();
> cout << "number of input points : " << num << endl;
> vtkPoints *pPoints = in->GetPoints();
> double pt[3];
> int cpt = 0;
> double dDist2 = 0;
>
> int bad = 0;
> int id = -1;
> for(int i=0; i<num; ++i)
> {
> pPoints->GetPoint(i, pt);
> id = locator->FindClosestPointWithinRadius(cst_dRadius, pt, dDist2);
> if(-1 != id)
> {
> if(sqrt(dDist2) > cst_dRadius)
> ++bad;
> ++cpt;
> }
> }
> cout << "should not be tested : " << bad << endl;
> cout << "number of distances computed : " << cpt << endl;
>
> return true;
> }
> bool ComputePointDistances(vtkPointLocator *locator, vtkPolyData *in)
> {
> int num = in->GetNumberOfPoints();
> cout << "number of input points : " << num << endl;
> vtkPoints *pPoints = in->GetPoints();
> double pt[3];
> int cpt = 0;
> double dDist2 = 0;
>
> int bad = 0;
> int id = -1;
> for(int i=0; i<num; ++i)
> {
> pPoints->GetPoint(i, pt);
> id = locator->FindClosestPointWithinRadius(cst_dRadius, pt, dDist2);
> if(-1 != id)
> {
> if(sqrt(dDist2) > cst_dRadius)
> ++bad;
> ++cpt;
> }
> }
> cout << "should not be tested : " << bad << endl;
> cout << "number of distances computed : " << cpt << endl;
>
> return true;
> }
>
> int main(int argc, char* argv[])
> {
> /////////////////////////////////////////////////////////
> MY_SP(vtkRenderer, ren1);
> ren1->SetBackground(0.2, 0.2, 0.2);
> MY_SP(vtkRenderWindow, renWin);
> renWin->SetSize( 512, 512 );
> renWin->AddRenderer(ren1);
> MY_SP(vtkRenderWindowInteractor, iren);
> iren->SetRenderWindow(renWin);
>
> /////////////////////////////////////////////////////////
> MY_SP(vtkCubeSource, src);
> src->SetBounds(-1,1,-1,1,-1,1);
> src->Update();
>
> MY_SP(vtkCleanPolyData, clean);
> clean->SetInputConnection(src->GetOutputPort());
> clean->Update();
> vtkPolyData *cube = clean->GetOutput();
>
> MY_SP(vtkPolyDataMapper, Map);
> Map->SetInput(cube);
>
> MY_SP(vtkActor, act);
> act->SetMapper(Map);
> act->GetProperty()->SetInterpolationToFlat();
> act->GetProperty()->SetColor(1.0, 0.0, 0.0);
>
> ren1->AddActor(act);
>
>
> MY_SP(vtkCubeSource, src2);
> src2->SetBounds(0,2,0,2,0,2);
> src2->Update();
>
> MY_SP(vtkCleanPolyData, clean2);
> clean2->SetInputConnection(src2->GetOutputPort());
> clean2->Update();
> vtkPolyData *cube2 = clean2->GetOutput();
>
> MY_SP(vtkPolyDataMapper, Map2);
> Map2->SetInput(cube2);
>
> MY_SP(vtkActor, act2);
> act2->SetMapper(Map2);
> act2->GetProperty()->SetInterpolationToFlat();
> act2->GetProperty()->SetColor(0.0, 1.0, 0.0);
>
> ren1->AddActor(act2);
>
> /////////////////////////////////////////////////////////
> MY_SP(vtkPointLocator, locator);
> locator->SetTolerance(0.0);
> locator->SetDataSet(cube2);
> locator->BuildLocator();
>
> ComputePointDistances(locator, cube);
>
> MY_SP(vtkKdTreePointLocator, locator2);
> locator2->SetTolerance(0.0);
> locator2->SetDataSet(cube2);
> locator2->BuildLocator();
>
> ComputePointDistances(locator2, cube);
>
> /////////////////////////////////////////////////////////
> ren1->ResetCamera();
> renWin->Render();
> iren->Start();
>
> /////////////////////////////////////////////////////////
> return 0;
> }
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
>
http://www.vtk.org/pipermail/vtkusers/attachments/20100325/597ae2ae/attachme
nt-0001.htm
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/f1aeabb2/attachm
ent-0001.htm>
------------------------------
Message: 21
Date: Mon, 29 Mar 2010 15:17:28 -0400
From: Dave Partyka <dave.partyka at kitware.com>
Subject: [vtkusers] VTK-5-6 branch created, CVS Unlocked
To: VTK Developers <vtk-developers at vtk.org>, vtk <vtkusers at vtk.org>
Message-ID:
<a44d4ae01003291217y5d9c7ca8p54f092cad16e3942 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hello all,
The VTK-5-6 branch has been created and CVS HEAD has been unlocked. This
branch will be used to produce the 5-6 release binaries in the near future.
Enjoy!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/5c3c4359/attachm
ent-0001.htm>
------------------------------
Message: 22
Date: Mon, 29 Mar 2010 15:20:21 -0400
From: Dave Partyka <dave.partyka at kitware.com>
Subject: Re: [vtkusers] VTK-5-6 branch created, CVS Unlocked
To: VTK Developers <vtk-developers at vtk.org>, vtk <vtkusers at vtk.org>
Message-ID:
<a44d4ae01003291220n7cc2f57fk8efc5a30302fa9cc at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I should add that you can access this branch by:
cvs update -r VTK-5-6 -dP
On Mon, Mar 29, 2010 at 3:17 PM, Dave Partyka
<dave.partyka at kitware.com>wrote:
> Hello all,
>
> The VTK-5-6 branch has been created and CVS HEAD has been unlocked. This
> branch will be used to produce the 5-6 release binaries in the near
future.
>
> Enjoy!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/27c02d3c/attachm
ent-0001.htm>
------------------------------
Message: 23
Date: Mon, 29 Mar 2010 21:33:12 +0200
From: Erik T?rke <tuerke at cbs.mpg.de>
Subject: Re: [vtkusers] vtkImageImport
To: vtkusers at vtk.org
Message-ID: <4BB10078.60701 at cbs.mpg.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 03/29/2010 08:40 PM, David Gobbi wrote:
> On Mon, Mar 29, 2010 at 12:26 PM, Erik T?rke<tuerke at cbs.mpg.de> wrote:
>
>
>> Hi!
>>
>> Well, this should be part of an adapter...so the user should get a list
of
>> pointers to vtkImageData objects (i return a list since the adapter also
>> gets 4d data as input).
>> But it seems, this is not possible, so i have to return a list of
pointers
>> to vtkImageImport objects, what imho is a little odd for the user of the
>> adapter.
>>
> I don't understand what you are trying to say. Can you give more detail?
>
> David
>
Hi
I want to write an adapter which takes an image object of an own type
and returns a list of vtkImageData type pointers, like:
data::ImageList imgList = isis::data::IOFactory::load("data.nii", "");
or
isis::data::ImageList imgList = isis::data::IOFactory::load("data.v", "");
imgList is the image object of type own, which i want to transform into
a vtkImageData object, like
std::list<vtkImageData*> vtkList =
isis::adapter::VTKAdapter::makeVtkImageList(imgList.front());
(do not be confused of the imgList.front()...this is an object of
dimension 4, so i want to return a list of 3d vtkdata)
So, if someone for instance write an vtk image viewer which should
support the isis image type, he/she can use the VTKAdapter to transform
my own imagetype into a vtkImageData type and use it.
But the way things are going i have to return vtkImageImport objects:
std::list<vtkImageImport*> vtkList =
isis::adapter::VTKAdapter::makeVtkImageList(imgList.front());
which actually was not my goal.
cheers
------------------------------
Message: 24
Date: Mon, 29 Mar 2010 15:46:40 -0400
From: Dave Partyka <dave.partyka at kitware.com>
Subject: Re: [vtkusers] VTK-5-6 branch created, CVS Unlocked
To: Xiaofeng Z <xf10036 at hotmail.com>
Cc: vtk-developers at vtk.org, VTK <vtkusers at vtk.org>
Message-ID:
<a44d4ae01003291246v6158b16p607af91d3e5161d8 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
No the VTK-5-6-bp is a tag we create right before branching.
VTK-5-6 is the branch. Sorry the -dP are just my extra cvs arguments that I
probably should have reordered as.
cvs update -dP -r VTK-5-6
On Mon, Mar 29, 2010 at 3:36 PM, Xiaofeng Z <xf10036 at hotmail.com> wrote:
> Is that
>
> cvs update -r VTK-5-6-bp?
>
> Xiaofeng Z
>
>
>
> ------------------------------
> Date: Mon, 29 Mar 2010 15:20:21 -0400
> From: dave.partyka at kitware.com
> To: vtk-developers at vtk.org; vtkusers at vtk.org
> Subject: Re: [vtkusers] VTK-5-6 branch created, CVS Unlocked
>
>
> I should add that you can access this branch by:
>
> cvs update -r VTK-5-6 -dP
>
> On Mon, Mar 29, 2010 at 3:17 PM, Dave Partyka
<dave.partyka at kitware.com>wrote:
>
> Hello all,
>
> The VTK-5-6 branch has been created and CVS HEAD has been unlocked. This
> branch will be used to produce the 5-6 release binaries in the near
future.
>
> Enjoy!
>
>
>
> ------------------------------
> Hotmail: Trusted email with powerful SPAM protection. Sign up
now.<http://clk.atdmt.com/GBL/go/210850553/direct/01/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/00138b00/attachm
ent-0001.htm>
------------------------------
Message: 25
Date: Mon, 29 Mar 2010 15:36:15 -0400
From: Xiaofeng Z <xf10036 at hotmail.com>
Subject: Re: [vtkusers] VTK-5-6 branch created, CVS Unlocked
To: <dave.partyka at kitware.com>, <vtk-developers at vtk.org>, VTK
<vtkusers at vtk.org>
Message-ID: <COL123-W520E47E71534831F90B385E5200 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"
Is that
cvs update -r VTK-5-6-bp?
Xiaofeng Z
Date: Mon, 29 Mar 2010 15:20:21 -0400
From: dave.partyka at kitware.com
To: vtk-developers at vtk.org; vtkusers at vtk.org
Subject: Re: [vtkusers] VTK-5-6 branch created, CVS Unlocked
I should add that you can access this branch by:
cvs update -r VTK-5-6 -dP
On Mon, Mar 29, 2010 at 3:17 PM, Dave Partyka <dave.partyka at kitware.com>
wrote:
Hello all,
The VTK-5-6 branch has been created and CVS HEAD has been unlocked. This
branch will be used to produce the 5-6 release binaries in the near future.
Enjoy!
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850553/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/c0248e0c/attachm
ent-0001.htm>
------------------------------
Message: 26
Date: Mon, 29 Mar 2010 14:07:46 -0600
From: David Gobbi <david.gobbi at gmail.com>
Subject: Re: [vtkusers] vtkImageImport
To: Erik T?rke <tuerke at cbs.mpg.de>
Cc: vtkusers at vtk.org
Message-ID:
<48a17b781003291307k6c12727cr68862040a33d5beb at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On Mon, Mar 29, 2010 at 1:33 PM, Erik T?rke <tuerke at cbs.mpg.de> wrote:
> On 03/29/2010 08:40 PM, David Gobbi wrote:
>>
>> On Mon, Mar 29, 2010 at 12:26 PM, Erik T?rke<tuerke at cbs.mpg.de> ?wrote:
>>
>>
>>>
>>> Hi!
>>>
>>> Well, this should be part of an adapter...so the user should get a list
>>> of
>>> pointers to vtkImageData objects (i return a list since the adapter also
>>> gets 4d data as input).
>>> But it seems, this is not possible, so i have to return a list of
>>> pointers
>>> to vtkImageImport objects, what imho is a little odd for the user of the
>>> adapter.
>>>
>>
>> I don't understand what you are trying to say. ?Can you give more detail?
>>
>> ? David
>>
>
> Hi
>
> I want to write an adapter which takes an image object of an own type and
> returns a list of vtkImageData type pointers, like:
>
> data::ImageList imgList = isis::data::IOFactory::load("data.nii", "");
>
> or
>
> isis::data::ImageList imgList = isis::data::IOFactory::load("data.v", "");
>
> imgList is the image object of type own, which i want to transform into a
> vtkImageData object, like
>
> std::list<vtkImageData*> vtkList =
> isis::adapter::VTKAdapter::makeVtkImageList(imgList.front());
>
> (do not be confused of the imgList.front()...this is an object of
dimension
> 4, so i want to return a list of 3d vtkdata)
>
> So, if someone for instance write an vtk image viewer which should support
> the isis image type, he/she can use the VTKAdapter to transform my own
> imagetype into a vtkImageData type and use it.
>
> But the way things are going i have to return vtkImageImport objects:
>
> std::list<vtkImageImport*> vtkList =
> isis::adapter::VTKAdapter::makeVtkImageList(imgList.front());
>
> which actually was not my goal.
Well, I am not familiar with isis, but now I have an idea of what you
are trying to do.
First, note that when using STL containers with VTK objects, you must
always use smart pointers:
std::vector<vtkSmartPointer<vtkImageData> > imageDataVector;
Smart pointers are the only way that the VTK garbage collector can
track objects that are inside of STL containers.
As for the rest, I really don't understand why you cannot make a list
of vtkImageData objects. Why not do something like this?
For each 3D image:
1) create a vtkImageImport
2) set the vtkImageImport up for your data
3) call Update
4) use GetOutput() to get the vtkImageData
5) add the vtkImageData to a std:list<vtkSmartPointer<vtkImageData> >
container
6) call Delete on the vtkImageImport
7) repeat for the next 3D image
I have used a similar technique for importing 4D image to VTK with no
problem.
David
------------------------------
Message: 27
Date: Mon, 29 Mar 2010 22:18:18 +0200
From: "Dr. Philip Julian Broser" <philip.broser at doctors.net.uk>
Subject: Re: [vtkusers] VTKImageActor->SetZSlice (z) fails to update
To: Jothybasu K Selvaraj <jothybasu at gmail.com>
Cc: vtkusers at vtk.org
Message-ID: <2813BBE4-5F75-4E0D-B9D7-1DFBB8010E90 at doctors.net.uk>
Content-Type: text/plain; charset="us-ascii"; Format="flowed";
DelSp="yes"
I tried that but it does not change the behavior of the program.
But interestingly when I am compiling and using the software on a
machine running Mac OSX10.4 the slice updates without any problem,
but when I am using 10.6 the problems starts.
Does any body know anything about any buck on 10.6?
On Mar 29, 2010, at 5:19 PM, Jothybasu K Selvaraj wrote:
> You should be adding your Imageactor to some renderWindow. So, try
> RenderWindow->Render().
>
> Jothy
>
> On Mon, Mar 29, 2010 at 3:07 PM, Dr. Philip Julian Broser
<philip.broser at doctors.net.uk
> > wrote:
> Dear VTK Users,
>
> I am still struggling with updating the zslice in the vtkImageActor
>
>
> I am visualising 3D Volume Data (tiff) using an vtkImageActor:
>
> vtkImageData *FaImage = (correctly loaded 3d volume data, see down
> below)
>
> vtkImageActor *ImageActor = vtkImageActor::New();
> ImageActor->SetInput (FaImage);
> ImageActor->SetZSlice (2);
>
> The visualisation of the first Zslice works very well.
>
> However my program visualizes 3D Volume MRI data and overlays it
> with vtk meshes of brain structures i.e. the thalmus.
> To check that the structure in the vtk mesh was correctly segmented
> and localized I want to look at single z planes.
> In order to be able to select different planes I have written a
> simple Event Class.
> With every click of the mouse the image plane should shift by one
> pixel in z.
> The first plane is always well visualised and the actor seems to be
> correctly initiated
> but the plane is not updated when a event occurs even so the command
> SetZSlice is called with the new z value.
>
> Does any body have an idea why the image actor is not updated?
>
> Kind regards
>
> Phil
>
>
> class myEventClass : public vtkCommand
> {
>
>
>
> virtual void Execute ( vtkObject * caller, unsigned
long
> eventId, void * callData)
> {
> int max=ImageActor->GetWholeZMax ( );
> int min=ImageActor->GetWholeZMin ( );
>
>
> if (dir==0)
> {
> z=z+1;
> if (z>max ) {z=max;dir=1;}
> }
> else
> {
> z=z-1;
> if (z<min) {z=min;dir=0;}
> };
>
>
> ImageActor->SetZSlice (z);
>
>
> cout << "Current z Slice:" << z << endl;
> };
>
> public:
> myEventClass() {
> z=0;
> dir=0;
> }
>
> void SetImageActor(vtkImageActor *iA) {ImageActor=iA;};
>
>
> private:
> vtkImageActor *ImageActor;
> int z;
> int dir;
> };
>
>
> vtkImageData (0x101022350)
> Debug: Off
> Modified Time: 554
> Reference Count: 3
> Registered Events: (none)
> Source: (none)
> Information: 0x1010224b0
> Data Released: False
> Global Release Data: Off
> UpdateTime: 0
> Release Data: Off
> UpdateExtent: Not Initialized
> RequestExactExtent: Off
> Field Data:
> Debug: Off
> Modified Time: 456
> Reference Count: 1
> Registered Events: (none)
> Number Of Arrays: 0
> Number Of Components: 0
> Number Of Tuples: 0
> Number Of Points: 414720
> Number Of Cells: 397100
> Cell Data:
> Debug: Off
> Modified Time: 459
> Reference Count: 1
> Registered Events: (none)
> Number Of Arrays: 0
> Number Of Components: 0
> Number Of Tuples: 0
> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )
> Interpolate Flags: ( 1 1 1 1 1 0 0 )
> Pass Through Flags: ( 1 1 1 1 1 1 1 )
> Scalars: (none)
> Vectors: (none)
> Normals: (none)
> TCoords: (none)
> Tensors: (none)
> GlobalIds: (none)
> PedigreeIds: (none)
> Point Data:
> Debug: Off
> Modified Time: 552
> Reference Count: 1
> Registered Events: (none)
> Number Of Arrays: 1
> Array 0 name = NULL
> Number Of Components: 1
> Number Of Tuples: 414720
> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )
> Interpolate Flags: ( 1 1 1 1 1 0 0 )
> Pass Through Flags: ( 1 1 1 1 1 1 1 )
> Scalars:
> Debug: Off
> Modified Time: 452
> Reference Count: 2
> Registered Events: (none)
> Name: (none)
> Data type: unsigned char
> Size: 414720
> MaxId: 414719
> NumberOfComponents: 1
> Information: 0
> Name: (none)
> Number Of Components: 1
> Number Of Tuples: 414720
> Size: 414720
> MaxId: 414719
> LookupTable: (none)
> Array: 0x101100000
> Vectors: (none)
> Normals: (none)
> TCoords: (none)
> Tensors: (none)
> GlobalIds: (none)
> PedigreeIds: (none)
> Bounds:
> Xmin,Xmax: (0, 237.5)
> Ymin,Ymax: (0, 237.5)
> Zmin,Zmax: (0, 110)
> Compute Time: 0
> ScalarType: 3
> NumberOfScalarComponents: 1
> Spacing: (2.5, 2.5, 2.5)
> Origin: (0, 0, 0)
> Dimensions: (96, 96, 45)
> Increments: (0, 0, 0)
> Extent: (0, 95, 0, 95, 0, 44)
>
>
> _______________________________________________
> 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/20100329/60796f6f/attachm
ent-0001.htm>
------------------------------
Message: 28
Date: Mon, 29 Mar 2010 16:44:20 -0400
From: David Doria <daviddoria+vtk at gmail.com>
Subject: Re: [vtkusers] octree visualization example
To: Francois Bertel <francois.bertel at kitware.com>
Cc: vtkusers at vtk.org
Message-ID:
<c19fcadc1003291344l2ea5fce4w6dbeae0ce7336fbb at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On Mon, Mar 29, 2010 at 2:40 PM, Francois Bertel <
francois.bertel at kitware.com> wrote:
> Hello,
>
> vtkHyperOctree is the class to represent a dataset as an octree.
> point/cell Locators are just spatial structure to speed-up search but
> there are not made to store datasets.
>
> For example, see VTK/Graphics/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx
>
> The source vtkHyperOctreeSampleFunction is used to create a
> vtkHyperOctree dataset from a sphere implicit function.
>
> vtkHyperOctreeSampleFunction is then plugged to a
> vtkHyperOctreeSurfaceFilter to display the outer bounding box of the
> octree.
>
>
Francois,
So can you load points/cells from a vtkPolyData into a vtkHyperOctree?
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.vtk.org/pipermail/vtkusers/attachments/20100329/2ae79882/attachm
ent-0001.htm>
------------------------------
Message: 29
Date: Mon, 29 Mar 2010 16:51:06 -0400
From: Francois Bertel <francois.bertel at kitware.com>
Subject: Re: [vtkusers] octree visualization example
To: vtkusers at vtk.org
Message-ID:
<d9819a911003291351v576cb188jca827d4d351a8f0d at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
No. An hyperoctree is a way to to store cell values in a more compact
way than a vtkImageData/vtkUniformGrid. The cells (node or leaves)
have a box shape. It is made to represent volumetric entities not 2D
primitives, like the primitives you can find in vtkPolyData.
On Mon, Mar 29, 2010 at 4:44 PM, David Doria <daviddoria+vtk at gmail.com>
wrote:
> On Mon, Mar 29, 2010 at 2:40 PM, Francois Bertel
> <francois.bertel at kitware.com> wrote:
>>
>> Hello,
>>
>> vtkHyperOctree is the class to represent a dataset as an octree.
>> point/cell Locators are just spatial structure to speed-up search but
>> there are not made to store datasets.
>>
>> For example, see
VTK/Graphics/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx
>>
>> The source vtkHyperOctreeSampleFunction is used to create a
>> vtkHyperOctree dataset from a sphere implicit function.
>>
>> vtkHyperOctreeSampleFunction is then plugged to a
>> vtkHyperOctreeSurfaceFilter to display the outer bounding box of the
>> octree.
>>
>
> Francois,
> So can you load points/cells from a vtkPolyData into a vtkHyperOctree?
> Thanks,
>
> David
--
Fran?ois Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA
------------------------------
_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers
End of vtkusers Digest, Vol 71, Issue 53
****************************************
More information about the vtkusers
mailing list