<font size="2"><font face="verdana,sans-serif">Hi David,<br></font></font><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">I am interested in this too:<br>
</font></div><div><div class="gmail_quote"><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80); font-family: arial, sans-serif; font-size: 13px; ">1) I equate the VTK world coordinate system with the DICOM patient<br>
coordinate system<br>2) I set the data-to-world transform from the information in the DICOM header<br>3) I set up the camera in my viewer to display the image in the<br>desired orientation</span></div><div class="gmail_quote">
<br></div><div class="gmail_quote">Currently I resample the image so it has identity transformation. But this is lossy and ugly.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Does the above approach affect the polygonal actors in the scene (segmented parts of the image)?</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Regards,</div><div class="gmail_quote">Dženan</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Mon, Jun 27, 2011 at 19:29, Lic. José M. Rodriguez Bacallao <span dir="ltr"><<a href="mailto:jmrbcu@gmail.com">jmrbcu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">could U post a sample code of this procedure:<br>
<div class="im"><br>
1) I equate the VTK world coordinate system with the DICOM patient<br>
coordinate system<br>
2) I set the data-to-world transform from the information in the DICOM header<br>
3) I set up the camera in my viewer to display the image in the<br>
desired orientation<br>
<br>
</div>what about<br>
<div class="im">1) The VTK image readers and importers don't deal with DICOM image<br>
orientation correctly<br>
</div>when I read dicom series I use: vtkGDCMImageReader from gdcm project.<br>
Do you know if this reader handle dicom orientation?<br>
<div class="im"><br>
3) For each image, you must keep a 4x4 matrix describing the DICOM orientation<br>
</div>this need to be done for every image in a serie?<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On 6/27/11, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> These are not viewer classes, they are just rendering classes and are<br>
> therefore completely agnostic with regards to DICOM.<br>
><br>
> But for the record, I do not understand all the difficulty people have with<br>
> this issue. When I view DICOM images, I just do the following:<br>
> 1) I equate the VTK world coordinate system with the DICOM patient<br>
> coordinate system<br>
> 2) I set the data-to-world transform from the information in the DICOM<br>
> header<br>
> 3) I set up the camera in my viewer to display the image in the desired<br>
> orientation<br>
><br>
> So please let me go on the record as saying that there is no "difference<br>
> between VTK coords and DICOM coords". That is a vicious rumour that people<br>
> spread for reasons that are beyond me. You can define the VTK world<br>
> coordinate system to be whatever you want.<br>
><br>
> The problems that people have are due to the following:<br>
> 1) The VTK image readers and importers don't deal with DICOM image<br>
> orientation correctly<br>
> 2) The vtkImageViewer does not deal with DICOM image orientation correctly<br>
> 3) For each image, you must keep a 4x4 matrix describing the DICOM<br>
> orientation<br>
><br>
> If someone were to fix the readers and the viewer, this DICOM vs. VTK issue<br>
> would mostly disappear.<br>
><br>
> Regarding the second question, it's not up to me when these go into a stable<br>
> release, Kitware controls the release schedule ;)<br>
><br>
> - David<br>
><br>
><br>
><br>
> On Mon, Jun 27, 2011 at 8:34 AM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
><br>
>> I wonder whether these classes has any fix for the different coordinates<br>
>> used by DICOm and vtk?<br>
>><br>
>> Thank you<br>
>><br>
>> Jothy<br>
>><br>
>><br>
>> On Mon, Jun 27, 2011 at 3:31 PM, Lic. José M. Rodriguez Bacallao <<br>
>> <a href="mailto:jmrbcu@gmail.com">jmrbcu@gmail.com</a>> wrote:<br>
>><br>
>>> so, when this classes will be available in stable vtk?<br>
>>><br>
>>> right now I am working with an snapshot from vtk git.<br>
>>><br>
>>> On 6/27/11, Aashish Chaudhary <<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>> wrote:<br>
>>> > Hi David,<br>
>>> ><br>
>>> > What Aaron said + Awesome!! (one more time)<br>
>>> ><br>
>>> > Looking at the features list, I think our project will be greatly<br>
>>> > benefited by your work. Thanks for sharing your work.<br>
>>> ><br>
>>> > Regards,<br>
>>> > Aashish<br>
>>> ><br>
>>> ><br>
>>> > On Mon, Jun 27, 2011 at 8:47 AM, Aaron Boxer <<a href="mailto:boxerab@gmail.com">boxerab@gmail.com</a>> wrote:<br>
>>> >> Awesome!!! Nice work; can't wait to use these classes.<br>
>>> >><br>
>>> >> Aaron<br>
>>> >><br>
>>> >> On Sun, Jun 26, 2011 at 6:15 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>>> >> wrote:<br>
>>> >>> I'm pleased to announce that I have finally completed my work on<br>
>>> several<br>
>>> >>> new<br>
>>> >>> image rendering classes for VTK. They are in the VTK git development<br>
>>> >>> tree,<br>
>>> >>> and a few of you have already tried them out (if you are one of those<br>
>>> >>> people, note that several feature and performance enhancements were<br>
>>> added<br>
>>> >>> last week). More info can be found at the following wiki page:<br>
>>> >>><br>
>>> >>> <a href="http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes" target="_blank">http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes</a><br>
>>> >>><br>
>>> >>> In brief, these classes replace vtkImageActor and provide a much<br>
>>> higher<br>
>>> >>> level of functionality. They are new VTK actor and mapper classes<br>
>>> >>> specifically meant for image viewing. What they are not: they are<br>
>>> >>> not<br>
>>> >>> widgets or viewers, although they provide machinery that can be used<br>
>>> to<br>
>>> >>> write widget and viewer classes. In other words, they are meant for<br>
>>> >>> people<br>
>>> >>> who like to roll their own image viewers.<br>
>>> >>><br>
>>> >>> The three new classes that I recommend for people to use are the<br>
>>> >>> following:<br>
>>> >>> vtkImageSlice - the new actor class for images<br>
>>> >>> vtkImageResliceMapper - mapper for drawing images for MPR viewers<br>
>>> >>> vtkImageProperty - for controlling lookup tables, window/level,<br>
>>> opacity,<br>
>>> >>> etc<br>
>>> >>><br>
>>> >>> Typical use cases:<br>
>>> >>><br>
>>> >>> 1) For an MPR viewer, use vtkInteractorStyleImage and set it to your<br>
>>> >>> desired<br>
>>> >>> view orientation. Then set the following properties in<br>
>>> >>> vtkImageResliceMapper:<br>
>>> >>> mapper->SliceFacesCameraOn()<br>
>>> >>> mapper->SliceAtFocalPointOn()<br>
>>> >>> The interactor will then allow you to pan, zoom, window/level, and<br>
>>> >>> (in<br>
>>> 3D<br>
>>> >>> mode) rotate and slice. See<br>
>>> >>> VTK/Examples/ImageProcessing/ImageInteractorReslice.py for an<br>
>>> >>> example.<br>
>>> >>><br>
>>> >>> 2) For a 3D ortho object, use multiple vtkImageResliceMapper objects,<br>
>>> and<br>
>>> >>> for each one make a vtkPlane that describes the normal and position<br>
>>> >>> of<br>
>>> >>> the<br>
>>> >>> slice to extract. Then call these methods:<br>
>>> >>> mapper->SetSlicePlane(plane)<br>
>>> >>> mapper->ResampleToScreenPixelsOff()<br>
>>> >>> Turning the "ResampleToScreenPixels" option Off makes rotation<br>
>>> >>> faster,<br>
>>> so<br>
>>> >>> it<br>
>>> >>> is recommended when rotations are going to be common operations.<br>
>>> >>> Example:<br>
>>> >>> VTK/Rendering/Testing/Cxx/TestImageResliceMapperOffAxis.cxx<br>
>>> >>><br>
>>> >>> Features:<br>
>>> >>> 1) oblique views (obviously!)<br>
>>> >>> 2) nearest-neighbor, linear, and cubic interpolation<br>
>>> >>> 3) modify image orientation with respect to world coords by setting<br>
>>> >>> vtkImageSlice's UserMatrix<br>
>>> >>> 4) fully multi-threaded reslicing and color mapping operations<br>
>>> >>> 5) streaming, i.e. only pulls the data needed for rendering<br>
>>> >>> 6) works well with very large images (as long as they fit in memory)<br>
>>> >>> 7) LOD-style interaction (switches to faster rendering for<br>
>>> interaction)<br>
>>> >>> 8) blend images by adding multiple vtkImageSlice objects to a<br>
>>> >>> vtkImageStack<br>
>>> >>> 9) checkerboard images by setting "CheckerboardOn" in the<br>
>>> >>> vtkImageProperty<br>
>>> >>> 10) thick-slab views (see vtkImageResliceMapper for details)<br>
>>> >>> 11) works with vtkCellPicker for picking image voxels as points or<br>
>>> cells<br>
>>> >>><br>
>>> >>> For large image viewing, on a 4GB computer (64-bit OS X) I've<br>
>>> displayed<br>
>>> >>> images up to 3GB in size with full interactivity, but YMMV. As long<br>
>>> as<br>
>>> >>> the<br>
>>> >>> mapper's ResampleToScreenPixels option is On, the mapper will never<br>
>>> try<br>
>>> >>> to<br>
>>> >>> load the full image onto the GPU (which is what causes the<br>
>>> vtkImageActor<br>
>>> >>> to<br>
>>> >>> be slow for large images). The size of the images that you can<br>
>>> display<br>
>>> >>> is<br>
>>> >>> limited only by main memory, I have displayed stacks of RGB images<br>
>>> that<br>
>>> >>> are<br>
>>> >>> 10000x10000 pixels in size.<br>
>>> >>><br>
>>> >>> I do not plan to push these into the VTK 5.8 release (even if Kitware<br>
>>> >>> were<br>
>>> >>> to give me the go-ahead), because the VTK development tree has<br>
>>> diverged<br>
>>> >>> too<br>
>>> >>> far from the VTK 5.8 release tree. These new image classes are only<br>
>>> >>> possible due to recent improvements that I've made to the picker,<br>
>>> lookup<br>
>>> >>> table, and image reslice classes and they probably depend on a<br>
>>> >>> handful<br>
>>> of<br>
>>> >>> recent changes made by other people, as well.<br>
>>> >>><br>
>>> >>> - David<br>
>>> >>> _______________________________________________<br>
>>> >>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> >>><br>
>>> >>> Visit other Kitware open-source projects at<br>
>>> >>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>> >>><br>
>>> >>> Please keep messages on-topic and check the VTK FAQ at:<br>
>>> >>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>> >>><br>
>>> >>> Follow this link to subscribe/unsubscribe:<br>
>>> >>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>> >>><br>
>>> >>><br>
>>> >> _______________________________________________<br>
>>> >> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> >><br>
>>> >> Visit other Kitware open-source projects at<br>
>>> >> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>> >><br>
>>> >> Please keep messages on-topic and check the VTK FAQ at:<br>
>>> >> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>> >><br>
>>> >> Follow this link to subscribe/unsubscribe:<br>
>>> >> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>> >><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > --<br>
>>> > | Aashish Chaudhary<br>
>>> > | R&D Engineer<br>
>>> > | Kitware Inc.<br>
>>> > | <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> > _______________________________________________<br>
>>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> ><br>
>>> > Visit other Kitware open-source projects at<br>
>>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>> ><br>
>>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>> ><br>
>>> > Follow this link to subscribe/unsubscribe:<br>
>>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>> ><br>
>>><br>
>>><br>
>>> --<br>
>>> Lic. José M. Rodriguez Bacallao<br>
>>> Centro de Biofisica Medica<br>
>>> -----------------------------------------------------------------<br>
>>> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo<br>
>>> mismo.<br>
>>><br>
>>> Recuerda: El arca de Noe fue construida por aficionados, el titanic<br>
>>> por profesionales<br>
>>> -----------------------------------------------------------------<br>
>>> _______________________________________________<br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>><br>
>>> Visit other Kitware open-source projects at<br>
>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>><br>
>>> Please keep messages on-topic and check the VTK FAQ at:<br>
>>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>><br>
>>> Follow this link to subscribe/unsubscribe:<br>
>>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>><br>
>><br>
>><br>
><br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Lic. José M. Rodriguez Bacallao<br>
Centro de Biofisica Medica<br>
-----------------------------------------------------------------<br>
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.<br>
<br>
Recuerda: El arca de Noe fue construida por aficionados, el titanic<br>
por profesionales<br>
-----------------------------------------------------------------<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>