SCI Seg3D Mailing List

Text archives Help


[Seg3D] 0.5 voxel offset for cursor position


Chronological Thread 
  • From: Ramón Casero Cañas <ramon.casero@comlab.ox.ac.uk>
  • To: "seg3d@sci.utah.edu" <seg3d@sci.utah.edu>
  • Subject: [Seg3D] 0.5 voxel offset for cursor position
  • Date: Fri, 17 Dec 2010 21:16:03 +0000


Hi all,

Is painter_->pointer_pos_ giving the correct pointer coordinates?

Using the Spline Tool source code branch (because it allows to export seed point coordinates to a CSV file), I have noticed that if the image has, e.g.

nrrd.axis.min = [90, 162, 65]

nrrd.axis.max = [408, 396, 454]


But if you go to each of the 8 boundary slices of the image volume, the corresponding seed coordinates will be

[90.5, 162.5, 65.5]

[408.5, 396.5, 454.5]

In this case, the voxel spacing in any direction is 1.0.


The seed coordinates come from a snippet of code in SplineTool.cc like the following:

<CODE>
   // Add a new seed point.
    seed_lock_.lock();
    last_seed_window_ = painter_->cur_window_;
    seeds_.push_back(painter_->pointer_pos_);
    last_seed_index_ = seeds_.size() - 1;
    sort_seeds(sort_);
    seed_change_callback(last_seed_index_);
</CODE>


It seems that painter_->pointer_pos_ is offsetting the cursor position by 0.5 voxel.


Best regards,

Ramon.

--
Dr. Ramón Casero Cañas

Computational Biology
Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 283575
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/


  • [Seg3D] 0.5 voxel offset for cursor position, Ramón Casero Cañas, 12/17/2010

Archive powered by MHonArc 2.6.16.

Top of page