Hi,<br> I´m trying to apply the algorithm "connected threshold" in my image. I have this error:<br><br>RegionGrowing.cc(75) : error C2039: 'GetOutput' : is not a member of 'Image<float,3>'<br>
RegionGrowing.cc(76) : error C2039: 'SetInput' : is not a member of 'Image<float,3>'<br><br>My code is:<br><br><br><br> int x = volSize[0];<br> int y = volSize[1];<br> int z = volSize[2];<br>
<br> vector<float> res = volSize.mm; <br> <br> float dx = res[0];<br> float dy = res[0];<br> float dz = res[0];<br><br> typedef itk::Image<float,3> ImageType; <br> ImageType::Pointer InputImage = ImageType::New();<br>
ImageType::Pointer OutputImage = ImageType::New();<br><br> ImageType::SizeType size;<br> size[0] = x; <br> size[1] = y; <br> size[2] = z; <br><br> ImageType::IndexType start;<br> start[0] = 0; <br>
start[1] = 0; <br> start[2] = 0; <br> <br> ImageType::RegionType region;<br> region.SetSize( size );<br> region.SetIndex( start );<br><br> InputImage->SetRegions( region);<br> InputImage->Allocate(); <br>
<br> float spacing[3];<br> spacing[0] = res[0];<br> spacing[1] = res[1];<br> spacing[2] = res[2];<br><br> InputImage->SetSpacing(<div id=":xf" class="ii gt">spacing);<br><br> typedef itk::ImageRegionIterator<ImageType> IteratorType;<br>
IteratorType it(InputImage, region);<br> <br> const float *data=subdata;<br> it.GoToBegin();<br> while(!it.IsAtEnd())<br> {<br> it.Set (*data);<br> ++it;<br> ++data;<br> }<br> <br>
<br> typedef itk::ConnectedThresholdImageFilter<ImageType,ImageType> FilterType;<br> FilterType::Pointer filter = FilterType::New(); <br><br> filter->SetInput(InputImage->GetOutput());<br> OutputImage->SetInput(filter->GetOutput());<br>
<br><br> How can I resolve it?<br><br>Regards, <br>Elena<br></div><br><br><div class="gmail_quote">2009/7/3 Elena Molina <span dir="ltr"><<a href="mailto:elenam85@gmail.com">elenam85@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>First of all, I´m working with DICOM images in an already programmed (C++) application. Now I want to introduce<br>new features in this application and I´ll use ITK libraries.<br>So... my problem now is how can I convert my image (actually I have my image in memory (3D) and I have the<br>
pointer to the first position of this image) in a compliant format for using it with ITK functions.<br>I was reading in the getting started V how can I integrating ITK in my application and tried to do the same example but It <br>
didn´t work.<br>How can I do it? Which parameters I need? Pointer in the first position, size... any more?<br><br>Thankssssss<br>
</blockquote></div><br>