[Insight-users] Confidence Connected Seed Coordinates

Cameron Burnett w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
Wed Apr 16 06:19:17 EDT 2008


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??

Thanks.


1.2.840.113704.1.111.4496.1160040069.13
Image (04C5A390)
  RTTI typeinfo:   class itk::Image<float,3>
  Reference Count: 3
  Modified Time: 356
  Debug: Off
  Observers:
    none
  Source: (04C57C10)
  Source output index: 0
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 32
  UpdateMTime: 357
  LargestPossibleRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [512, 512, 11]
  BufferedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [512, 512, 11]
  RequestedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [512, 512, 11]
  Spacing: [0.71875, 0.71875, 1.5]
  Origin: [-201, -91, 988.5]                
  Direction:
1 0 0
0 1 0
0 0 1

  PixelContainer:
    ImportImageContainer (04C5A550)
      RTTI typeinfo:   class itk::ImportImageContainer<unsigned long,float>
      Reference Count: 1
      Modified Time: 80
      Debug: Off
      Observers:
        none
      Pointer: 04C5A580
      Container manages memory: true
      Size: 2883584
      Capacity: 2883584



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

_________________________________________________________________
Are you paid what you're worth? Find out: SEEK Salary Centre
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080416/f2a52f72/attachment-0001.htm>


More information about the Insight-users mailing list