Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Virus, Spyware, and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

> want to understand
sassou
post Aug 20 2009, 11:05 AM
Post #1


New Member
*

Group: Members
Posts: 9
Joined: 5-August 09
Member No.: 360,795



I need that someone help me and comment the following code to me exactly. even i learned many tutorials of c++ but i still need help because it's so complicated to me. all i want that some one explain to me with comments every step.thanks for your help
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif

#ifdef __BORLANDC__
#define ITK_LEAN_AND_MEAN
#endif
#include "itkHessian3DToVesselnessMeasureImageFilter.h"
#include "itkHessianRecursiveGaussianImageFilter.h"
#include "itkSymmetricSecondRankTensor.h"
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"

int main( int argc, char *argv[] )
{

if( argc < 3 )
{
std::cerr << "Usage: inputImage outputImage [sigma] [alpha_1] [alpha_2]" << std::endl;return EXIT_FAILURE;
}

const unsigned int Dimension = 3;
typedef double InputPixelType;
typedef float OutputPixelType;

typedef itk::Image< InputPixelType, Dimension > InputImageType;
typedef itk::Image< OutputPixelType, Dimension > OutputImageType;

typedef itk::HessianRecursiveGaussianImageFilter<
InputImageType > HessianFilterType;
typedef itk::Hessian3DToVesselnessMeasureImageFilter<
OutputPixelType > VesselnessMeasureFilterType;
typedef itk::ImageFileReader< InputImageType > ReaderType;
typedef itk::ImageFileWriter< OutputImageType > WriterType;

HessianFilterType::Pointer hessianFilter = HessianFilterType::New();
VesselnessMeasureFilterType::Pointer vesselnessFilter =
VesselnessMeasureFilterType::New();

ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();

reader->SetFileName( argv[1] );
hessianFilter->SetInput( reader->GetOutput() );
if( argc >= 4 )
{
hessianFilter->SetSigma( static_cast< double >(atof(argv[3])) );
}
vesselnessFilter->SetInput( hessianFilter->GetOutput() );
writer->SetInput( vesselnessFilter->GetOutput() );
writer->SetFileName( argv[2] );
if( argc >= 5 )
{
vesselnessFilter->SetAlpha1( static_cast< double >(atof(argv[4])));
}
if( argc >= 6 )
{
vesselnessFilter->SetAlpha2( static_cast< double >(atof(argv[5])));
}

writer->Update();
return EXIT_SUCCESS;
}

Thanks again
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 1)
Billy O'Neal
post Aug 20 2009, 11:17 AM
Post #2


Look buddy -- I'm an Engineer
******

Group: HJT Team Coach
Posts: 8,510
Joined: 17-January 08
From: Northfield, Ohio
Member No.: 184,215



1. That code depends on external libraries we do not have. If you ask questions about libraries, you have to include them.
2. We do not do homework.

You need to start with a simpler example anyway before jumping into a rats nest of code.....

Billy3


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 21st November 2009 - 09:26 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Virus Removal Guides

© 2003-2009 All Rights Reserved Bleeping Computer LLC.