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