bool Region ( char* nomefile, unsigned int* X_min, unsigned int* Y_min, unsigned int* X_max, unsigned int* Y_max );
int main(int argc, char* argv[] )
{
if( argc < 2 )
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile " << std::endl;
return EXIT_FAILURE;
}
unsigned int x_min = 1;
unsigned int y_min = 1;
unsigned int x_max = 1;
unsigned int y_max = 1;
if( Region ( argv[1], &x_min, &y_min, &x_max, &y_max ) )
{
std::cout << "x_min = " << x_min << std::endl;
std::cout << "y_min = " << y_min << std::endl;
std::cout << "x_max = " << x_max << std::endl;
std::cout << "y_max = " << y_max << std::endl;
}
else
{
std::cout << "no\n";
}
}
bool Region ( char* nomefile, unsigned int* X_min, unsigned int* Y_min, unsigned int* X_max, unsigned int* Y_max )
{
{
std::cerr << "Could not read: " << nomefile << std::endl;
return false;
}
{
return false;
}
{
return false;
}
{
return false;
}
std::cout << X0 << std::endl << Y0 << std::endl << X1 << std::endl << Y1 << std::endl;
*X_min = static_cast<unsigned int>(X0);
*Y_min = static_cast<unsigned int>(Y0);
*X_max = static_cast<unsigned int>(X1);
*Y_max = static_cast<unsigned int>(Y1);
return true;
}
Attribute class This class use template metaprograming tricks to let the user know when the template ...
Definition gdcmAttribute.h:86
ArrayType & GetValue(unsigned int idx=0)
Definition gdcmAttribute.h:154
void SetFromDataElement(DataElement const &de)
Definition gdcmAttribute.h:206
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
SmartPointer< SequenceOfItems > GetValueAsSQ() const
Class to represent a Data Set (which contains Data Elements)
Definition gdcmDataSet.h:56
const DataElement & GetDataElement(const Tag &t) const
Definition gdcmDataSet.h:188
bool FindDataElement(const PrivateTag &t) const
Look up if private tag 't' is present in the dataset:
a DICOM File
Definition gdcmFile.h:34
const DataSet & GetDataSet() const
Get Data Set.
Definition gdcmFile.h:57
Class to represent an Item.
Definition gdcmItem.h:46
const DataSet & GetNestedDataSet() const
Definition gdcmItem.h:80
Reader ala DOM (Document Object Model)
Definition gdcmReader.h:54
const File & GetFile() const
Set/Get File.
Definition gdcmReader.h:72
virtual bool Read()
Main function to read a file.
void SetFileName(const char *filename_native)
Class to represent a Sequence Of Items.
Definition gdcmSequenceOfItems.h:40
SizeType GetNumberOfItems() const
Definition gdcmSequenceOfItems.h:86
const Item & GetItem(SizeType position) const
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition gdcmTag.h:39