Hi Marco, Great to see you are making progress.
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. Instead, to get meaningful help, before sending an email I would suggest you consider the following checklist. I use it myself everyday. [ ] Did I check the documentation, examples or existing tests of the related projects ? [ ] 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. [ ] Did I check FAQ (Frequently Asked Questions) sections of the projects ? For example, on the Slicer wiki there are a user and developer FAQs. [ ] 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 http://sscce.org/ is always a good thing. [ ] 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. [ ] 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. That said, let us know if you have any questions, Thanks, Jc On Tue, Sep 22, 2015 at 12:39 PM, Marco Dev <marco.dev.o...@gmail.com> wrote: > HI, > I use double scaler type from input but work with (Black or white ) > threshold setting My code is follow bellow > int apply = 0; > imageThreshold->SetInputConnection(firstColorMapper->GetOutputPort()); > imageThreshold->ReplaceInOn(); > imageThreshold->SetInValue(255); > imageThreshold->ReplaceOutOn(); > imageThreshold->SetOutValue(255); > > imageThreshold->SetOutputScalarType(fixedConnector->GetOutput()->GetScalarType()); > //double > imageThreshold->ThresholdBetween(VTK_SHORT_MIN, VTK_SHORT_MAX); > imageThreshold->ThresholdBetween( -3495, 2161 ); > imageThreshold->SetOutValue(apply ? 0 : 255); > imageThreshold->Update(); > > > > double low = (!enableThreshold) ? range[0] : lowThreshold; > double upper = (!enableThreshold) ? range[1] : upperThreshold; > > > vtkSmartPointer<vtkImageThreshold> imageThreshold2 = > vtkSmartPointer<vtkImageThreshold>::New(); > // imageThreshold2->SetInputData(mImage); > > imageThreshold2->SetInputConnection(secondColorMapper->GetOutputPort()); > imageThreshold2->ReplaceInOn(); > imageThreshold2->SetInValue(255); > imageThreshold2->ReplaceOutOn(); > imageThreshold2->SetOutValue(255); > > imageThreshold2->SetOutputScalarType(fixedConnector->GetOutput()->GetScalarType()); > //double > imageThreshold2->ThresholdBetween(VTK_SHORT_MIN, VTK_SHORT_MAX); > imageThreshold2->ThresholdBetween( 160, 6088 ); > imageThreshold2->SetOutValue(apply ? 0 : 255); > imageThreshold2->Update(); > > > Thanks > > > > > > _______________________________________________ > slicer-devel mailing list > slicer-de...@bwh.harvard.edu > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel > To unsubscribe: send email to slicer-devel-requ...@bwh.harvard.edu with > unsubscribe as the subject > > http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > -- +1 919 869 8849
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers