<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Ok I will experiment. I think I have the iso set to 0.3 currently ( through trial and error) </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">I also found an issue where in some cases the Ray trace loop ( in vtkCellPicker ) would get stuck. </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">While ( t1 < tLast ) // something like this</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Etc </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">In the particular instance, which seemed to be a click on an "empty" transparent area, t1 would get stuck at 1.0 " fore ever" ...</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">So I subclassed it to work around and if t1 stays a 1.0 +- tiny e for >200 loops I break out.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><br><br>Sent from my iPad</div><div><br>On Apr 21, 2016, at 10:53 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi Richard,<div><br></div><div>Try different values for picker->SetVolumeOpacityIsovalue(x). For a binary volume, a value of 0.51 will work better than the default value of 0.05.</div><div><br></div><div>While debugging this, you can use picker->GetPCoords() to get the fractional part of the IJK coords.</div><div><br></div><div> - David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 21, 2016 at 8:19 PM, Richard Frank <span dir="ltr"><<a href="mailto:rickfrank@me.com" target="_blank">rickfrank@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi David</div><div><br></div><div>I have a binary volume (thresholded from a gray volume). The opacity transfer function sets 0 to transparent and 1.0 to opaque.</div><div><br></div><div>There are some noise areas and I've created an eraser tool so the user can erase some individual voxels.</div><div><br></div><div>Since the volume is mostly black, and I need to do computations on the non-zero voxels later, I first go through the volume k = 0 < kmax, j = <span style="color:#000000;font-family:SFNSText,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-variant:normal;font-weight:300;letter-spacing:normal;line-height:22.5px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:#ffffff">0 < jmax</span> x= 0 <span style="color:rgb(0,0,0);font-family:SFNSText,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-variant:normal;font-weight:300;letter-spacing:normal;line-height:22.5px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)">< xmax</span><span style="color:#000000;font-family:SFNSText,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-variant:normal;font-weight:300;letter-spacing:normal;line-height:22.5px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:#ffffff"> </span></div><div>and build a point list where each voxel != 0 has it's voxel ijk and pointId recorded. So I have a cursor.</div><div><br></div><div><br></div><div>When the user clicks, picker->GetPointIJK(ijk) returns in one case 318 391 452.<br></div><div><br></div><div>but my cursor has</div><div><br></div><div>318 364 452<br>318 390 452 <------<br>319 307 88<br>319 308 88<br></div><div><br></div><div></div><div>And so I don't think the point is actually hit, so I don't erase it.</div><div><br></div><div>My ijk s are accurate - I presume - because I walk through the whole volume voxel by voxels to build the cursor.</div><div><br></div><div>This is a "close" match but others are off by 4 - 10 voxels (usually in the z direction).</div><div><br></div><div>I've tried doing a distance match based on the xyz coordinates (which I also record in my cursor) and that works the best so far, but, I still wind up with a lone pixel (or say a row or column of 4 - 5 pixels) that I can't do an inverse map to - from the hit xyz to my ijk.</div><div><br></div><div>So it seems that the picker->ijk has some rounding or something going on that doesn't exactly match my precomputed ijk.</div><div><br></div><div>Any thoughts on how to accomplish what I want to do?</div><div><br></div><div>Thanks</div><div><br></div><div>Rick</div><div><div class="h5"><div><br></div><div><br></div><div>On Apr 21, 2016, at 06:18 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br><br></div><div><blockquote type="cite"><div><div dir="ltr">Hi Richard,<div><br></div><div>You'll have to lay out your methods in a bit more detail... you say that you need a way "reach all the voxels" in the volume, and I'm trying to wrap my head around what you mean by this. Picking transparent voxels is obviously going to be impossible. Ditto for picking any voxels that are surrounded by opaque voxels. I'm not sure what you man by "small rows/columns" either... aren't all the rows and columns in the volume the same size?</div><div><br></div><div> - David</div><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 21, 2016 at 3:44 PM, Richard Frank <span dir="ltr"><<a href="mailto:rickfrank@me.com" target="_blank">rickfrank@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi,</div><div><br></div><div>I'm having trouble reaching all ijk in a volume using the Volume Picker.</div><div><br></div><div>The computed ijk returned from the picker is in a few cases incorrect. I realize there are rounding issues and such, but I'm trying to pick a single voxel and I get back, say, 314,391,454 instead of 313,392,454 - in image coordinates, for example.</div><div><br></div><div>Most often it is fine - it's just in some cases there are small rows / columns that are unreachable. Anyone have any advice on this? I assume it's some sort of fractional voxel issue but I need to find a way to reach all the voxels. I've tried setting the tolerance but it's unclear if that's really the issue....</div><div><br></div><div><br></div><div>Thanks</div><div><br></div><div>Rick</div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div><br></div>
</div></blockquote></body></html>