CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Mar 2013
    Posts
    31

    Some suggestion about .1file type, .2 file type etc

    Name:  file-formats.png
Views: 3603
Size:  79.2 KB

    Hello I have attached a picture to clarify my problem. In a folder named headsq, a number of files with same name has been saved. I think these are some raw images. Type of file has been written as "1 File (.1)", "2 File(.2)" etc when clicked for the properties. Now I have a number of files. How can I save them with same just shown in picture i.e. as " 1 File(.1)", "2 File (.2)" etc.

    Thanks in advance.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Some suggestion about .1file type, .2 file type etc

    You may want to first enable to show file extensions in Windows explorer!
    Victor Nijegorodov

  3. #3
    Join Date
    Mar 2013
    Posts
    31

    Re: Some suggestion about .1file type, .2 file type etc

    Name:  properties.png
Views: 1888
Size:  32.2 KB

    Here I have attached the properties of the file. I know these are raw image files, but what 1 File, 2 File etc means. Please help me clarify this.

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Some suggestion about .1file type, .2 file type etc

    That's just the extension, like a somefile.doc is a .doc file. Since there's no application associate with .1, Explorer doesn't know what else to call it.

    What's your Visual C++ question?

  5. #5
    Join Date
    Mar 2013
    Posts
    31

    Re: Some suggestion about .1file type, .2 file type etc

    I have a series of raw image files. I would like to put all of them in a folder and use that kind of extension as 1 File (.1) for those images. How can that be done?

  6. #6
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Some suggestion about .1file type, .2 file type etc

    Quote Originally Posted by jenny_wui View Post
    I have a series of raw image files. I would like to put all of them in a folder and use that kind of extension as 1 File (.1) for those images. How can that be done?
    I don't know what kind of answer you're expecting except to use the various file I/O functions, FindFirstFile, FindNextFile, etc.

    Regards,

    Paul McKenzie

  7. #7
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Some suggestion about .1file type, .2 file type etc

    Quote Originally Posted by jenny_wui View Post
    I have a series of raw image files. I would like to put all of them in a folder and use that kind of extension as 1 File (.1) for those images. How can that be done?
    Again, what's your Visual C++ question? Where are you stuck?

  8. #8
    Join Date
    Mar 2013
    Posts
    31

    Re: Some suggestion about .1file type, .2 file type etc

    Thank you all for taking time to answer. I think I made every body a bit confused. As I mentioned that I have a set of raw images. What I would like to do is as follows:

    make a 3D meshed model out of the images.
    Before I was trying used some code written in VTK, but it requires images files to be of the form 1 File(.1), 2 File (.2) etc. That's why I was asking whether it is possible to convert my file type (.IMG) to that.

    Any way, I would like do it myself. I would be happy if anybody provide me some suggestions about its implementation.

    Thanks.

  9. #9
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Some suggestion about .1file type, .2 file type etc

    Quote Originally Posted by jenny_wui View Post
    Before I was trying used some code written in VTK,
    What is "VTK"?
    but it requires images files to be of the form 1 File(.1), 2 File (.2) etc. That's why I was asking whether it is possible to convert my file type (.IMG) to that.
    What do you mean by "convert"? Just change the extension? Take the file and manipulate it in some way to be in a different format?

    The reason why there is confusion is that there is no specific Visual C++ question being asked.

    Regards,

    Paul McKenzie

  10. #10
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Some suggestion about .1file type, .2 file type etc

    If the only thing you need is to rename your files then as Paul already suggested use FindFirstFile, FindNextFile API (or CFileFind FMC class) to search for (enumerate) all files you need to rename and use MoveFile API to rename (change the extension) the files.
    Or just rename them in Windows Explorer!
    Victor Nijegorodov

  11. #11
    Join Date
    Mar 2013
    Posts
    31

    Re: Some suggestion about .1file type, .2 file type etc

    Just renaming the files does not work,

  12. #12
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Some suggestion about .1file type, .2 file type etc

    Quote Originally Posted by jenny_wui View Post
    Just renaming the files does not work,
    Why?
    Victor Nijegorodov

  13. #13
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Some suggestion about .1file type, .2 file type etc

    Quote Originally Posted by jenny_wui View Post
    Just renaming the files does not work,
    You've yet to ask a meaningful question. You said, "Before I was trying used some code written in VTK, but it requires images files to be of the form 1 File(.1), 2 File (.2) etc. That's why I was asking whether it is possible to convert my file type (.IMG) to that.", and that really doesn't tell us anything. You need to be more specific about the current format and the format you need. All you've done so far is talk about extensions.

  14. #14
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Some suggestion about .1file type, .2 file type etc

    Quote Originally Posted by jenny_wui View Post
    Just renaming the files does not work,
    What do you mean by "does not work"?

    I can take any file that I have access to and change the extension to anything I want. That "works" perfectly for me, whether I'm in Explorer, or with a program using rename() or other I/O function.

    So if that is not what you mean by "does not work", then you need to explain what you mean by "does not work".

    It would also help if you answered my previous question: What do you mean by "convert"?

    Do you mean

    1) Open the file and read its contents.
    2) Take those contents, apply some transformation to those contents, creating a different set of contents.
    3) Save those new contents to another file.

    Regards,

    Paul McKenzie

  15. #15
    Join Date
    Mar 2013
    Posts
    31

    Re: Some suggestion about .1file type, .2 file type etc

    Thanks for the suggestion. It would have been good if I could attach the file, but unfortunately I can't, the system does not allow. Now I would like to do what Paul suggested, reading the binary file, read the contents and diplaying the point clouds Later I would like to generate different iso-surface for different pixel values of the point clouds. That's the goal. Upto displaying of the point cloud, i am ok. But I need some help about generating iso-surface i.e. polyginizing for the model for different iel values. Thanks.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured