https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Broken/Images/ConnectedThresholdImageFilter&feed=atom&action=history
ITK/Examples/Broken/Images/ConnectedThresholdImageFilter - Revision history
2024-03-29T12:44:58Z
Revision history for this page on the wiki
MediaWiki 1.38.6
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Broken/Images/ConnectedThresholdImageFilter&diff=63771&oldid=prev
Mathew-seng: Deprecated content that is moved to sphinx
2019-06-07T21:12:07Z
<p>Deprecated content that is moved to sphinx</p>
<a href="https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Broken/Images/ConnectedThresholdImageFilter&diff=63771&oldid=50681">Show changes</a>
Mathew-seng
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Broken/Images/ConnectedThresholdImageFilter&diff=50681&oldid=prev
Lorensen at 13:52, 23 December 2012
2012-12-23T13:52:54Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:52, 23 December 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l169">Line 169:</td>
<td colspan="2" class="diff-lineno">Line 169:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{ITKVTKCMakeLists|<del style="font-weight: bold; text-decoration: none;">MedianImageFilter|</del>}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{ITKVTKCMakeLists|<ins style="font-weight: bold; text-decoration: none;">{{SUBPAGENAME}}</ins>}}</div></td></tr>
</table>
Lorensen
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Broken/Images/ConnectedThresholdImageFilter&diff=38035&oldid=prev
Lorensen at 01:57, 2 March 2011
2011-03-02T01:57:05Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 01:57, 2 March 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l19">Line 19:</td>
<td colspan="2" class="diff-lineno">Line 19:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>typedef itk::Image< PixelType, Dimension > ImageType;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>typedef itk::Image< PixelType, Dimension > ImageType;</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>void CreateImage(ImageType::Pointer image);</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">static </ins>void CreateImage(ImageType::Pointer image);</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>int main( int argc, char *argv[])</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>int main( int argc, char *argv[])</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l169">Line 169:</td>
<td colspan="2" class="diff-lineno">Line 169:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">==CMakeLists.txt==</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{<ins style="font-weight: bold; text-decoration: none;">{ITKVTKCMakeLists|MedianImageFilter|</ins>}}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><source lang="cmake"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">cmake_minimum_required(VERSION 2.6)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">PROJECT(ConnectedThresholdImageFilter)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">include_directories(/home/doriad/src/ITK/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/src/)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">FIND_PACKAGE(VTK REQUIRED)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">INCLUDE($</del>{<del style="font-weight: bold; text-decoration: none;">VTK_USE_FILE</del>}<del style="font-weight: bold; text-decoration: none;">)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">FIND_PACKAGE(ITK REQUIRED)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">INCLUDE(${ITK_USE_FILE</del>}<del style="font-weight: bold; text-decoration: none;">)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">ADD_EXECUTABLE(ConnectedThresholdImageFilter ConnectedThresholdImageFilter.cxx)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">TARGET_LINK_LIBRARIES(ConnectedThresholdImageFilter</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">ITKIO</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></source></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
</table>
Lorensen
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Broken/Images/ConnectedThresholdImageFilter&diff=33697&oldid=prev
Daviddoria: Created page with "Just need to finish the visualization code. ==ConnectedThresholdImageFilter.cxx== <source lang="cpp"> #include "itkImage.h" #include "itkImageFileWriter.h" #include "itkConnecte..."
2010-11-04T18:22:26Z
<p>Created page with "Just need to finish the visualization code. ==ConnectedThresholdImageFilter.cxx== <source lang="cpp"> #include "itkImage.h" #include "itkImageFileWriter.h" #include "itkConnecte..."</p>
<p><b>New page</b></p><div>Just need to finish the visualization code.<br />
<br />
==ConnectedThresholdImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkImageFileWriter.h"<br />
#include "itkConnectedThresholdImageFilter.h"<br />
#include "itkCastImageFilter.h"<br />
<br />
#include <itkImageToVTKImageFilter.h><br />
<br />
#include "vtkImageViewer.h"<br />
#include "vtkRenderWindowInteractor.h"<br />
#include "vtkSmartPointer.h"<br />
#include "vtkImageActor.h"<br />
#include "vtkInteractorStyleImage.h"<br />
#include "vtkRenderer.h"<br />
<br />
typedef itk::Image< PixelType, Dimension > ImageType;<br />
<br />
void CreateImage(ImageType::Pointer image);<br />
<br />
int main( int argc, char *argv[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::ConnectedThresholdImageFilter<ImageType, ImageType> ConnectedFilterType;<br />
ConnectedFilterType::Pointer connectedThreshold = ConnectedFilterType::New();<br />
float lower = 95.0;<br />
float upper = 105.0;<br />
connectedThreshold->SetLower(lower);<br />
connectedThreshold->SetUpper(upper);<br />
<br />
connectedThreshold->SetReplaceValue(255);<br />
<br />
// Seed 1: (25, 35)<br />
ImageType::IndexType seed1;<br />
seed1[0] = 25;<br />
seed1[1] = 35;<br />
connectedThreshold->SetSeed(seed1);<br />
connectedThreshold->SetInput(image);<br />
<br />
// Seed 2: (110, 120)<br />
ImageType::IndexType seed2;<br />
seed2[0] = 110;<br />
seed2[1] = 120;<br />
connectedThreshold->SetSeed(seed2);<br />
connectedThreshold->SetReplaceValue(150);<br />
<br />
connectedThreshold->SetInput(image);<br />
<br />
// Visualize<br />
typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;<br />
ConnectorType::Pointer connector2 = ConnectorType::New();<br />
connector2->SetInput(image2);<br />
<br />
vtkSmartPointer<vtkImageActor> actor2 =<br />
vtkSmartPointer<vtkImageActor>::New();<br />
actor2->SetInput(connector2->GetOutput());<br />
<br />
// Visualize joined image<br />
ConnectorType::Pointer addConnector = ConnectorType::New();<br />
addConnector->SetInput(addFilter->GetOutput());<br />
<br />
vtkSmartPointer<vtkImageActor> addActor =<br />
vtkSmartPointer<vtkImageActor>::New();<br />
addActor->SetInput(addConnector->GetOutput());<br />
<br />
// There will be one render window<br />
vtkSmartPointer<vtkRenderWindow> renderWindow =<br />
vtkSmartPointer<vtkRenderWindow>::New();<br />
renderWindow->SetSize(900, 300);<br />
<br />
vtkSmartPointer<vtkRenderWindowInteractor> interactor =<br />
vtkSmartPointer<vtkRenderWindowInteractor>::New();<br />
interactor->SetRenderWindow(renderWindow);<br />
<br />
// Define viewport ranges<br />
// (xmin, ymin, xmax, ymax)<br />
double leftViewport[4] = {0.0, 0.0, 0.33, 1.0};<br />
double centerViewport[4] = {0.33, 0.0, 0.66, 1.0};<br />
double rightViewport[4] = {0.66, 0.0, 1.0, 1.0};<br />
<br />
// Setup both renderers<br />
vtkSmartPointer<vtkRenderer> leftRenderer =<br />
vtkSmartPointer<vtkRenderer>::New();<br />
renderWindow->AddRenderer(leftRenderer);<br />
leftRenderer->SetViewport(leftViewport);<br />
leftRenderer->SetBackground(.6, .5, .4);<br />
<br />
vtkSmartPointer<vtkRenderer> centerRenderer =<br />
vtkSmartPointer<vtkRenderer>::New();<br />
renderWindow->AddRenderer(centerRenderer);<br />
centerRenderer->SetViewport(centerViewport);<br />
centerRenderer->SetBackground(.4, .5, .6);<br />
<br />
vtkSmartPointer<vtkRenderer> rightRenderer =<br />
vtkSmartPointer<vtkRenderer>::New();<br />
renderWindow->AddRenderer(rightRenderer);<br />
rightRenderer->SetViewport(rightViewport);<br />
rightRenderer->SetBackground(.4, .5, .6);<br />
<br />
// Add the sphere to the left and the cube to the right<br />
leftRenderer->AddActor(actor1);<br />
centerRenderer->AddActor(actor2);<br />
rightRenderer->AddActor(addActor);<br />
<br />
leftRenderer->ResetCamera();<br />
centerRenderer->ResetCamera();<br />
rightRenderer->ResetCamera();<br />
<br />
renderWindow->Render();<br />
<br />
vtkSmartPointer<vtkInteractorStyleImage> style =<br />
vtkSmartPointer<vtkInteractorStyleImage>::New();<br />
interactor->SetInteractorStyle(style);<br />
<br />
interactor->Start();<br />
<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
// Create an image with 2 connected components<br />
ImageType::RegionType region;<br />
ImageType::IndexType start;<br />
start[0] = 0;<br />
start[1] = 0;<br />
<br />
ImageType::SizeType size;<br />
size[0] = 200;<br />
size[1] = 300;<br />
<br />
region.SetSize( size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
// Make a square<br />
for(unsigned int r = 20; r < 80; r++)<br />
{<br />
for(unsigned int c = 30; c < 100; c++)<br />
{<br />
ImageType::IndexType pixelIndex;<br />
pixelIndex[0] = r;<br />
pixelIndex[1] = c;<br />
<br />
image->SetPixel(pixelIndex, 100.0);<br />
}<br />
}<br />
<br />
// Make another square<br />
for(unsigned int r = 100; r < 130; r++)<br />
{<br />
for(unsigned int c = 115; c < 160; c++)<br />
{<br />
ImageType::IndexType pixelIndex;<br />
pixelIndex[0] = r;<br />
pixelIndex[1] = c;<br />
<br />
image->SetPixel(pixelIndex, 100.0);<br />
}<br />
}<br />
}<br />
</source><br />
<br />
==CMakeLists.txt==<br />
<source lang="cmake"><br />
cmake_minimum_required(VERSION 2.6)<br />
<br />
PROJECT(ConnectedThresholdImageFilter)<br />
<br />
include_directories(/home/doriad/src/ITK/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/src/)<br />
<br />
FIND_PACKAGE(VTK REQUIRED)<br />
INCLUDE(${VTK_USE_FILE})<br />
<br />
FIND_PACKAGE(ITK REQUIRED)<br />
INCLUDE(${ITK_USE_FILE})<br />
<br />
ADD_EXECUTABLE(ConnectedThresholdImageFilter ConnectedThresholdImageFilter.cxx)<br />
TARGET_LINK_LIBRARIES(ConnectedThresholdImageFilter<br />
ITKIO<br />
)<br />
<br />
<br />
</source></div>
Daviddoria