<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">This is what I managed to find. 512x512 slices, and 11 slices deep (just for fast testing). I've also tried including all 461 slices but that didn't help. The origin seems to be quite strange. I'm not sure how that came about. Maybe the problem has something to do with that??<br><br>Thanks.<br><br><br>1.2.840.113704.1.111.4496.1160040069.13<br>Image (04C5A390)<br> RTTI typeinfo: class itk::Image<float,3><br> Reference Count: 3<br> Modified Time: 356<br> Debug: Off<br> Observers:<br> none<br> Source: (04C57C10)<br> Source output index: 0<br> Release Data: Off<br> Data Released: False<br> Global Release Data: Off<br> PipelineMTime: 32<br> UpdateMTime: 357<br> LargestPossibleRegion:<br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [512, 512, 11]<br> BufferedRegion:<br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [512, 512, 11]<br> RequestedRegion:<br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [512, 512, 11]<br> Spacing: [0.71875, 0.71875, 1.5]<br> Origin: [-201, -91, 988.5] <br> Direction:<br>1 0 0<br>0 1 0<br>0 0 1<br><br> PixelContainer:<br> ImportImageContainer (04C5A550)<br> RTTI typeinfo: class itk::ImportImageContainer<unsigned long,float><br> Reference Count: 1<br> Modified Time: 80<br> Debug: Off<br> Observers:<br> none<br> Pointer: 04C5A580<br> Container manages memory: true<br> Size: 2883584<br> Capacity: 2883584<br></div><br><div></div><br><br><hr id="stopSpelling">> Date: Tue, 15 Apr 2008 13:23:16 -0400<br>> From: bill.lorensen@gmail.com<br>> To: w_e_b_m_a_s_t_e_r_6_9@hotmail.com<br>> Subject: Re: [Insight-users] Confidence Connected Seed Coordinates<br>> CC: luis.ibanez@kitware.com; insight-users@itk.org<br>> <br>> Can you print your image please?<br>> <br>> inage->Print(std::cout);<br>> <br>> On Tue, Apr 15, 2008 at 10:06 AM, Cameron Burnett<br>> <w_e_b_m_a_s_t_e_r_6_9@hotmail.com> wrote:<br>> ><br>> > First of all, thanks to everyone for your help.<br>> ><br>> > I tried to implement the TransformPhysicalPointToIndex function, but the<br>> > indices are totally crazy (as you can see below in the code comments). I've<br>> > put in comments for the output of test message boxes. You can see that the<br>> > point is set up correctly, however the index is insane. The X and Z parts<br>> > always remain at 0, however the Y part is absolutely massive in this<br>> > case.... and often in other parts it just decides to go to -0. I tried<br>> > rounding the pointtype input to int, but that just outputted 0, -0, 0.<br>> ><br>> > The line InternalImageType::ConstPointer image = reader->GetOutput() is<br>> > called after the reader->Update() . The image type at the moment is a 3d<br>> > float. Only the code relevant to the problem has been included also.<br>> ><br>> > I've spent all day trying to figure this out, but it really doesn't make any<br>> > sense to me. I put in a bool isInside to check the transform, but its<br>> > obviously not inside the object when you have numbers like 5e^60.<br>> ><br>> > What is it that I'm doing wrong?? Its exactly the same as in the textbook<br>> > example. Here is the relevant code.....<br>> ><br>> ><br>> > //InternalImageType is <float,3><br>> ><br>> > InternalImageType::PointType point;<br>> > point[0] = seedX; //seedX,Y,Z are float .... but i also tried casting<br>> > to int<br>> > point[1] = seedY;<br>> > point[2] = seedZ;<br>> ><br>> > //output = 95, 147, 7.5 (first 2 i have rounded to the nearest number)<br>> > CString s;<br>> > s.Format("%f %f %f",point[0],point[1],point[2]);<br>> > AfxMessageBox(s);<br>> ><br>> > InternalImageType::IndexType index;<br>> > InternalImageType::ConstPointer image = reader->GetOutput();<br>> > //reader->Update() already called<br>> > image->TransformPhysicalPointToIndex( point, index );<br>> ><br>> > //output = 0.0, -285748e^(more than 60 i think), 0.0<br>> > CString ss;<br>> > ss.Format("%f %f %f",index[0],index[1],index[2]);<br>> > AfxMessageBox(ss);<br>> ><br>> ><br>> ><br>> ><br>> > Thanks.<br>> > Cameron.<br>> ><br>> ><br>> > ________________________________<br>> > > Date: Mon, 14 Apr 2008 16:23:31 -0400<br>> > > From: luis.ibanez@kitware.com<br>> ><br>> > > To: w_e_b_m_a_s_t_e_r_6_9@hotmail.com<br>> > > CC: bill.lorensen@gmail.com; insight-users@itk.org<br>> ><br>> ><br>> > > Subject: Re: [Insight-users] Confidence Connected Seed Coordinates<br>> > ><br>> > ><br>> > > Hi Cameron,<br>> > ><br>> > ><br>> > > If you want to find the pixel value of an ITK image at a given physical<br>> > > coordinate you may want to consider the two following options:<br>> > ><br>> > ><br>> > > A) ImageType::PointType point = GetPointSomehow();<br>> > > ImageType::IndexType index;<br>> > > ImageType::PixelType pixelValue;<br>> > ><br>> > > ImageType::ConstPointer image = seriesReader->GetOutput();<br>> > ><br>> > > image->TransformPhysicalPointToIndex( point, index );<br>> > ><br>> > > if( image->GetBufferedRegion().IsInside(index) )<br>> > > {<br>> > > pixelValue = image->GetPixel( index );<br>> > > }<br>> > ><br>> > > or<br>> > ><br>> > ><br>> > > B) use the itk::NearestNeighborInterpolateImageFunction<br>> > > as Interpolator type,<br>> > ><br>> > ><br>> > > ImageType::ConstPointer image = seriesReader->GetOutput();<br>> > ><br>> > > interpolator->SetImage( image );<br>> > ><br>> > > pixelValue = interpolator->Evaluate( point );<br>> > ><br>> > ><br>> > > From your email, it seem that you are more interested on the<br>> > > index location than the actual pixel value. In that case, you<br>> > > probably only need the first half of option (A).<br>> > ><br>> > ><br>> > > Regards,<br>> > ><br>> > ><br>> > > Luis<br>> > ><br>> > ><br>> > > ------------------------<br>> > > Cameron Burnett wrote:<br>> > > > Oh ok. So there is no way to perhaps extract a pixel at a certain<br>> > > > physical coordinate, from the ImageSeriesReader object ?? I had a look<br>> > > > at the doxygen documentation for itk::ImageSeriesReader but there wasn't<br>> > > > any method like that.<br>> > > ><br>> > > > The problem is that I'm doing this with 3D interaction. At the moment I<br>> > > > don't have any 2D viewports at all. In order to find a seed point, the<br>> > > > only logical thing I could think of was a vtkPointWidget. If that<br>> > > > doesn't end up working then I'm not sure if it would be possible to do<br>> > > > 3D region growing at all. Unless I can guess the seed point.<br>> > > ><br>> > > > Any ideas??<br>> > > ><br>> > > > Thanks.<br>> > > ><br>> > > ><br>> > > ><br>> > > > ------------------------------------------------------------------------<br>> > > > > Date: Mon, 14 Apr 2008 10:16:44 -0400<br>> > > > > From: bill.lorensen@gmail.com<br>> > > > > To: w_e_b_m_a_s_t_e_r_6_9@hotmail.com<br>> > > > > Subject: Re: [Insight-users] Confidence Connected Seed Coordinates<br>> > > > > CC: insight-users@itk.org<br>> > > > ><br>> > > > > Cameron,<br>> > > > ><br>> > > > > The Seed coordinates are in pixels, not physical coordinates. IN<br>> > > > > addition, VTK flips the image, so you will need to flip your Y pixel<br>> > > > > coordinate.<br>> > > > ><br>> > > > > We should probably add a method to the filters with Seeds to accept<br>> > > > > physical coordinates. Please add a feature request in the ITK bug<br>> > > > > tracker.<br>> > > > ><br>> > > > > This page explains how to submit a bug:<br>> > > > > http://www.itk.org/Wiki/ITK_Procedure_for_Contributing_Bug_Fixes<br>> > > > ><br>> > > > > Thanks,<br>> > > > ><br>> > > > > Bill<br>> > > > ><br>> > > > ><br>> > > > > On Mon, Apr 14, 2008 at 9:56 AM, Cameron Burnett<br>> > > > > <w_e_b_m_a_s_t_e_r_6_9@hotmail.com> wrote:<br>> > > > > ><br>> > > > > > Hi,<br>> > > > > ><br>> > > > > > I'm just wondering about the coordinate system of the confidence<br>> > > > connected<br>> > > > > > algorithm. I'm using a vtkPointWidget to select a seed point, and<br>> > > > according<br>> > > > > > to the point widget, my XY coordinates range from about -45,413<br>> > > > (top-left)<br>> > > > > > to 413,-45 (bottom-right).... and also a z coordinate which I've<br>> > > > got as 7.5<br>> > > > > > (middle slice).<br>> > > > > ><br>> > > > > > Now, when I plug that into the confidence connected SetSeed()<br>> > method, I<br>> > > > > > don't think the two coordinate systems are matching up because my<br>> > > > results<br>> > > > > > are a bit strange.<br>> > > > > ><br>> > > > > ><br>> > > > > > The following picture is an image of two legs, and you can see the<br>> > > > > > vtkPointWidget being positioned in the center of the femur.<br>> > > > > ><br>> > > > > > http://img382.imageshack.us/img382/2118/dicomimgaw7.jpg<br>> > > > > ><br>> > > > > > This is the result of a multiplier of 0.1, followed by a multiplier<br>> > > > of 2.<br>> > > > > ><br>> > > > > > http://img397.imageshack.us/img397/9743/outputvtk01multiplierwd7.jpg<br>> > > > > > http://img383.imageshack.us/img383/6727/outputvtk2multiplierfs6.jpg<br>> > > > > ><br>> > > > > > (Note: I think these may be a bit pixely due to the compression on<br>> > > > > > imageshack, but the actual ones are just 2 solid colours)<br>> > > > > ><br>> > > > > ><br>> > > > > > What I conclude from that is that the blue area is in fact the area<br>> > > > that has<br>> > > > > > been seeded, not the red area. Therefore that is why I believe that<br>> > > > I have<br>> > > > > > some sort of problem with the coordinates not matching. What do I<br>> > > > have to do<br>> > > > > > to make sure the point widget and the SetSeed() method both match<br>> > up??<br>> > > > > ><br>> > > > > > And I also don't know why there are 2 colours in the vtk file, when<br>> > one<br>> > > > > > should obviously be transparent. Is that one easy to answer?<br>> > > > > ><br>> > > > > ><br>> > > > > > Thanks for any help,<br>> > > > > > Cameron.<br>> > > > > ><br>> > > > > ><br>> > > > > ><br>> > > > > > ________________________________<br>> > > > > > Grab it. You dream job is up for grabs.<br>> > > > > > _______________________________________________<br>> > > > > > Insight-users mailing list<br>> > > > > > Insight-users@itk.org<br>> > > > > > http://www.itk.org/mailman/listinfo/insight-users<br>> > > > > ><br>> > > > > ><br>> > > ><br>> > > > ------------------------------------------------------------------------<br>> > > > at CarPoint.com.au It's simple! Sell your car for just $30<br>> > > ><br>> > <http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT><br>> > > ><br>> > > ><br>> > > > ------------------------------------------------------------------------<br>> > > ><br>> > > > _______________________________________________<br>> > > > Insight-users mailing list<br>> > > > Insight-users@itk.org<br>> > > > http://www.itk.org/mailman/listinfo/insight-users<br>> ><br>> > ________________________________<br>> > Grab it. You dream job is up for grabs.<br>> > _______________________________________________<br>> > Insight-users mailing list<br>> > Insight-users@itk.org<br>> > http://www.itk.org/mailman/listinfo/insight-users<br>> ><br>> ><br><br /><hr />Find out: SEEK Salary Centre <a href='http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=OCT07_endtext_salary&_m=EXT' target='_new'>Are you paid what you're worth?</a></body>
</html>