[Insight-users] Contour of the skin

Andriy Fedorov fedorov at bwh.harvard.edu
Thu Sep 10 12:20:33 EDT 2009


> Date: Thu, 10 Sep 2009 11:00:11 -0400
> From: Uril Yakubov <uyakubov at rotman-baycrest.on.ca>
> Subject: [Insight-users] Contour of the skin
> To: insight-users at itk.org
> Message-ID: <1252594811.2846.7.camel at localhost.localdomain>
> Content-Type: text/plain
>
> Hi Users,
>
> Is there in itk way to find out contour of the skin with its
> coordinates?

Uril,

BRAINSFit (http://www.nitrc.org/projects/multimodereg/) has a
component that tries to extract the head mask to define sampling
region during registration. You can see an illustration of such
masking here: http://www.na-mic.org/Wiki/index.php/MeningiomaMRIRegistrationStudy#BRAINSFit_2

You could run Marching cubes on that mask, and that would give you
points on the skin surface. Coincidentally, I just yesterday separated
this head masking component into an independent module for 3D Slicer
(http://slicer.org).

If I understood you correctly, and this is what you need, email me,
and I can provide you with the module and instructions how to add it
to Slicer (it's not part of the distribution or extension framework at
this point).

hth

Andriy Fedorov




>
> Thank you very much!
>
> Uril.
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 10 Sep 2009 11:10:08 -0400 (EDT)
> From: Insight Journal <webmaster at insightsoftwareconsortium.org>
> Subject: [Insight-users] The Insight Journal-New Submission
> To: insight-users at itk.org
> Message-ID: <20090910151008.4E6053F4FA at insightjournal.kitwarein.com>
>
> Hello,
> A new submission has been added to the Insight Journal.
>
> Title: Local Shape Analysis using MANCOVA
> Author(s):Paniagua B., Styner M., Macenko M., Pantazis D., Niethammer M.
> Abstract:
> Gross shape measures such as volume have been widely used in statistical analysis of anatomical structures. Statistical shape analysis methods have emerged within the last decade to allow for a localized analysis of shape. Most shape analysis frameworks are though lacking a good statistical underpinning, as they commonly do not allow for the inclusion of independent variables such as age, gender or clinical
> scores. This work presents a unified method for local shape analysis that can accomodate different number of variates and contrasts. It also allows to include any number of associated variables in the statistical analysis of the data. Several cases of study are given to clarify the explanation of the different types of data that can be analyzed and the parameters that can be used to tune the program  shapeAnalysisMANCOVA. This tool has been designed to interact seamlessly with the existing UNC SPHARM-PDM based shape analysis toolbox.
>
> Download and Review the paper at: http://www.insight-journal.org/browse/publication/694
>
> Generated by the Insight Journal
> You are receiving this email because you asked to be informed by the Insight Journal for new submissions.
>
> To change your email preference go to http://www.insight-journal.org .
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 10 Sep 2009 11:11:45 -0400
> From: Yili Pan <pyl0420 at gmail.com>
> Subject: [Insight-users] Problem of writing .png to .vtk volume
> To: insight-users at itk.org
> Message-ID:
>        <c1d170f60909100811k5ae62500wf505019b3f71779a at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi everyone:
>
> I have a series of .png lung data and I use ImageSeriesReadWrite example to
> write the series into volume. Then I use VTK to display the volume.
>
> The former part of the project seems to work well, since I got the .vtk
> volume. However, the window shows nothing at last when I was trying to use
> vtkContourFilter as the filter to display the lung.
>
> I am not sure if I missed to set some data of the volume or this is the
> visualization problem. Can you help me with this?
>
> Thanks a lot!
>
> Best,
> Yili
>
> This is the code I changed from the example:
>
> int main( int argc, char ** argv )
> {
>
>  if( argc < 4 )
>    {
>    std::cerr << "Usage: " << std::endl;
>    std::cerr << argv[0] << " firstSliceValue lastSliceValue
>  outputImageFile " << std::endl;
>    return EXIT_FAILURE;
>    }
>
>
>
>  typedef unsigned char                       PixelType;
>  const unsigned int Dimension = 3;
>
>  typedef itk::Image< PixelType, Dimension >  ImageType;
>
>  typedef itk::ImageSeriesReader< ImageType >  ReaderType;
>  typedef itk::ImageFileWriter<   ImageType >  WriterType;
>
>  ReaderType::Pointer reader = ReaderType::New();
>  WriterType::Pointer writer = WriterType::New();
>
>
>  const unsigned int first = atoi( argv[1] );
>  const unsigned int last  = atoi( argv[2] );
>
>  const char * outputFilename = argv[3];
>
> //============================================Reader
> Part==============================================
>
>  typedef itk::NumericSeriesFileNames    NameGeneratorType;
>
>  NameGeneratorType::Pointer nameGenerator = NameGeneratorType::New();
>
>
>
>
>  nameGenerator->SetSeriesFormat( "h1-1.%03d.png" );
>
>  nameGenerator->SetStartIndex( first );
>  nameGenerator->SetEndIndex( last );
>  nameGenerator->SetIncrementIndex( 1 );
>
>  system("pause");
>  itk::PNGImageIO::Pointer pngIO=itk::PNGImageIO::New();
>  pngIO->SetNumberOfDimensions(3);
>
>
>  pngIO->SetDimensions(0,512);
>  pngIO->SetDimensions(1,512);
>  pngIO->SetDimensions(2,259);
>
>  reader->SetImageIO( pngIO);
>
>
>
>
>  reader->SetFileNames( nameGenerator->GetFileNames()  );
>  system("pause");
>  reader->Update();
>  system("pause");
>
>  std::cout<<pngIO->GetImageSizeInBytes()<<" "<<512*512<<std::endl;
>  std::cout<<pngIO->GetIORegion()<<std::endl;
>
> //===============================================Writer
> Part=============================================
>
>  itk::VTKImageIO::Pointer vtkIO=itk::VTKImageIO::New();
>
>  vtkIO->SetFileTypeToBinary();
>
>  vtkIO->SetNumberOfDimensions(3);
>  vtkIO->SetNumberOfComponents(1);
>
>  vtkIO->SetDimensions(0,512);
>  vtkIO->SetDimensions(1,512);
>  vtkIO->SetDimensions(2,259);
>
>  vtkIO->SetSpacing(0,1);
>  vtkIO->SetSpacing(1,1);
>  vtkIO->SetSpacing(2,2.23776);
>
>  writer->SetImageIO(vtkIO);
>
>
>  writer->SetFileName( outputFilename );
>
>  writer->SetInput( reader->GetOutput() );
>
>  try
>    {
>    writer->Update();
>    }
>  catch( itk::ExceptionObject & err )
>    {
>    std::cerr << "ExceptionObject caught !" << std::endl;
>    std::cerr << err << std::endl;
>    return EXIT_FAILURE;
>    }
>
>  std::cout<<vtkIO->GetIORegion()<<std::endl;
>
> //==========================================Visualizing
> Part===============================================
>
>
>  vtkStructuredPointsReader* vtkReader=vtkStructuredPointsReader::New();
>
>  vtkReader->SetFileName("h1-1.vtk");
>  vtkReader->Update();
>
>  vtkContourFilter *iso=vtkContourFilter::New();
>  iso->SetInputConnection(vtkReader->GetOutputPort());
>  iso->SetValue(0,128.0f);
>
>
>  vtkRenderer* ren=vtkRenderer::New();
>  vtkRenderWindow* renWin=vtkRenderWindow::New();
>  renWin->AddRenderer(ren);
>
>
>  vtkPolyDataMapper* volumeMapper=vtkPolyDataMapper::New();
>  volumeMapper->SetInputConnection(iso->GetOutputPort());
>  volumeMapper->ScalarVisibilityOff();
>
>
>  vtkRenderWindowInteractor* iren=vtkRenderWindowInteractor::New();
>
>  vtkActor* isoActor=vtkActor::New();
>  isoActor->SetMapper(volumeMapper);
>
>
>  vtkProperty* prop=vtkProperty::New();
>  prop->SetColor(0,1,0);
>
>
>  isoActor->SetProperty(prop);
>  isoActor->ApplyProperties();
>
>
>  ren->AddActor(isoActor);
>
>  iren->SetRenderWindow(renWin);
>  renWin->SetSize(400,400);
>  iren->Initialize();
>  iren->Start();
>
>
>  return EXIT_SUCCESS;
> }
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20090910/987b6127/attachment.htm>
>
> ------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> End of Insight-users Digest, Vol 65, Issue 41
> *********************************************
>


More information about the Insight-users mailing list