[vtkusers] [Insight-users] visualization-problem after segmentation and cropping
Luis Ibanez
luis.ibanez at kitware.com
Fri May 28 10:52:20 EDT 2010
Hi Yusuf,
Manually modifying the pixel type tag in the
metaimage header will not do the trick.
(in your modified image, the pixel type doesn't
match the content of the pixel buffer, which
explains the distorted appearance of the image).
My apologies if my instructions were not clear.
What I suggested you to do, was to change
the pixel type in your code, and then to run
the code again.
Please do so,
and let us know what you find.
Thanks
Luis
--------------------------------------------------
On Wed, May 26, 2010 at 9:10 PM, Yusuf OEZBEK <nasil122002 at yahoo.de> wrote:
> Hello Luis,
>
> I have manually converted the pixel type to unsigned long (ElementType =
> MET_ULONG) in. mhd file and loaded with 3Dslicer. It works but the 3D-image
> is not correctly displayed. I get as 3D two axial-view side by side. If I
> visualize it in my program with vtk, then I get purposeful 3D-image.
>
>
>
> Here are the screenshots:
>
> Output-Image of watershed on my program (visualized with vtkContourFilter):
> http://www.wopsys.com/bilder/watershed_visualizedwithvtk.png
>
>
> Output-Image of watershed on 3DSlicer:
> http://www.wopsys.com/bilder/watershed.JPG
>
>
> Output-Image of DicomSeriesReadImageWrite2, so before segmentation:
> http://www.wopsys.com/bilder/before_segmentation.png
>
>
>
> Thank you.
>
> ------------------------------
> *Von:* Luis Ibanez <luis.ibanez at kitware.com>
> *An:* Yusuf OEZBEK <nasil122002 at yahoo.de>
> *CC:* ITK Mailinglist <insight-users at itk.org>; VTK Mailinglist <
> vtkusers at vtk.org>; nasil122002 at gmail.com
> *Gesendet:* Mittwoch, den 26. Mai 2010, 19:56:18 Uhr
>
> *Betreff:* Re: [Insight-users] visualization-problem after segmentation
> and cropping
>
>
> Hi Yusuf,
>
> Excellent.
>
> Thanks for posting the screenshots.
>
>
> They illustrate that the pipeline is working correctly
> up to the output of the region growing filter.
>
>
> You can now focus on getting the Watershed
> filter to work correctly by using as output image
> an image of pixel type "unsigned long" and
> making sure that it doesn't turn into "long long"
> in your 64 bits machine.
>
> Please post the screenshot of the Watershed
> output once you get it to work.
>
>
> Thanks
>
>
> Luis
>
>
> -------------------------------------------------------------------
> On Tue, May 25, 2010 at 4:14 PM, Yusuf OEZBEK <nasil122002 at yahoo.de>wrote:
>
>> Hello Luis,
>>
>> I have the.mhd files loaded with 3DSlicer. Here are the screenshots:
>>
>> Output-Image of Region Growing:
>> http://www.wopsys.com/bilder/regiongrowing_notcropped.JPG
>> http://www.wopsys.com/bilder/regiongrowing_cropped.JPG
>>
>>
>> Output-Image of DicomSeriesReadImageWrite2:
>> http://www.wopsys.com/bilder/DicomSeriesReadImageWrite2.JPG
>>
>>
>>
>>
>> Thanks.
>> ------------------------------
>> *Von:* Luis Ibanez <luis.ibanez at kitware.com>
>> *An:* Yusuf OEZBEK <nasil122002 at yahoo.de>
>> *CC:* ITK Mailinglist <insight-users at itk.org>; VTK Mailinglist <
>> vtkusers at vtk.org>; vtkusers-request at vtk.org; nasil122002 at gmail.com
>> *Gesendet:* Dienstag, den 25. Mai 2010, 17:00:30 Uhr
>> *Betreff:* Re: [Insight-users] visualization-problem after segmentation
>> and cropping
>>
>> Hi Yusuf,
>>
>>
>> When you are debugging a pipeline you should
>> start by verifying that the data has been properly
>> loaded in memory, and then you should proceed
>> to check out the output of every intermediate filter
>> in order: from source to final output.
>>
>>
>> Please start by doing the following:
>>
>>
>> Verify that you succeeded reading the DICOM series.
>>
>> Simply write the output of the Series reader to
>> an output file.
>>
>> This essentially the code that you will see in
>> the example:
>>
>>
>> Insight/Examples/IO/
>> DicomSeriesReadImageWrite2.cxx
>>
>>
>> Open that file with any visualization software
>>
>> For example:
>>
>> 1) Paraview. (http://www.paraview.org) or
>> 2) Slicer, (http://www.slicer.org) or
>> 3) SNAP, (http://sourceforge.net/projects/itk-snap/) or
>> 4) VV (http://www.creatis.insa-lyon.fr/rio/vv)
>>
>>
>> Please let us know if you manage to do that initial
>> test, (it will be great if you post a screen shot of
>> that output image)
>>
>> and then we will guide you to the next step.
>>
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>> --------------------------------------------------
>> On Mon, May 24, 2010 at 10:26 PM, Yusuf OEZBEK <nasil122002 at yahoo.de>
>> wrote:
>> > Hello,
>> >
>> > I have a problem with cut (cropping) and visualization a 3D image,
>> which I
>> > produced by the segmentation-method “watershed and region growing”. In
>> the
>> > beginning I read the DICOM images with itkImageSeriesReader, then I run
>> > watershed or region growing algorithm, in order to connect itk with vtk
>> and
>> > a 3D image produce and for the displaying of segmentation I use
>> > vtkContourFilter. After segmentation for cropping the images I use
>> > vtkBoxClipDataSet and vtkDataSetSurfaceFilter, but the result is a black
>> > screen. When I read the images with vtkDICOMImageReader or
>> > itkImageSeriesReader and then segmented with volume rendering, marching
>> > cubes watershed and region growing, then it works completely well. The
>> > problem arises only when cut for watershed and region growing algorithm.
>> > What am I doing wrong?
>> >
>> > To understand my problem better, please see my screenshots on the
>> following
>> > link.
>> >
>> >
>> >
>> > http://www.wopsys.com/bilder/segmentation.html
>> >
>> >
>> >
>> > To determine whether there missing of any geometrical informations. I
>> had
>> > sent the following outputs of tests.
>> >
>> > http://www.wopsys.com/Outputs/Output_MarchingCubes.txt
>> > http://www.wopsys.com/Outputs/Output_VolumeRendering.txt
>> > http://www.wopsys.com/Outputs/Output_Watershed.txt
>> > http://www.wopsys.com/Outputs/Output_RegionGrowing.txt
>> >
>> > Thanks.
>> >
>> >
>> > ________________________________
>> > Von: Luis Ibanez <luis.ibanez at kitware.com>
>> > An: Yusuf OEZBEK <nasil122002 at yahoo.de>
>> > CC: ITK Mailinglist <insight-users at itk.org>; VTK Mailinglist
>> > <vtkusers at vtk.org>; nasil122002 at gmail.com
>> > Gesendet: Sonntag, den 18. April 2010, 1:12:33 Uhr
>> > Betreff: Re: [Insight-users] Cropping Problem
>> >
>> >
>> > Hi Yusuf,
>> >
>> >
>> > You should start by separating the segmentation
>> > problem from the visualization problem.
>> >
>> >
>> > Please do the following:
>> >
>> > 0) Just after you call:
>> >
>> > reader->SetFileNames( fileNames );
>> > reader->Update();
>> >
>> > add
>> >
>> > reader->GetOutput()->Print( std::cout );
>> >
>> > then
>> >
>> > 1) Run the ITK segmentation pipeline until you
>> > get the segmented image, and save it as a
>> > MetaImage file (with extension .mhd)
>> >
>> >
>> > 2) Post the content of the resulting .mhd file
>> > back to the list, as well as the print out of
>> > the statement:
>> >
>> > reader->GetOutput()->Print( std::cout );
>> >
>> >
>> > 3) Use Paraview (www.paraview.org) to load the
>> > resulting image and extracting an iso-surface.
>> > Compare that iso-surface with the one that
>> > you get by directly from the DICOM image.
>> > (and let us know what you find).
>> >
>> >
>> > With the information from (2) we should be
>> > able to identify if any geometrical information
>> > is missing from the ITK processing pipeline.
>> >
>> >
>> > Thanks
>> >
>> >
>> > Luis
>> >
>> >
>> >
>> >
>> >
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.html
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>> >
>> >
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100528/da685cfc/attachment.htm>
More information about the vtkusers
mailing list