How to use documentation of library/fo-dicom

PJ33

Member
Joined
Jul 23, 2021
Messages
7
Programming Experience
1-3
Hello I am new in C# and reading the documentation seems difficult.
I am trying to use fo-dicom library and I am experimenting now.
For example given the below lik I try to implement the code


What I did is adding:

using Dicom.Imaging;
creating this variable: var file2 = DicomPixelData.Width();
But I dont know what is the argument for the given method.

I can see that the property has a get and set argument, so how is the expected format for this method?

Ps:
I am new in C# so please to remove my question, if it's not clear enough please let me know and I will try as clear as possible to follow up your questions.

Thank you in advance!
 
In C#, with a getter/setter, you don't put parenthesis after the property name. So the appropriate usage would look something like:
C#:
var width = pixelData.Width;

Anyway, have you been following any of the DICOM tutorials to learn how to use the library?

I would recommend learning how to program in C# first before getting sucked into a library.
 
In C#, with a getter/setter, you don't put parenthesis after the property name. So the appropriate usage would look something like:
C#:
var width = pixelData.Width;

Anyway, have you been following any of the DICOM tutorials to learn how to use the library?

I would recommend learning how to program in C# first before getting sucked into a library.
I have familiarise myself with c# I just need to understand how to use th documentation, can ou suggest me anything more specific please?
 
If you are familiar with C#, then you would know that if a class that exposes a property with a getter/setter like:
C#:
class Car
{
    public string Model { get; set; }
}

will let you get the property value by using:
C#:
var model = car.Model;

This is a language convention that you should have learned while learning the language.

As for using the documentation, unfortunately it looks like the owner of that library has taken the cheap approach of just automatically converting his XML documentation into formatted C# documentation. That approach assumes that you already know how to use the library at high level, and that you just need the documentation to get the details about specifics. It doesn't look like they wrote an overview of how to use the library in general. Perhaps they actually want you to RTFM regarding the devices, and then the library usage would be self-obvious.
 
If you are familiar with C#, then you would know that if a class that exposes a property with a getter/setter like:
C#:
class Car
{
    public string Model { get; set; }
}

will let you get the property value by using:
C#:
var model = car.Model;

This is a language convention that you should have learned while learning the language.

As for using the documentation, unfortunately it looks like the owner of that library has taken the cheap approach of just automatically converting his XML documentation into formatted C# documentation. That approach assumes that you already know how to use the library at high level, and that you just need the documentation to get the details about specifics. It doesn't look like they wrote an overview of how to use the library in general. Perhaps they actually want you to RTFM regarding the devices, and then the library usage would be self-obvious.
Thank you! This was useful I will continue working on this
 

Latest posts

Back
Top Bottom