<div dir="ltr"><div>Hi Marco, <br><br></div><div>Great to see you are making progress.<br></div><div><br></div><div>While the members of the ITK, VTK and Slicer communities would be more than happy to help you, I think sending an email to all of them will have the opposite effect.<br></div><div><br></div><div>Instead, to get meaningful help, before sending an email I would suggest you consider the following checklist. I use it myself everyday.<br><br></div><div> [ ] Did I check the documentation, examples or existing tests of the related projects ?<br><br><br></div><div> [ ] Did I search the existing mailing archives and/or stack overflow for similar question ? It is not uncommon that other users asked a similar question. Using a search engine should be helpful here.<br><br><br></div><div> [ ] Did I check FAQ  (Frequently Asked Questions) sections of the projects ?  For example, on the Slicer wiki there are a user and developer FAQs.<br><br><br></div><div> [ ] Am I providing enough context for others to understand and reproduce the problem. Reading the SSCCE guidlines [Short, Self Contained, Correct (Compilable), Example]  available on <a href="http://sscce.org/">http://sscce.org/</a> is always a good thing. <br><br><br> [ ] Is my question specific to a given library (ITK, VTK) or application  (Slicer). For example, if the question is about the use of 
vtkImageThreshold filter, the VTK  user list is probably a good place to
 ask questions.<br><br><br></div><div> [ ] Did I re-read my email before sending it.  Considering your email will be read by hundreds (or may be thousands) of individuals, re-reading before sending is always good. <br><br><br>That said, let us know if you have any questions,<br><br></div><div>Thanks,<br></div><div>Jc<br></div><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 12:39 PM, Marco Dev <span dir="ltr"><<a href="mailto:marco.dev.open@gmail.com" target="_blank">marco.dev.open@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">



<div>
<div dir="ltr">
<div>
<div>HI,<br>
</div>
 I use double scaler type from input but work with (Black or white ) threshold setting   My code is follow bellow
<br>
int apply = 0;<br>
 imageThreshold->SetInputConnection(firstColorMapper->GetOutputPort());<br>
  imageThreshold->ReplaceInOn();<br>
  imageThreshold->SetInValue(255);<br>
 imageThreshold->ReplaceOutOn();<br>
  imageThreshold->SetOutValue(255);<br>
  imageThreshold->SetOutputScalarType(fixedConnector->GetOutput()->GetScalarType()); //double<br>
  imageThreshold->ThresholdBetween(VTK_SHORT_MIN, VTK_SHORT_MAX);   <br>
  imageThreshold->ThresholdBetween( -3495, 2161 );<br>
  imageThreshold->SetOutValue(apply ? 0 : 255);<br>
  imageThreshold->Update();<br>
<br>
<br>
  <br>
  double low   = (!enableThreshold) ? range[0] : lowThreshold;<br>
  double upper = (!enableThreshold) ? range[1] : upperThreshold;<br>
  <br>
  <br>
    vtkSmartPointer<vtkImageThreshold> imageThreshold2 = <br>
    vtkSmartPointer<vtkImageThreshold>::New();<br>
 // imageThreshold2->SetInputData(mImage);<br>
    imageThreshold2->SetInputConnection(secondColorMapper->GetOutputPort());<br>
  imageThreshold2->ReplaceInOn();<br>
   imageThreshold2->SetInValue(255);<br>
  imageThreshold2->ReplaceOutOn();<br>
  imageThreshold2->SetOutValue(255);<br>
 imageThreshold2->SetOutputScalarType(fixedConnector->GetOutput()->GetScalarType()); //double
<br>
 imageThreshold2->ThresholdBetween(VTK_SHORT_MIN, VTK_SHORT_MAX);   <br>
  imageThreshold2->ThresholdBetween( 160, 6088 );<br>
  imageThreshold2->SetOutValue(apply ? 0 : 255); <br>
  imageThreshold2->Update();<br>
<br>
<br>
</div>
    Thanks<br>
<div>    <br>
    <br>
<br>
  <br>
</div>
</div>
</div>

</div></div><br>_______________________________________________<br>
slicer-devel mailing list<br>
<a href="mailto:slicer-devel@bwh.harvard.edu">slicer-devel@bwh.harvard.edu</a><br>
<a href="http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel" rel="noreferrer" target="_blank">http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel</a><br>
To unsubscribe: send email to <a href="mailto:slicer-devel-request@bwh.harvard.edu">slicer-devel-request@bwh.harvard.edu</a> with unsubscribe as the subject<br>
<a href="http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ" rel="noreferrer" target="_blank">http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">+1 919 869 8849<br></div>
</div>