[Insight-users] Segmenting Visible Human Data

Joshua Cates cates at sci . utah . edu
Tue, 11 Nov 2003 11:29:45 -0700 (MST)


Hi Stefan,

I will have a look and update this code for windows.  It was written some
time ago and could probably use the new file IO as you suggest.  I may not
be able to get to it for a few days, however.

thanks,

Josh.

______________________________
 Josh Cates			
 Scientific Computing and Imaging Institute
 University of Utah
 Email: cates at sci . utah . edu
 Phone: (801) 587-7697
 URL:   http://www . sci . utah . edu/~cates


On Tue, 11 Nov 2003, Stefan Lindenau wrote:

> Hi Joshua,
> 
> I think that it is maybe possible to use the watershed algorithm in my 
> case, so I just wanted to give the Streaming Watershed segmentation 
> example a trial.
> But it doesn't compile. I am using Visual Studio 6.0.
> 
> Here is my compiler output for the itkRelabelerApp:
> 
> --------------------Configuration: itkRelabelerApp - Win32 
> Release--------------------
> Compiling...
> itkRelabelerApp.cxx
> C:\Surgical Simulator\InsightToolkit-1.4.0\Code\Common\itkOffset.h(183) 
> : warning C4200: nonstandard extension used : zero-sized array in 
> struct/union
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkIndex.h(79) : see 
> reference to class template instantiation 'itk::Offset<0>' being compiled
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkImageRegion.h(78) : see 
> reference to class template instantiation 'itk::Index<0>' being compiled
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(65) : see 
> reference to class template instantiation 'itk::ImageRegion<0>' being 
> compiled
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(90) : see 
> reference to class template instantiation 
> 'itk::sws::RawFileReader<TOutputImage>' being compiled
> C:\Surgical Simulator\InsightToolkit-1.4.0\Code\Common\itkIndex.h(234) : 
> warning C4200: nonstandard extension used : zero-sized array in struct/union
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkImageRegion.h(78) : see 
> reference to class template instantiation 'itk::Index<0>' being compiled
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(65) : see 
> reference to class template instantiation 'itk::ImageRegion<0>' being 
> compiled
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(90) : see 
> reference to class template instantiation 
> 'itk::sws::RawFileReader<TOutputImage>' being compiled
> C:\Surgical Simulator\InsightToolkit-1.4.0\Code\Common\itkSize.h(189) : 
> warning C4200: nonstandard extension used : zero-sized array in struct/union
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkImageRegion.h(82) : see 
> reference to class template instantiation 'itk::Size<0>' being compiled
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(65) : see 
> reference to class template instantiation 'itk::ImageRegion<0>' being 
> compiled
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(90) : see 
> reference to class template instantiation 
> 'itk::sws::RawFileReader<TOutputImage>' being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkImageRegion.h(264) : error 
> C2229: class 'itk::ImageRegion<0>' has an illegal zero-sized array
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(65) : see 
> reference to class template instantiation 'itk::ImageRegion<0>' being 
> compiled
>         H:\Stefan\surgical sim\VHD processing 
> progs\StreamedWatershedSegmentation\itkSWSRawFileReader.h(90) : see 
> reference to class template instantiation 
> 'itk::sws::RawFileReader<TOutputImage>' being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(330) : 
> error C2653: 'Detail' : is not a class or namespace name
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(339) : 
> see reference to class template instantiation 'SameDimension<D1,D2>' 
> being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(330) : 
> error C2143: syntax error : missing ';' before '<'
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(339) : 
> see reference to class template instantiation 'SameDimension<D1,D2>' 
> being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(330) : 
> error C2059: syntax error : '<'
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(339) : 
> see reference to class template instantiation 'SameDimension<D1,D2>' 
> being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(330) : 
> error C2238: unexpected token(s) preceding ';'
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(339) : 
> see reference to class template instantiation 'SameDimension<D1,D2>' 
> being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(331) : 
> error C2653: 'Detail' : is not a class or namespace name
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(339) : 
> see reference to class template instantiation 'SameDimension<D1,D2>' 
> being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(331) : 
> error C2059: syntax error : '<'
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(339) : 
> see reference to class template instantiation 'SameDimension<D1,D2>' 
> being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(331) : 
> error C2238: unexpected token(s) preceding ';'
>         C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(339) : 
> see reference to class template instantiation 'SameDimension<D1,D2>' 
> being compiled
> C:\Surgical 
> Simulator\InsightToolkit-1.4.0\Code\Common\itkConceptChecking.h(341) : 
> fatal error C1903: unable to recover from previous error(s); stopping 
> compilation
> Error executing cl.exe.
> 
> itkRelabelerApp.exe - 9 error(s), 3 warning(s)
> 
> I am sure that this problem is caused by the itkSWSRawFileReader.
> Is it possible to replace this reader by an ImageFileReader with 
> RawImageIO?
> 
> I have just changed one application to use the ImageFileReader, what is 
> not a real problem. But I am not sure which Options of rawImageIO I have 
> to set to get an effect that is similar to the use of the Regions in the 
> itkSWSRawFileReader.
> Or is it just possible to set one compiler flag to make the programs 
> compile (my favourite choice ;->)?
> 
> Has anyone a idea how I can solve this issue?
> 
> Thank you
> Stefan
> 
> Joshua Cates wrote:
> 
> >Hi Stefan,
> >
> >We have had good success segmenting localized regions of the visible human
> >data using the watersheds algorithm (see
> >http://www . sci . utah . edu/~cates/papers/Cates_MedIA2003 . pdf).  
> >Unfortunately the ITK watersheds algorithm does not scale very gracefully
> >to huge datasets.  We did some work on this a while back and our results
> >can be found in the InsightApplications/StreamingWatershedSegmentation
> >directory, which streams data through the ITK watershed filters. 
> >
> >First it is important to understand how the ITK watershed algorithm works.  
> >We produce an initial (typically oversegmented) transform of regions.  
> >The initial transform is then used to compute a hierarchy of region merges
> >that allows us to output segmentations at increasingly coarse levels of
> >detail.
> >
> >There are two main factors that limit performance on large datasets. The
> >first is that the watershed transform is applied globally so huge datasets
> >produce huge numbers of regions.  This is mainly a memory issue and is
> >solved by the streaming approach.  The real problem is then in generating
> >the merge hierarchy.  Computation time increases nonlinearly with size and
> >we have not found a way to parallellize the merge algorithm.  
> >
> >Note that computation time and memory consumption of the algorithm is
> >determined more by the amount of information in a dataset than by the size
> >of the dataset. (Nonlinear diffusion is an excellent way to reduce detail
> >and preserve object boundary features.) So whether or not this algorithm
> >will be appropriate for you depends on the scale of the anatomy you are
> >trying to segment.
> >
> >Hope this helps,
> >
> >Josh.
> >
> >
> >
> >
> >______________________________
> > Josh Cates			
> > Scientific Computing and Imaging Institute
> > University of Utah
> > Email: cates at sci . utah . edu
> > Phone: (801) 587-7697
> > URL:   http://www . sci . utah . edu/~cates
> >
> >
> >On Thu, 6 Nov 2003, Stefan Lindenau wrote:
> >
> >  
> >
> >>Hi,
> >>
> >>I have to do a segmentation on a part of the female Dataset of the 
> >>Visible Human. I think this part will be as big as 4GB.
> >>After reading documentation and former Mailinglist postings I came to 
> >>the conclusion that the Watershed Algorithm in conjunction with the 
> >>SegmentationEditorFltkGUI would be an appropriate approach.
> >>
> >>The goal is to use the segmented data in the VTK to render for example 
> >>the ribs of the Visible Woman. The SegmentationEditor provides a nice UI 
> >>to choose the appropriate elements in the segmented image and to 
> >>manipulate them.
> >>
> >>My concern lies on the memory consumption of the processing. Is it 
> >>realistic to use this approach with a consumer computer? Maybe another 
> >>algorithm would fit better to my needs.
> >>
> >>Thank you
> >>Stefan
> >>
> >>
> >>
> >>_______________________________________________
> >>Insight-users mailing list
> >>Insight-users at itk . org
> >>http://www . itk . org/mailman/listinfo/insight-users
> >>
> >>    
> >>
> >
> >_______________________________________________
> >Insight-users mailing list
> >Insight-users at itk . org
> >http://www . itk . org/mailman/listinfo/insight-users
> >
> >
> >  
> >
> 
> 
>